summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/DashboardPage.vue
diff options
context:
space:
mode:
authorUdo Walter2018-11-26 20:12:31 +0100
committerUdo Walter2018-11-26 20:12:31 +0100
commit82648439b945cc5d049886f7e79c2f0dd9d14ff9 (patch)
treeebeb33ba47bef73306d004b230726ddad5d16bfa /webapp/src/components/DashboardPage.vue
parent[webapp] small bugfix (diff)
downloadbas-82648439b945cc5d049886f7e79c2f0dd9d14ff9.tar.gz
bas-82648439b945cc5d049886f7e79c2f0dd9d14ff9.tar.xz
bas-82648439b945cc5d049886f7e79c2f0dd9d14ff9.zip
[webapp+server] Add first implementation of a websocket to alert webclients of events
and to synchronize notification across multiple webapp instances of the same user
Diffstat (limited to 'webapp/src/components/DashboardPage.vue')
-rw-r--r--webapp/src/components/DashboardPage.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/src/components/DashboardPage.vue b/webapp/src/components/DashboardPage.vue
index 89c8c0c..53d19be 100644
--- a/webapp/src/components/DashboardPage.vue
+++ b/webapp/src/components/DashboardPage.vue
@@ -65,7 +65,7 @@
<v-spacer></v-spacer>
<v-btn v-if="devMode" icon @click="$store.commit('saveSetting', { name: 'locale', value: settings.locale === 'en' ? 'de' : 'en' })"><v-icon>language</v-icon></v-btn>
<v-btn v-if="devMode" icon @click="$store.commit('saveSetting', { name: 'dark', value: !settings.dark })"><v-icon>invert_colors</v-icon></v-btn>
- <notifications-alerts></notifications-alerts>
+ <notifications-alerts style="margin-right: 20px"></notifications-alerts>
<v-toolbar-items>
<v-menu offset-y>
<v-btn class="user-button" flat slot="activator">
@@ -125,7 +125,8 @@ export default {
drawerTranslateX: 0,
drawerMini: localStorage.getItem('drawerMini') === 'true',
drawerOpen: localStorage.getItem('drawerOpen') !== 'false',
- userFullName: ''
+ userFullName: '',
+ clientCount: 0
}
},
computed: {
@@ -190,6 +191,7 @@ export default {
this.$http.post('/api/logout').then(response => {
this.setLoginRedirect(this.$route.fullPath)
this.$router.push('/login')
+ this.$socket.close()
})
}
},