mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 22:15:12 +00:00
parent
fb4a921cd9
commit
c4efbdf4c7
4 changed files with 11 additions and 6 deletions
|
@ -124,11 +124,16 @@ init(async (launch, os) => {
|
|||
require('./views/components');
|
||||
require('./views/widgets');
|
||||
|
||||
os.store.commit('device/set', {
|
||||
key: 'inDeckMode',
|
||||
value: os.store.getters.isSignedIn && os.store.state.device.deckMode && document.location.pathname === '/'
|
||||
});
|
||||
|
||||
// Init router
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
os.store.getters.isSignedIn && os.store.state.device.deckMode && document.location.pathname === '/'
|
||||
os.store.state.device.inDeckMode
|
||||
? { path: '/', name: 'index', component: MkDeck, children: [
|
||||
{ path: '/@:user', name: 'user', component: () => import('./views/deck/deck.user-column.vue').then(m => m.default), children: [
|
||||
{ path: '', name: 'user', component: () => import('./views/deck/deck.user-column.home.vue').then(m => m.default) },
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<li @click="toggleDeckMode">
|
||||
<p>
|
||||
<span>{{ $t('@.deck') }}</span>
|
||||
<template v-if="$store.state.device.deckMode"><i><fa :icon="faHome"/></i></template>
|
||||
<template v-if="$store.state.device.inDeckMode"><i><fa :icon="faHome"/></i></template>
|
||||
<template v-else><i><fa :icon="faColumns"/></i></template>
|
||||
</p>
|
||||
</li>
|
||||
|
@ -165,7 +165,7 @@ export default Vue.extend({
|
|||
});
|
||||
},
|
||||
toggleDeckMode() {
|
||||
this.$store.commit('device/set', { key: 'deckMode', value: !this.$store.state.device.deckMode });
|
||||
this.$store.commit('device/set', { key: 'deckMode', value: !this.$store.state.device.inDeckMode });
|
||||
location.reload();
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="nav">
|
||||
<ul>
|
||||
<li v-if="!$store.state.device.deckMode" class="timeline" :class="{ active: $route.name == 'index' }" @click="goToTop">
|
||||
<li v-if="!$store.state.device.inDeckMode" class="timeline" :class="{ active: $route.name == 'index' }" @click="goToTop">
|
||||
<router-link to="/"><fa icon="home"/><p>{{ $t('@.timeline') }}</p></router-link>
|
||||
</li>
|
||||
<li class="featured" :class="{ active: $route.name == 'featured' }">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
|
||||
<div class="nav" v-if="$store.getters.isSignedIn">
|
||||
<template v-if="!$store.state.device.deckMode">
|
||||
<template v-if="!$store.state.device.inDeckMode">
|
||||
<div class="home" :class="{ active: $route.name == 'index' }" @click="goToTop">
|
||||
<router-link to="/"><fa icon="home"/></router-link>
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@
|
|||
</router-link>
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="$store.state.device.deckMode">
|
||||
<template v-if="$store.state.device.inDeckMode">
|
||||
<a @click="toggleDeckMode(false)"><fa icon="home"/></a>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
|
Loading…
Reference in a new issue