diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-11 18:08:26 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-11 18:08:26 +0900 |
| commit | bd79352e8005bd8fe0ffa846e3318bc49b3fdd36 (patch) | |
| tree | 5a6a266ae92587c654d0089d493dc57a0ac3903e /src/web/app/desktop | |
| parent | #1231 (diff) | |
| download | sharkey-bd79352e8005bd8fe0ffa846e3318bc49b3fdd36.tar.gz sharkey-bd79352e8005bd8fe0ffa846e3318bc49b3fdd36.tar.bz2 sharkey-bd79352e8005bd8fe0ffa846e3318bc49b3fdd36.zip | |
#1204
Diffstat (limited to 'src/web/app/desktop')
| -rw-r--r-- | src/web/app/desktop/views/components/ui.header.nav.vue | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/web/app/desktop/views/components/ui.header.nav.vue b/src/web/app/desktop/views/components/ui.header.nav.vue index 54045db8d4..7582e8afce 100644 --- a/src/web/app/desktop/views/components/ui.header.nav.vue +++ b/src/web/app/desktop/views/components/ui.header.nav.vue @@ -56,6 +56,8 @@ export default Vue.extend({ 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 messaging messages (this as any).api('messaging/unread').then(res => { @@ -69,16 +71,26 @@ export default Vue.extend({ if ((this as any).os.isSignedIn) { 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); } }, methods: { + onUnreadMessagingMessage() { + this.hasUnreadMessagingMessages = true; + }, + onReadAllMessagingMessages() { this.hasUnreadMessagingMessages = false; }, - onUnreadMessagingMessage() { - this.hasUnreadMessagingMessages = true; + onOthelloInvited() { + this.hasGameInvitations = true; + }, + + onOthelloNoInvites() { + this.hasGameInvitations = false; }, messaging() { |