Fix bug
This commit is contained in:
parent
38dded5061
commit
53f018aae6
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mk-home" v-hotkey.global="keymap">
|
<div class="mk-home" v-hotkey.global="keymap">
|
||||||
<portal to="header">
|
<portal to="header" v-if="showTitle">
|
||||||
<button @click="choose" class="_button _kjvfvyph_">
|
<button @click="choose" class="_button _kjvfvyph_">
|
||||||
<i><fa v-if="$store.state.i.hasUnreadAntenna" :icon="faCircle"/></i>
|
<i><fa v-if="$store.state.i.hasUnreadAntenna" :icon="faCircle"/></i>
|
||||||
<fa v-if="src === 'home'" :icon="faHome"/>
|
<fa v-if="src === 'home'" :icon="faHome"/>
|
||||||
|
@ -35,6 +35,13 @@ export default Vue.extend({
|
||||||
XTimeline
|
XTimeline
|
||||||
},
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
src: 'home',
|
src: 'home',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<component :is="$store.getters.isSignedIn ? 'home' : 'welcome'"></component>
|
<component :is="$store.getters.isSignedIn ? 'home' : 'welcome'" :show-title="showTitle"></component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -12,6 +12,20 @@ export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
Home,
|
Home,
|
||||||
Welcome: () => import('./index.welcome.vue').then(m => m.default),
|
Welcome: () => import('./index.welcome.vue').then(m => m.default),
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTitle: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
activated() {
|
||||||
|
this.showTitle = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
deactivated() {
|
||||||
|
this.showTitle = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -49,5 +49,13 @@ export const router = new VueRouter({
|
||||||
{ path: '/auth/:token', component: () => import('./pages/auth.vue').then(m => m.default) },
|
{ path: '/auth/:token', component: () => import('./pages/auth.vue').then(m => m.default) },
|
||||||
{ path: '/authorize-follow', component: () => import('./pages/follow.vue').then(m => m.default) },
|
{ path: '/authorize-follow', component: () => import('./pages/follow.vue').then(m => m.default) },
|
||||||
/*{ path: '*', component: MkNotFound }*/
|
/*{ path: '*', component: MkNotFound }*/
|
||||||
]
|
],
|
||||||
|
/* なんかバギー
|
||||||
|
scrollBehavior(to, from, savedPosition) {
|
||||||
|
if (savedPosition) {
|
||||||
|
return savedPosition;
|
||||||
|
} else {
|
||||||
|
return { x: 0, y: 0 };
|
||||||
|
}
|
||||||
|
}*/
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue