summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2018-04-15 20:50:53 +0900
committerGitHub <noreply@github.com>2018-04-15 20:50:53 +0900
commit7df6419208f43c94ea5e493ba3066e21cc01b0a3 (patch)
tree63e3b10d9c1ef8968e8f17c5669636b78f72084b /src/client
parentUpdate timeline.vue (diff)
downloadmisskey-7df6419208f43c94ea5e493ba3066e21cc01b0a3.tar.gz
misskey-7df6419208f43c94ea5e493ba3066e21cc01b0a3.tar.bz2
misskey-7df6419208f43c94ea5e493ba3066e21cc01b0a3.zip
Update timeline.vue
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/components/timeline.vue11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index cdedbac19f..266abd64a8 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -5,11 +5,11 @@
<mk-ellipsis-icon/>
</div>
<p class="empty" v-if="notes.length == 0 && !fetching">
- %fa:R comments%自分の投稿や、自分がフォローしているユーザーの投稿が表示されます。
+ %fa:R comments%%i18n:@empty%
</p>
<mk-notes :notes="notes" ref="timeline">
<button slot="footer" @click="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
- <template v-if="!moreFetching">もっと見る</template>
+ <template v-if="!moreFetching">%i18n:@load-more%</template>
<template v-if="moreFetching">%fa:spinner .pulse .fw%</template>
</button>
</mk-notes>
@@ -29,7 +29,8 @@ export default Vue.extend({
notes: [],
connection: null,
connectionId: null,
- date: null
+ date: null,
+ isTop: true
};
},
computed: {
@@ -101,7 +102,7 @@ export default Vue.extend({
sound.play();
}
- this.notes.pop();
+ if(isTop) this.notes.pop();
this.notes.unshift(note);
},
onChangeFollowing() {
@@ -112,6 +113,8 @@ export default Vue.extend({
const current = window.scrollY + window.innerHeight;
if (current > document.body.offsetHeight - 8) this.more();
}
+ if (window.scrollY > 100) this.isTop = false;
+ else this.isTop = true;
},
onKeydown(e) {
if (e.target.tagName != 'INPUT' && e.target.tagName != 'TEXTAREA') {