diff --git a/hwe/ts/components/MessagePanel.vue b/hwe/ts/components/MessagePanel.vue index 9a188864..b3d9fcd6 100644 --- a/hwe/ts/components/MessagePanel.vue +++ b/hwe/ts/components/MessagePanel.vue @@ -49,6 +49,12 @@ :nationID="nationID" :permissionLevel="permissionLevel" > +
+ + +
@@ -67,6 +73,12 @@ :nationID="nationID" :permissionLevel="permissionLevel" > +
+ + +
@@ -85,6 +97,12 @@ :nationID="nationID" :permissionLevel="permissionLevel" > +
+ + +
@@ -103,6 +121,12 @@ :nationID="nationID" :permissionLevel="permissionLevel" > +
+ + +
@@ -429,6 +453,43 @@ function refreshMailboxList(obj: MabilboxListResponse) { mailboxList.value = [favoriteBox, diplomacyMailboxList, ...nationMailboxList]; } +function foldMessage($event: MouseEvent, type: MsgType) { + const target = messageIndexedList[type].value; + if (target.length < 10) { + return; + } + const remain = target.slice(10); + target.length = 10; + + for(const msg of remain){ + messageStorage.delete(msg.id); + } +} + +async function loadOldMessage($event: MouseEvent, type: MsgType) { + const target = messageIndexedList[type].value; + if (target.length == 0) { + return; + } + const last = target[target.length - 1].id; + + try { + const response = await SammoAPI.Message.GetOldMessage({ + to: last, + type, + }); + updateMsgResponse(response); + } catch (e) { + if (isString(e)) { + toasts.warning({ + title: "이전 메시지 불러오기 실패", + body: e, + }); + } + console.error(e); + } +} + async function sendMessage() { const text = newMessageText.value; if (!text) { @@ -495,9 +556,6 @@ onMounted(async () => { outline-color: gray; } -.PublicTalk { -} - @include media-1000px { .MessagePanel { display: grid; @@ -515,27 +573,36 @@ onMounted(async () => { .PrivateTalk { border-right: 1px solid gray; } + + .only-mobile{ + display: none; + } } -@include media-500px{ - - #msg_submit-col{ +@include media-500px { + #msg_submit-col { order: 2; } #msg_input-col { order: 3; } - .MessageInputForm{ + .MessageInputForm { position: sticky; top: 0px; z-index: 5; } - .stickyAnchor{ + .stickyAnchor { position: relative; top: -68px; visibility: hidden; } + + .d-grid.Actions { + grid-template-columns: 1fr 1fr; + } + + }