feat: 개인/외교 메시지 수신시 버튼 추가

This commit is contained in:
2023-03-19 12:54:53 +09:00
parent 5eecbfc6f8
commit 69fbbbb51a
2 changed files with 51 additions and 8 deletions
+30 -8
View File
@@ -173,6 +173,8 @@ import MessagePlate from "@/components/MessagePlate.vue";
import { useToast, BFormSelect } from "bootstrap-vue-3";
import { unwrap } from "@/util/unwrap";
import { isBrightColor } from "@/util/isBrightColor";
import { getNewMsgToast } from "@/utilGame/getNewMsgToast";
import { scrollToSelector } from "@/util/scrollToSelector";
const serverID = staticValues.serverID;
const toasts = unwrap(useToast());
@@ -269,10 +271,20 @@ function _updateLatestMsg(msg: MsgItem) {
toasts.remove(toastID);
}
const newToastID = toasts.show(
{
title: "새로운 개인 메시지",
body: "새로운 개인 메시지가 도착했습니다.",
},
getNewMsgToast(
"새로운 개인 메시지",
"새로운 개인 메시지가 도착했습니다.",
(type, e)=>{
if(type === 'goto'){
scrollToSelector('.PrivateTalk > .stickyAnchor')
return;
}
if(type === 'ignore'){
readLatestMsg('private');
return;
}
}
),
{
delay: 1000 * 60 * 10,
variant: 'warning'
@@ -292,10 +304,20 @@ function _updateLatestMsg(msg: MsgItem) {
toasts.remove(toastID);
}
const newToastID = toasts.show(
{
title: "새로운 외교 메시지",
body: "새로운 외교 메시지가 도착했습니다.",
},
getNewMsgToast(
"새로운 외교 메시지",
"새로운 외교 메시지가 도착했습니다.",
(type, e)=>{
if(type === 'goto'){
scrollToSelector('.DiplomacyTalk > .stickyAnchor')
return;
}
if(type === 'ignore'){
readLatestMsg('diplomacy');
return;
}
}
),
{
delay: 1000 * 60 * 10,
variant: 'warning'