diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index dd18c70d70..26729507fb 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 fdf41a52c9..ac2c1ce97f 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 9f421a68ed..7d683236bb 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 980fb03136..99274b0f41 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 8787b39a93..0ce72cab11 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 c9b3ab51ae..15c8299c2e 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 27ac956043..c0fc7b48dc 100644 --- a/src/client/app/mobile/views/pages/drive.vue +++ b/src/client/app/mobile/views/pages/drive.vue @@ -1,9 +1,9 @@