diff --git a/hwe/ts/components/MessagePanel.vue b/hwe/ts/components/MessagePanel.vue index b3d9fcd6..0dfa4af8 100644 --- a/hwe/ts/components/MessagePanel.vue +++ b/hwe/ts/components/MessagePanel.vue @@ -187,6 +187,19 @@ const messageIndexedList: Record> = { diplomacy: messageDiplomacy, }; +function processMsg(msg: MsgItem) { + if (msg.option.delete) { + (() => { + const targetID = msg.option.delete; + const targetMsg = messageStorage.get(targetID); + if(!targetMsg){ + return; + } + targetMsg.option.invalid = true; + })(); + } +} + function updateMsgResponse(response: MsgResponse) { if (!response.keepRecent) { messageStorage.clear(); @@ -230,6 +243,7 @@ function updateMsgResponse(response: MsgResponse) { if (oldMsg !== undefined) { continue; } + processMsg(msg); messageStorage.set(msg.id, msg); filteredMsgList.push(msg); } @@ -461,7 +475,7 @@ function foldMessage($event: MouseEvent, type: MsgType) { const remain = target.slice(10); target.length = 10; - for(const msg of remain){ + for (const msg of remain) { messageStorage.delete(msg.id); } } @@ -574,7 +588,7 @@ onMounted(async () => { border-right: 1px solid gray; } - .only-mobile{ + .only-mobile { display: none; } } @@ -602,7 +616,5 @@ onMounted(async () => { .d-grid.Actions { grid-template-columns: 1fr 1fr; } - - } diff --git a/hwe/ts/components/MessagePlate.vue b/hwe/ts/components/MessagePlate.vue index e881ce5d..9fa9e16f 100644 --- a/hwe/ts/components/MessagePlate.vue +++ b/hwe/ts/components/MessagePlate.vue @@ -67,7 +67,7 @@