Merge pull request #3557 from h3poteto/fix/emoji-reaction
[fix] Display emoji reaction notifications in notifications timeline
This commit is contained in:
commit
803b67167a
|
@ -33,6 +33,7 @@ module.exports = {
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
camelcase: 'off',
|
camelcase: 'off',
|
||||||
'@typescript-eslint/camelcase': 'off',
|
'@typescript-eslint/camelcase': 'off',
|
||||||
'space-before-function-paren': 'off'
|
'space-before-function-paren': 'off',
|
||||||
|
'vue/multi-word-component-names': 'off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
reactionType="favourite"
|
reaction-type="favourite"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</StatusReaction>
|
</StatusReaction>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
:message="message"
|
:message="message"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</follow>
|
</follow>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
:message="message"
|
:message="message"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</FollowRequest>
|
</FollowRequest>
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
v-on:update="updateToot"
|
@update="updateToot"
|
||||||
v-on:delete="deleteToot"
|
@delete="deleteToot"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</mention>
|
</mention>
|
||||||
|
@ -47,8 +47,8 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
reactionType="quote"
|
reaction-type="quote"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</StatusReaction>
|
</StatusReaction>
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
reactionType="reblog"
|
reaction-type="reblog"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</StatusReaction>
|
</StatusReaction>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</status>
|
</status>
|
||||||
|
@ -79,8 +79,8 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
reactionType="poll-vote"
|
reaction-type="poll-vote"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</StatusReaction>
|
</StatusReaction>
|
||||||
|
@ -90,8 +90,19 @@
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
:focused="focused"
|
:focused="focused"
|
||||||
:overlaid="overlaid"
|
:overlaid="overlaid"
|
||||||
reactionType="poll-expired"
|
reaction-type="poll-expired"
|
||||||
@focusRight="$emit('focusRight')"
|
@focus-right="$emit('focusRight')"
|
||||||
|
@select="$emit('selectNotification')"
|
||||||
|
>
|
||||||
|
</StatusReaction>
|
||||||
|
<StatusReaction
|
||||||
|
v-else-if="message.type === 'emoji_reaction'"
|
||||||
|
:message="message"
|
||||||
|
:filters="filters"
|
||||||
|
:focused="focused"
|
||||||
|
:overlaid="overlaid"
|
||||||
|
reaction-type="emoji-reaction"
|
||||||
|
@focus-right="$emit('focusRight')"
|
||||||
@select="$emit('selectNotification')"
|
@select="$emit('selectNotification')"
|
||||||
>
|
>
|
||||||
</StatusReaction>
|
</StatusReaction>
|
||||||
|
@ -108,25 +119,7 @@ import Mention from './Notification/Mention.vue'
|
||||||
import Status from './Notification/Status.vue'
|
import Status from './Notification/Status.vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'notification',
|
name: 'Notification',
|
||||||
props: {
|
|
||||||
message: {
|
|
||||||
type: Object as PropType<Entity.Notification>,
|
|
||||||
default: {}
|
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
type: Array as PropType<Array<Entity.Filter>>,
|
|
||||||
default: []
|
|
||||||
},
|
|
||||||
focused: {
|
|
||||||
type: Boolean,
|
|
||||||
defalt: false
|
|
||||||
},
|
|
||||||
overlaid: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
StatusReaction,
|
StatusReaction,
|
||||||
Follow,
|
Follow,
|
||||||
|
@ -134,6 +127,25 @@ export default defineComponent({
|
||||||
Mention,
|
Mention,
|
||||||
Status
|
Status
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
message: {
|
||||||
|
type: Object as PropType<Entity.Notification>,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
type: Array as PropType<Array<Entity.Filter>>,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
focused: {
|
||||||
|
type: Boolean,
|
||||||
|
defalt: () => false
|
||||||
|
},
|
||||||
|
overlaid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emits: ['focusRight', 'selectNotification', 'update', 'delete'],
|
||||||
setup(_props, ctx) {
|
setup(_props, ctx) {
|
||||||
const updateToot = (message: Entity.Status) => {
|
const updateToot = (message: Entity.Status) => {
|
||||||
return ctx.emit('update', message)
|
return ctx.emit('update', message)
|
||||||
|
|
|
@ -183,7 +183,7 @@ export default defineComponent({
|
||||||
return 'notification.poll_vote.body'
|
return 'notification.poll_vote.body'
|
||||||
case 'quote':
|
case 'quote':
|
||||||
return 'notification.quote.body'
|
return 'notification.quote.body'
|
||||||
case 'reaction':
|
case 'emoji-reaction':
|
||||||
return 'notification.reaction.body'
|
return 'notification.reaction.body'
|
||||||
case 'reblog':
|
case 'reblog':
|
||||||
return 'notification.reblog.body'
|
return 'notification.reblog.body'
|
||||||
|
|
Loading…
Reference in New Issue