From e2a9a0ff3d00800b5910cd57f4551d8c595a059d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 3 Nov 2020 15:59:13 +0900 Subject: [PATCH] Refactoring --- src/client/ui/_common_/common.vue | 24 +++++++++++++++++++++++- src/client/ui/deck.vue | 23 ----------------------- src/client/ui/default.vue | 21 --------------------- src/client/ui/zen.vue | 21 --------------------- 4 files changed, 23 insertions(+), 66 deletions(-) diff --git a/src/client/ui/_common_/common.vue b/src/client/ui/_common_/common.vue index dea3e30a9..d06cbb986 100644 --- a/src/client/ui/_common_/common.vue +++ b/src/client/ui/_common_/common.vue @@ -15,7 +15,8 @@ diff --git a/src/client/ui/zen.vue b/src/client/ui/zen.vue index e3aa077bd..e76b74d4b 100644 --- a/src/client/ui/zen.vue +++ b/src/client/ui/zen.vue @@ -42,7 +42,6 @@ export default defineComponent({ host: host, pageKey: 0, pageInfo: null, - connection: null, faLayerGroup, faBars, faBell, faHome, faCircle, }; }, @@ -70,9 +69,6 @@ export default defineComponent({ created() { document.documentElement.style.overflowY = 'scroll'; - - this.connection = os.stream.useSharedConnection('main', 'UI'); - this.connection.on('notification', this.onNotification); }, methods: { @@ -94,23 +90,6 @@ export default defineComponent({ onTransition() { if (window._scroll) window._scroll(); }, - - onNotification(notification) { - if (this.$store.state.i.mutingNotificationTypes.includes(notification.type)) { - return; - } - if (document.visibilityState === 'visible') { - os.stream.send('readNotification', { - id: notification.id - }); - - os.popup(import('@/components/toast.vue'), { - notification - }, {}, 'closed'); - } - - os.sound('notification'); - }, } });