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