From d5f92eed8c4b1a42e0b05f9da2fa86dbc17922f4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 May 2018 13:49:09 +0900 Subject: Refactor --- src/client/app/common/scripts/streaming/home.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index 44d07e331a..2715b9e0e9 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -24,10 +24,8 @@ export class HomeStream extends Stream { if (os.debug) { console.log('I updated:', i); } - merge(me, i); - // キャッシュ更新 - os.bakeMe(); + os.store.dispatch('mergeMe', i); }); this.on('clientSettingUpdated', x => { -- cgit v1.2.3-freya From ab16fb3a3fff96a4fa2bc1fc0e56a87c129a4625 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 29 May 2018 01:22:39 +0900 Subject: #1634 --- src/client/app/common/scripts/streaming/home.ts | 24 ++++++++++ .../views/components/ui.header.notifications.vue | 39 +++------------- .../app/mobile/views/components/ui.header.vue | 52 +++++----------------- src/client/app/mobile/views/components/ui.nav.vue | 52 +++++----------------- src/publishers/notify.ts | 8 ++++ src/server/api/common/read-messaging-message.ts | 8 ++++ src/server/api/common/read-notification.ts | 8 ++++ src/server/api/endpoints.ts | 10 ----- src/server/api/endpoints/messaging/messages.ts | 7 --- .../api/endpoints/messaging/messages/create.ts | 7 +++ src/server/api/endpoints/messaging/unread.ts | 29 ------------ .../endpoints/notifications/get_unread_count.ts | 28 ------------ .../endpoints/notifications/mark_as_read_all.ts | 11 +++-- 13 files changed, 92 insertions(+), 191 deletions(-) delete mode 100644 src/server/api/endpoints/messaging/unread.ts delete mode 100644 src/server/api/endpoints/notifications/get_unread_count.ts (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index 2715b9e0e9..50bbb56896 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -28,6 +28,30 @@ export class HomeStream extends Stream { os.store.dispatch('mergeMe', i); }); + this.on('read_all_notifications', () => { + os.store.dispatch('mergeMe', { + hasUnreadNotification: false + }); + }); + + this.on('unread_notification', () => { + os.store.dispatch('mergeMe', { + hasUnreadNotification: true + }); + }); + + this.on('read_all_messaging_messages', () => { + os.store.dispatch('mergeMe', { + hasUnreadMessagingMessage: false + }); + }); + + this.on('unread_messaging_message', () => { + os.store.dispatch('mergeMe', { + hasUnreadMessagingMessage: true + }); + }); + this.on('clientSettingUpdated', x => { os.store.commit('settings/set', { key: x.key, diff --git a/src/client/app/desktop/views/components/ui.header.notifications.vue b/src/client/app/desktop/views/components/ui.header.notifications.vue index 9eaaa62c61..59a16df9ec 100644 --- a/src/client/app/desktop/views/components/ui.header.notifications.vue +++ b/src/client/app/desktop/views/components/ui.header.notifications.vue @@ -1,7 +1,7 @@ @@ -150,4 +153,9 @@ $border-color = rgba(27, 31, 35, 0.15) color $theme-color-foreground background darken($theme-color, 10%) + > div + margin 8px 0 + height 1px + background #eee + diff --git a/src/client/app/common/views/widgets/broadcast.vue b/src/client/app/common/views/widgets/broadcast.vue index f337cec853..69b2a54fe9 100644 --- a/src/client/app/common/views/widgets/broadcast.vue +++ b/src/client/app/common/views/widgets/broadcast.vue @@ -2,7 +2,7 @@
diff --git a/src/client/app/common/views/widgets/calendar.vue b/src/client/app/common/views/widgets/calendar.vue index 0e9714960a..333b56f629 100644 --- a/src/client/app/common/views/widgets/calendar.vue +++ b/src/client/app/common/views/widgets/calendar.vue @@ -1,5 +1,5 @@
+
@@ -67,7 +67,7 @@ export default define({ }, methods: { func() { - if (this.isMobile) return; + if (this.platform == 'mobile') return; if (this.props.design == 2) { this.props.design = 0; } else { diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue index 75f5db808a..470576d5e6 100644 --- a/src/client/app/common/views/widgets/donation.vue +++ b/src/client/app/common/views/widgets/donation.vue @@ -1,5 +1,5 @@