forked from FoundKeyGang/FoundKey
Resolve #5949
This commit is contained in:
parent
b4d24f4377
commit
5dc0944fe8
2 changed files with 12 additions and 6 deletions
|
@ -1,6 +1,11 @@
|
||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
unreleased
|
||||||
|
-------------------
|
||||||
|
### ✨Improvements
|
||||||
|
* タイムラインの一番上までスクロールできるように
|
||||||
|
|
||||||
12.12.0 (2020/02/17)
|
12.12.0 (2020/02/17)
|
||||||
-------------------
|
-------------------
|
||||||
### ✨Improvements
|
### ✨Improvements
|
||||||
|
|
|
@ -44,11 +44,8 @@
|
||||||
<mk-avatar :user="$store.state.i" class="avatar"/><mk-acct class="text" :user="$store.state.i"/>
|
<mk-avatar :user="$store.state.i" class="avatar"/><mk-acct class="text" :user="$store.state.i"/>
|
||||||
</button>
|
</button>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<router-link class="item index" active-class="active" to="/" exact v-if="$store.getters.isSignedIn">
|
<router-link class="item index" active-class="active" to="/" exact @click.native="$route.path === '/' ? top() : () => {}">
|
||||||
<fa :icon="faHome" fixed-width/><span class="text">{{ $t('timeline') }}</span>
|
<fa :icon="faHome" fixed-width/><span class="text">{{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }}</span>
|
||||||
</router-link>
|
|
||||||
<router-link class="item index" active-class="active" to="/" exact v-else>
|
|
||||||
<fa :icon="faHome" fixed-width/><span class="text">{{ $t('home') }}</span>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.getters.isSignedIn">
|
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.getters.isSignedIn">
|
||||||
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||||
|
@ -141,7 +138,7 @@
|
||||||
|
|
||||||
<div class="buttons">
|
<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 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" :disabled="$route.path === '/'" @click="$router.push('/')"><fa :icon="faHome"/></button>
|
<button v-if="$store.getters.isSignedIn" class="button home _button" @click="$route.path === '/' ? top() : $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 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>
|
<button v-if="$store.getters.isSignedIn" class="button post _buttonPrimary" @click="post()"><fa :icon="faPencilAlt"/></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -321,6 +318,10 @@ export default Vue.extend({
|
||||||
setTimeout(adjust, 100);
|
setTimeout(adjust, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
top() {
|
||||||
|
window.scroll({ top: 0, behavior: 'smooth' });
|
||||||
|
},
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
this.$router.push('/docs/keyboard-shortcut');
|
this.$router.push('/docs/keyboard-shortcut');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue