diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-12-29 11:33:21 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-12-29 11:33:21 +0900 |
| commit | 22049b10ff55da7adc37ba7caaf3d4b722b2f0b5 (patch) | |
| tree | b99162826ea61870aba517aa4de33030a46bda35 /src/client/components | |
| parent | fix ui (diff) | |
| download | sharkey-22049b10ff55da7adc37ba7caaf3d4b722b2f0b5.tar.gz sharkey-22049b10ff55da7adc37ba7caaf3d4b722b2f0b5.tar.bz2 sharkey-22049b10ff55da7adc37ba7caaf3d4b722b2f0b5.zip | |
Improve timeline page
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/timeline.vue | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue index 33e7256325..9a3d3232cf 100644 --- a/src/client/components/timeline.vue +++ b/src/client/components/timeline.vue @@ -115,6 +115,22 @@ export default defineComponent({ endpoint = 'notes/global-timeline'; this.connection = os.stream.useSharedConnection('globalTimeline'); this.connection.on('note', prepend); + } else if (this.src == 'mentions') { + endpoint = 'notes/mentions'; + this.connection = os.stream.useSharedConnection('main'); + this.connection.on('mention', prepend); + } else if (this.src == 'directs') { + endpoint = 'notes/mentions'; + this.query = { + visibility: 'specified' + }; + const onNote = note => { + if (note.visibility == 'specified') { + prepend(note); + } + }; + this.connection = os.stream.useSharedConnection('main'); + this.connection.on('mention', onNote); } else if (this.src == 'list') { endpoint = 'notes/user-list-timeline'; this.query = { |