parent
c6837b9fdf
commit
362e95263d
1 changed files with 21 additions and 13 deletions
|
@ -18,8 +18,10 @@
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub">
|
<div class="sub">
|
||||||
<button v-if="widgetsEditMode" class="_button edit active" @click="widgetsEditMode = false"><fa :icon="faGripVertical"/></button>
|
<template v-if="$store.getters.isSignedIn">
|
||||||
<button v-else class="_button edit" @click="widgetsEditMode = true"><fa :icon="faGripVertical"/></button>
|
<button v-if="widgetsEditMode" class="_button edit active" @click="widgetsEditMode = false"><fa :icon="faGripVertical"/></button>
|
||||||
|
<button v-else class="_button edit" @click="widgetsEditMode = true"><fa :icon="faGripVertical"/></button>
|
||||||
|
</template>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<fa :icon="faSearch"/>
|
<fa :icon="faSearch"/>
|
||||||
<input type="search" :placeholder="$t('search')" v-model="searchQuery" v-autocomplete="{ model: 'searchQuery' }" :disabled="searchWait" @keypress="searchKeypress"/>
|
<input type="search" :placeholder="$t('search')" v-model="searchQuery" v-autocomplete="{ model: 'searchQuery' }" :disabled="searchWait" @keypress="searchKeypress"/>
|
||||||
|
@ -141,7 +143,7 @@ export default Vue.extend({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
widgets(): any[] {
|
widgets(): any {
|
||||||
if (this.$store.getters.isSignedIn) {
|
if (this.$store.getters.isSignedIn) {
|
||||||
const widgets = this.$store.state.deviceUser.widgets;
|
const widgets = this.$store.state.deviceUser.widgets;
|
||||||
return {
|
return {
|
||||||
|
@ -150,18 +152,24 @@ export default Vue.extend({
|
||||||
mobile: widgets.filter(x => x.place === 'mobile'),
|
mobile: widgets.filter(x => x.place === 'mobile'),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
const right = [{
|
||||||
left: [],
|
name: 'calendar',
|
||||||
right: [{
|
id: 'b', place: 'right', data: {}
|
||||||
|
}, {
|
||||||
|
name: 'trends',
|
||||||
|
id: 'c', place: 'right', data: {}
|
||||||
|
}];
|
||||||
|
|
||||||
|
if (this.$route.name !== 'index') {
|
||||||
|
right.unshift({
|
||||||
name: 'welcome',
|
name: 'welcome',
|
||||||
id: 'a', place: 'right', data: {}
|
id: 'a', place: 'right', data: {}
|
||||||
}, {
|
});
|
||||||
name: 'calendar',
|
}
|
||||||
id: 'b', place: 'right', data: {}
|
|
||||||
}, {
|
return {
|
||||||
name: 'trends',
|
left: [],
|
||||||
id: 'c', place: 'right', data: {}
|
right,
|
||||||
}],
|
|
||||||
mobile: [],
|
mobile: [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue