@@ -22,7 +22,6 @@ | |||||
users: state => state.users.all | users: state => state.users.all | ||||
}), | }), | ||||
...mapState('account', ['locale']), | ...mapState('account', ['locale']), | ||||
...mapState('devices', ['devices']), | |||||
...mapState('system', ['messages', 'detectedTimezone', 'detectedLocale', 'configs']), | ...mapState('system', ['messages', 'detectedTimezone', 'detectedLocale', 'configs']), | ||||
...mapGetters('system', ['dashboardApps']), | ...mapGetters('system', ['dashboardApps']), | ||||
queryApp () { | queryApp () { | ||||
@@ -48,24 +47,13 @@ | |||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
...mapActions('system', ['loadMessages', 'loadTimezones', 'detectTimezone', 'detectLocale']), | |||||
...mapActions('devices', ['getAllDevicesByUserId']) | |||||
...mapActions('system', ['loadMessages', 'loadTimezones', 'detectTimezone', 'detectLocale']) | |||||
}, | }, | ||||
created () { | created () { | ||||
this.loadMessages('post_auth', this.locale); | this.loadMessages('post_auth', this.locale); | ||||
this.loadMessages('apps', this.locale); | this.loadMessages('apps', this.locale); | ||||
this.detectLocale(); | this.detectLocale(); | ||||
this.detectTimezone(); | this.detectTimezone(); | ||||
this.getAllDevicesByUserId({userId: util.currentUser().uuid, messages: this.messages, errors: this.errors}); | |||||
}, | |||||
watch: { | |||||
devices (devs) { | |||||
if (this.configs && this.configs.bubbleNode === true && devs && typeof devs.length !== 'undefined') { | |||||
if (devs.length === 0) { | |||||
this.$router.push('/devices'); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
}; | }; | ||||
</script> | </script> |
@@ -2,7 +2,7 @@ | |||||
<template> | <template> | ||||
<div v-if="network"> | <div v-if="network"> | ||||
<h4 v-if="network.state === 'running' && configs && configs.networkUuid && network.uuid !== configs.networkUuid"> | <h4 v-if="network.state === 'running' && configs && configs.networkUuid && network.uuid !== configs.networkUuid"> | ||||
<a target="_blank" rel="noopener noreferrer" :href="networkAppLoginUrl">{{network.nickname}}</a> - <i>{{messages['msg_network_state_'+network.state]}}</i> | |||||
{{network.nickname}} - <a target="_blank" rel="noopener noreferrer" :href="networkAppLoginUrl">{{messages.message_network_connect.parseMessage({bubbleName: network.nickname})}}</a> | |||||
</h4> | </h4> | ||||
<h4 v-else>{{network.nickname}} - <i>{{messages['msg_network_state_'+network.state]}}</i></h4> | <h4 v-else>{{network.nickname}} - <i>{{messages['msg_network_state_'+network.state]}}</i></h4> | ||||
@@ -4,13 +4,13 @@ | |||||
<totp-modal/> | <totp-modal/> | ||||
<table v-if="status.loggedIn && activated && path && path !== '' && path !== '/'" class="dash-icon-panel"> | <table v-if="status.loggedIn && activated && path && path !== '' && path !== '/'" class="dash-icon-panel"> | ||||
<tr align="center"><td align="center"> | |||||
<router-link to="/" class="icon-dash-cell"> | |||||
<tr class="icon-dash-row"><td> | |||||
<router-link to="/"> | |||||
<span class="icon-dash-title"><i aria-hidden="true" :class="'icon-dash-app '+messages.label_menu_dashboard_icon" :title="messages.label_menu_dashboard"></i><br/>{{messages.label_menu_dashboard}}</span> | <span class="icon-dash-title"><i aria-hidden="true" :class="'icon-dash-app '+messages.label_menu_dashboard_icon" :title="messages.label_menu_dashboard"></i><br/>{{messages.label_menu_dashboard}}</span> | ||||
</router-link> | </router-link> | ||||
</td></tr> | </td></tr> | ||||
<tr v-for="app in dashApps" align="center"><td align="center"> | |||||
<router-link :to="app.href" class="icon-dash-cell"> | |||||
<tr v-for="app in dashApps" class="icon-dash-row"><td> | |||||
<router-link :to="app.href"> | |||||
<span class="icon-dash-title"><i aria-hidden="true" :class="'icon-dash-app '+app.icon" :title="app.title"></i><br/>{{app.title}}</span> | <span class="icon-dash-title"><i aria-hidden="true" :class="'icon-dash-app '+app.icon" :title="app.title"></i><br/>{{app.title}}</span> | ||||
</router-link> | </router-link> | ||||
</td></tr> | </td></tr> | ||||
@@ -83,9 +83,12 @@ | |||||
margin-right: 24pt; | margin-right: 24pt; | ||||
margin-bottom: 24pt; | margin-bottom: 24pt; | ||||
} | } | ||||
.icon-dash-cell { | |||||
.icon-dash-row { | |||||
font-size: xx-large; | font-size: xx-large; | ||||
align-content: center; | align-content: center; | ||||
text-align: center; | |||||
vertical-align: middle; | |||||
position: relative; | |||||
} | } | ||||
.icon-dash-app { | .icon-dash-app { | ||||
font-size: xx-large; | font-size: xx-large; | ||||