summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-16 22:48:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-16 22:48:57 +0900
commit32afe77a269f414965373e3c53044c4a94cfeded (patch)
treea0a41922b1f40704c471d0892d403dfcd9f8dbcd /src/client
parentenable-animations --> reduce-motion (diff)
downloadmisskey-32afe77a269f414965373e3c53044c4a94cfeded.tar.gz
misskey-32afe77a269f414965373e3c53044c4a94cfeded.tar.bz2
misskey-32afe77a269f414965373e3c53044c4a94cfeded.zip
自分宛ての投稿をタイムラインで見れるように
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/components/timeline.core.vue6
-rw-r--r--src/client/app/desktop/views/components/timeline.vue2
-rw-r--r--src/client/app/mobile/views/pages/home.timeline.vue6
-rw-r--r--src/client/app/mobile/views/pages/home.vue3
4 files changed, 13 insertions, 4 deletions
diff --git a/src/client/app/desktop/views/components/timeline.core.vue b/src/client/app/desktop/views/components/timeline.core.vue
index 25fd5d36ac..b6b5cca817 100644
--- a/src/client/app/desktop/views/components/timeline.core.vue
+++ b/src/client/app/desktop/views/components/timeline.core.vue
@@ -48,6 +48,7 @@ export default Vue.extend({
case 'local': return (this as any).os.streams.localTimelineStream;
case 'hybrid': return (this as any).os.streams.hybridTimelineStream;
case 'global': return (this as any).os.streams.globalTimelineStream;
+ case 'mentions': return (this as any).os.stream;
}
},
@@ -57,6 +58,7 @@ export default Vue.extend({
case 'local': return 'notes/local-timeline';
case 'hybrid': return 'notes/hybrid-timeline';
case 'global': return 'notes/global-timeline';
+ case 'mentions': return 'notes/mentions';
}
},
@@ -69,7 +71,7 @@ export default Vue.extend({
this.connection = this.stream.getConnection();
this.connectionId = this.stream.use();
- this.connection.on('note', this.onNote);
+ this.connection.on(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
if (this.src == 'home') {
this.connection.on('follow', this.onChangeFollowing);
this.connection.on('unfollow', this.onChangeFollowing);
@@ -81,7 +83,7 @@ export default Vue.extend({
},
beforeDestroy() {
- this.connection.off('note', this.onNote);
+ this.connection.off(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
if (this.src == 'home') {
this.connection.off('follow', this.onChangeFollowing);
this.connection.off('unfollow', this.onChangeFollowing);
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index 8d72016f22..3e51d12883 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -5,6 +5,7 @@
<span :data-active="src == 'local'" @click="src = 'local'" v-if="enableLocalTimeline">%fa:R comments% %i18n:@local%</span>
<span :data-active="src == 'hybrid'" @click="src = 'hybrid'" v-if="enableLocalTimeline">%fa:share-alt% %i18n:@hybrid%</span>
<span :data-active="src == 'global'" @click="src = 'global'">%fa:globe% %i18n:@global%</span>
+ <span :data-active="src == 'mentions'" @click="src = 'mentions'">%fa:at% %i18n:@mentions%</span>
<span :data-active="src == 'list'" @click="src = 'list'" v-if="list">%fa:list% {{ list.title }}</span>
<button @click="chooseList" title="%i18n:@list%">%fa:list%</button>
</header>
@@ -12,6 +13,7 @@
<x-core v-if="src == 'local'" ref="tl" key="local" src="local"/>
<x-core v-if="src == 'hybrid'" ref="tl" key="hybrid" src="hybrid"/>
<x-core v-if="src == 'global'" ref="tl" key="global" src="global"/>
+ <x-core v-if="src == 'mentions'" ref="tl" key="mentions" src="mentions"/>
<mk-user-list-timeline v-if="src == 'list'" ref="tl" :key="list.id" :list="list"/>
</div>
</template>
diff --git a/src/client/app/mobile/views/pages/home.timeline.vue b/src/client/app/mobile/views/pages/home.timeline.vue
index 416b006cd8..d4fcea1f93 100644
--- a/src/client/app/mobile/views/pages/home.timeline.vue
+++ b/src/client/app/mobile/views/pages/home.timeline.vue
@@ -47,6 +47,7 @@ export default Vue.extend({
case 'local': return (this as any).os.streams.localTimelineStream;
case 'hybrid': return (this as any).os.streams.hybridTimelineStream;
case 'global': return (this as any).os.streams.globalTimelineStream;
+ case 'mentions': return (this as any).os.stream;
}
},
@@ -56,6 +57,7 @@ export default Vue.extend({
case 'local': return 'notes/local-timeline';
case 'hybrid': return 'notes/hybrid-timeline';
case 'global': return 'notes/global-timeline';
+ case 'mentions': return 'notes/mentions';
}
},
@@ -68,7 +70,7 @@ export default Vue.extend({
this.connection = this.stream.getConnection();
this.connectionId = this.stream.use();
- this.connection.on('note', this.onNote);
+ this.connection.on(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
if (this.src == 'home') {
this.connection.on('follow', this.onChangeFollowing);
this.connection.on('unfollow', this.onChangeFollowing);
@@ -78,7 +80,7 @@ export default Vue.extend({
},
beforeDestroy() {
- this.connection.off('note', this.onNote);
+ this.connection.off(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
if (this.src == 'home') {
this.connection.off('follow', this.onChangeFollowing);
this.connection.off('unfollow', this.onChangeFollowing);
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index 333ca1a7a1..3150bb02b4 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -6,6 +6,7 @@
<span v-if="src == 'local'">%fa:R comments%%i18n:@local%</span>
<span v-if="src == 'hybrid'">%fa:share-alt%%i18n:@hybrid%</span>
<span v-if="src == 'global'">%fa:globe%%i18n:@global%</span>
+ <span v-if="src == 'mentions'">%fa:at%%i18n:@mentions%</span>
<span v-if="src == 'list'">%fa:list%{{ list.title }}</span>
</span>
<span style="margin-left:8px">
@@ -27,6 +28,7 @@
<span :data-active="src == 'local'" @click="src = 'local'" v-if="enableLocalTimeline">%fa:R comments% %i18n:@local%</span>
<span :data-active="src == 'hybrid'" @click="src = 'hybrid'" v-if="enableLocalTimeline">%fa:share-alt% %i18n:@hybrid%</span>
<span :data-active="src == 'global'" @click="src = 'global'">%fa:globe% %i18n:@global%</span>
+ <span :data-active="src == 'mentions'" @click="src = 'mentions'">%fa:at% %i18n:@mentions%</span>
<template v-if="lists">
<span v-for="l in lists" :data-active="src == 'list' && list == l" @click="src = 'list'; list = l" :key="l.id">%fa:list% {{ l.title }}</span>
</template>
@@ -39,6 +41,7 @@
<x-tl v-if="src == 'local'" ref="tl" key="local" src="local"/>
<x-tl v-if="src == 'hybrid'" ref="tl" key="hybrid" src="hybrid"/>
<x-tl v-if="src == 'global'" ref="tl" key="global" src="global"/>
+ <x-tl v-if="src == 'mentions'" ref="tl" key="mentions" src="mentions"/>
<mk-user-list-timeline v-if="src == 'list'" ref="tl" :key="list.id" :list="list"/>
</div>
</main>