feat: お知らせの確認待機時間・優先順位機能
b7fd6bf33a835fd73c2a86eb007074d3680f6efd によるリワーク This reverts commiteeef3965b7
This reverts commit04fefb2056
This reverts commit576251200f
This commit is contained in:
parent
3c2b83c3ae
commit
6893e5d60b
27 changed files with 832 additions and 264 deletions
|
@ -89,15 +89,6 @@ export async function mainBoot() {
|
|||
}, {}, 'closed');
|
||||
}
|
||||
|
||||
stream.on('announcementCreated', (ev) => {
|
||||
const announcement = ev.announcement;
|
||||
if (announcement.display === 'dialog') {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkAnnouncementDialog.vue')), {
|
||||
announcement,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
});
|
||||
|
||||
if ($i.isDeleted) {
|
||||
alert({
|
||||
type: 'warning',
|
||||
|
@ -224,6 +215,20 @@ export async function mainBoot() {
|
|||
updateAccount(i);
|
||||
});
|
||||
|
||||
main.on('announcementCreated', (ev) => {
|
||||
const announcement = ev.announcement;
|
||||
updateAccount({
|
||||
hasUnreadAnnouncement: true,
|
||||
unreadAnnouncements: [...($i?.unreadAnnouncements ?? []), announcement],
|
||||
});
|
||||
|
||||
if (announcement.display === 'dialog') {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkAnnouncementDialog.vue')), {
|
||||
announcement,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
});
|
||||
|
||||
main.on('readAllNotifications', () => {
|
||||
updateAccount({ hasUnreadNotification: false });
|
||||
});
|
||||
|
@ -257,8 +262,25 @@ export async function mainBoot() {
|
|||
sound.play('antenna');
|
||||
});
|
||||
|
||||
stream.on('announcementCreated', (ev) => {
|
||||
const announcement = ev.announcement;
|
||||
updateAccount({
|
||||
hasUnreadAnnouncement: true,
|
||||
unreadAnnouncements: [...($i?.unreadAnnouncements ?? []), announcement],
|
||||
});
|
||||
|
||||
if (announcement.display === 'dialog') {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkAnnouncementDialog.vue')), {
|
||||
announcement,
|
||||
}, {}, 'closed');
|
||||
}
|
||||
});
|
||||
|
||||
main.on('readAllAnnouncements', () => {
|
||||
updateAccount({ hasUnreadAnnouncement: false });
|
||||
updateAccount({
|
||||
hasUnreadAnnouncement: false,
|
||||
unreadAnnouncements: [],
|
||||
});
|
||||
});
|
||||
|
||||
// トークンが再生成されたとき
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue