Bladeren bron

show dash icons on left panel

pull/13/head
Jonathan Cobb 4 jaren geleden
bovenliggende
commit
5b3ce47beb
3 gewijzigde bestanden met toevoegingen van 46 en 6 verwijderingen
  1. +4
    -2
      src/_store/account.module.js
  2. +35
    -4
      src/app/App.vue
  3. +7
    -0
      src/index.html

+ 4
- 2
src/_store/account.module.js Bestand weergeven

@@ -67,9 +67,11 @@ const actions = {
}
const landing = util.getLandingPage();
if (landing === null) {
console.log('account.login: no landing page, systemConfigs.bubbleNode=='+systemConfigs.bubbleNode);
if (systemConfigs.bubbleNode === false) {
console.log('account.login: no landing page, systemConfigs.bubbleNode=='+systemConfigs.bubbleNode+', systemConfigs.sageLauncher=='+systemConfigs.sageLauncher);
if (systemConfigs.bubbleNode === false || systemConfigs.sageLauncher === true) {
router.replace('/bubbles');
} else if (systemConfigs.bubbleNode === true) {
router.replace('/devices');
} else {
router.replace('/');
}


+ 35
- 4
src/app/App.vue Bestand weergeven

@@ -3,9 +3,18 @@
<div class="jumbotron">
<totp-modal/>

<router-link v-if="status.loggedIn && activated && path && path !== '' && path !== '/'" to="/" class="icon-dash-cell">
<div 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}}</div>
</router-link>
<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">
<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>
</td></tr>
<tr v-for="app in dashApps" align="center"><td align="center">
<router-link :to="app.href" class="icon-dash-cell">
<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>
</td></tr>
</table>

<div class="container">
<div class="row">
@@ -38,7 +47,7 @@
</template>

<script>
import { mapState, mapActions } from 'vuex'
import {mapState, mapActions, mapGetters} from 'vuex'
import { util } from '../_helpers'

export default {
@@ -55,6 +64,28 @@ export default {
...mapState({
alert: state => state.alert
}),
...mapGetters('system', ['dashboardApps']),
queryApp () {
if (typeof this.$route.query.app !== 'undefined' && this.$route.query.app !== null && this.$route.query.app !== '') {
return this.$route.query.app;
}
return null;
},
dashApps () {
let appView = this.dashboardApps;
const qApp = this.queryApp;
if (qApp !== null) {
const appPath = this.$route.query.app;
for (let i=0; i<appView.length; i++) {
const app = appView[i];
if (app.href === '/?app='+appPath) {
appView = app.apps;
break;
}
}
}
return appView;
},
locales () { return this.configs.locales; },
path () { return this.$route.path; }
},


+ 7
- 0
src/index.html Bestand weergeven

@@ -85,10 +85,17 @@
}
.icon-dash-cell {
font-size: xx-large;
align-content: center;
}
.icon-dash-app {
font-size: xx-large;
}
.dash-icon-panel {
position: fixed;
top: 30px;
left: 30px;
width: auto;
}
.bubble-footer {
font-size: xx-small;
position: fixed;


Laden…
Annuleren
Opslaan