From bd79352e8005bd8fe0ffa846e3318bc49b3fdd36 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 11 Mar 2018 18:08:26 +0900 Subject: #1204 --- src/web/app/mobile/views/components/ui.header.vue | 13 ++++++++++++- src/web/app/mobile/views/components/ui.nav.vue | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src/web/app/mobile') diff --git a/src/web/app/mobile/views/components/ui.header.vue b/src/web/app/mobile/views/components/ui.header.vue index f06a35fe76..1ccbd5c951 100644 --- a/src/web/app/mobile/views/components/ui.header.vue +++ b/src/web/app/mobile/views/components/ui.header.vue @@ -6,7 +6,7 @@

おかえりなさい、{{ os.i.name }}さん

- +

Misskey

@@ -26,6 +26,7 @@ export default Vue.extend({ return { hasUnreadNotifications: false, hasUnreadMessagingMessages: false, + hasGameInvitations: false, connection: null, connectionId: null }; @@ -39,6 +40,8 @@ export default Vue.extend({ this.connection.on('unread_notification', this.onUnreadNotification); this.connection.on('read_all_messaging_messages', this.onReadAllMessagingMessages); this.connection.on('unread_messaging_message', this.onUnreadMessagingMessage); + this.connection.on('othello_invited', this.onOthelloInvited); + this.connection.on('othello_no_invites', this.onOthelloNoInvites); // Fetch count of unread notifications (this as any).api('notifications/get_unread_count').then(res => { @@ -107,6 +110,8 @@ export default Vue.extend({ this.connection.off('unread_notification', this.onUnreadNotification); this.connection.off('read_all_messaging_messages', this.onReadAllMessagingMessages); this.connection.off('unread_messaging_message', this.onUnreadMessagingMessage); + this.connection.off('othello_invited', this.onOthelloInvited); + this.connection.off('othello_no_invites', this.onOthelloNoInvites); (this as any).os.stream.dispose(this.connectionId); } }, @@ -122,6 +127,12 @@ export default Vue.extend({ }, onUnreadMessagingMessage() { this.hasUnreadMessagingMessages = true; + }, + onOthelloInvited() { + this.hasGameInvitations = true; + }, + onOthelloNoInvites() { + this.hasGameInvitations = false; } } }); diff --git a/src/web/app/mobile/views/components/ui.nav.vue b/src/web/app/mobile/views/components/ui.nav.vue index ba35a2783d..b8bc2fb040 100644 --- a/src/web/app/mobile/views/components/ui.nav.vue +++ b/src/web/app/mobile/views/components/ui.nav.vue @@ -18,7 +18,7 @@
  • %fa:home%%i18n:mobile.tags.mk-ui-nav.home%%fa:angle-right%
  • %fa:R bell%%i18n:mobile.tags.mk-ui-nav.notifications%%fa:angle-right%
  • %fa:R comments%%i18n:mobile.tags.mk-ui-nav.messaging%%fa:angle-right%
  • -
  • %fa:gamepad%ゲーム%fa:angle-right%
  • +
  • %fa:gamepad%ゲーム%fa:angle-right%