From e4af16989a332adfc56fdc2ac7a8726e53413bfd Mon Sep 17 00:00:00 2001 From: syuilo <Syuilotan@yahoo.co.jp> Date: Tue, 18 Feb 2020 01:25:02 +0900 Subject: [PATCH] Fix bug --- src/client/app.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/app.vue b/src/client/app.vue index 9099b01c8a..a23b6e1289 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -44,7 +44,10 @@ <mk-avatar :user="$store.state.i" class="avatar"/><mk-acct class="text" :user="$store.state.i"/> </button> <div class="divider"></div> - <router-link class="item index" active-class="active" to="/" exact @click.native="$route.path === '/' ? top() : () => {}"> + <button class="item _button index active" @click="top()" v-if="$route.name === 'index'"> + <fa :icon="faHome" fixed-width/><span class="text">{{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }}</span> + </button> + <router-link class="item index" active-class="active" to="/" exact v-else> <fa :icon="faHome" fixed-width/><span class="text">{{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }}</span> </router-link> <button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.getters.isSignedIn"> @@ -137,8 +140,9 @@ </div> <div class="buttons"> - <button v-if="$store.getters.isSignedIn" class="button nav _button" @click="showNav = true" ref="navButton"><fa :icon="faBars"/><i v-if="$store.state.i.hasUnreadSpecifiedNotes || $store.state.i.hasPendingReceivedFollowRequest || $store.state.i.hasUnreadMessagingMessage || $store.state.i.hasUnreadAnnouncement"><fa :icon="faCircle"/></i></button> - <button v-if="$store.getters.isSignedIn" class="button home _button" @click="$route.path === '/' ? top() : $router.push('/')"><fa :icon="faHome"/></button> + <button class="button nav _button" @click="showNav = true" ref="navButton"><fa :icon="faBars"/><i v-if="$store.getters.isSignedIn && ($store.state.i.hasUnreadSpecifiedNotes || $store.state.i.hasPendingReceivedFollowRequest || $store.state.i.hasUnreadMessagingMessage || $store.state.i.hasUnreadAnnouncement)"><fa :icon="faCircle"/></i></button> + <button v-if="$route.name === 'index'" class="button home _button" @click="top()"><fa :icon="faHome"/></button> + <button v-else class="button home _button" @click="$router.push('/')"><fa :icon="faHome"/></button> <button v-if="$store.getters.isSignedIn" class="button notifications _button" @click="notificationsOpen = !notificationsOpen" ref="notificationButton2"><fa :icon="notificationsOpen ? faTimes : faBell"/><i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i></button> <button v-if="$store.getters.isSignedIn" class="button post _buttonPrimary" @click="post()"><fa :icon="faPencilAlt"/></button> </div>