diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index dd18c70d7..26729507f 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -50,6 +50,30 @@ export class HomeStream extends Stream { }); }); + this.on('unreadMention', () => { + os.store.dispatch('mergeMe', { + hasUnreadMentions: true + }); + }); + + this.on('readAllUnreadMentions', () => { + os.store.dispatch('mergeMe', { + hasUnreadMentions: false + }); + }); + + this.on('unreadSpecifiedNote', () => { + os.store.dispatch('mergeMe', { + hasUnreadSpecifiedNotes: true + }); + }); + + this.on('readAllUnreadSpecifiedNotes', () => { + os.store.dispatch('mergeMe', { + hasUnreadSpecifiedNotes: false + }); + }); + this.on('clientSettingUpdated', x => { os.store.commit('settings/set', { key: x.key, diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue index fdf41a52c..ac2c1ce97 100644 --- a/src/client/app/desktop/views/components/notes.note.vue +++ b/src/client/app/desktop/views/components/notes.note.vue @@ -213,10 +213,14 @@ export default Vue.extend({ methods: { capture(withHandler = false) { if (this.$store.getters.isSignedIn) { - this.connection.send({ + const data = { type: 'capture', id: this.p.id - }); + } as any; + if ((this.p.visibleUserIds || []).includes(this.$store.state.i.id) || (this.p.mentions || []).includes(this.$store.state.i.id)) { + data.read = true; + } + this.connection.send(data); if (withHandler) this.connection.on('note-updated', this.onStreamNoteUpdated); } }, diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue index 9f421a68e..7d683236b 100644 --- a/src/client/app/desktop/views/components/timeline.vue +++ b/src/client/app/desktop/views/components/timeline.vue @@ -8,8 +8,8 @@ %fa:hashtag% {{ tagTl.title }} %fa:list% {{ list.title }}
- - + +
@@ -202,6 +202,13 @@ root(isDark) line-height 42px color isDark ? #9baec8 : #ccc + > .badge + position absolute + top -4px + right 4px + font-size 10px + color $theme-color + &:hover color isDark ? #b2c1d5 : #aaa diff --git a/src/client/app/desktop/views/pages/deck/deck.note.vue b/src/client/app/desktop/views/pages/deck/deck.note.vue index 980fb0313..99274b0f4 100644 --- a/src/client/app/desktop/views/pages/deck/deck.note.vue +++ b/src/client/app/desktop/views/pages/deck/deck.note.vue @@ -147,10 +147,14 @@ export default Vue.extend({ methods: { capture(withHandler = false) { if (this.$store.getters.isSignedIn) { - this.connection.send({ + const data = { type: 'capture', id: this.p.id - }); + } as any; + if ((this.p.visibleUserIds || []).includes(this.$store.state.i.id) || (this.p.mentions || []).includes(this.$store.state.i.id)) { + data.read = true; + } + this.connection.send(data); if (withHandler) this.connection.on('note-updated', this.onStreamNoteUpdated); } }, diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue index 8787b39a9..0ce72cab1 100644 --- a/src/client/app/mobile/views/components/note.vue +++ b/src/client/app/mobile/views/components/note.vue @@ -160,10 +160,14 @@ export default Vue.extend({ methods: { capture(withHandler = false) { if (this.$store.getters.isSignedIn) { - this.connection.send({ + const data = { type: 'capture', id: this.p.id - }); + } as any; + if ((this.p.visibleUserIds || []).includes(this.$store.state.i.id) || (this.p.mentions || []).includes(this.$store.state.i.id)) { + data.read = true; + } + this.connection.send(data); if (withHandler) this.connection.on('note-updated', this.onStreamNoteUpdated); } }, diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue index c9b3ab51a..15c8299c2 100644 --- a/src/client/app/mobile/views/components/ui.header.vue +++ b/src/client/app/mobile/views/components/ui.header.vue @@ -188,9 +188,6 @@ root(isDark) overflow hidden text-overflow ellipsis - [data-fa], [data-icon] - margin-right 4px - > img display inline-block vertical-align bottom diff --git a/src/client/app/mobile/views/pages/drive.vue b/src/client/app/mobile/views/pages/drive.vue index 27ac95604..c0fc7b48d 100644 --- a/src/client/app/mobile/views/pages/drive.vue +++ b/src/client/app/mobile/views/pages/drive.vue @@ -1,9 +1,9 @@