diff --git a/.eslintrc.js b/.eslintrc.js index 4ec97f71..3cc7b749 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -33,6 +33,7 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', camelcase: 'off', '@typescript-eslint/camelcase': 'off', - 'space-before-function-paren': 'off' + 'space-before-function-paren': 'off', + 'vue/multi-word-component-names': 'off' } } diff --git a/src/renderer/components/organisms/Notification.vue b/src/renderer/components/organisms/Notification.vue index 06bc955e..c936b3ae 100644 --- a/src/renderer/components/organisms/Notification.vue +++ b/src/renderer/components/organisms/Notification.vue @@ -6,8 +6,8 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - reactionType="favourite" - @focusRight="$emit('focusRight')" + reaction-type="favourite" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -16,7 +16,7 @@ :message="message" :focused="focused" :overlaid="overlaid" - @focusRight="$emit('focusRight')" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -25,7 +25,7 @@ :message="message" :focused="focused" :overlaid="overlaid" - @focusRight="$emit('focusRight')" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -35,9 +35,9 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - v-on:update="updateToot" - v-on:delete="deleteToot" - @focusRight="$emit('focusRight')" + @update="updateToot" + @delete="deleteToot" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -47,8 +47,8 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - reactionType="quote" - @focusRight="$emit('focusRight')" + reaction-type="quote" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -58,8 +58,8 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - reactionType="reblog" - @focusRight="$emit('focusRight')" + reaction-type="reblog" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -69,7 +69,7 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - @focusRight="$emit('focusRight')" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -79,8 +79,8 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - reactionType="poll-vote" - @focusRight="$emit('focusRight')" + reaction-type="poll-vote" + @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -90,8 +90,19 @@ :filters="filters" :focused="focused" :overlaid="overlaid" - reactionType="poll-expired" - @focusRight="$emit('focusRight')" + reaction-type="poll-expired" + @focus-right="$emit('focusRight')" + @select="$emit('selectNotification')" + > + + @@ -108,25 +119,7 @@ import Mention from './Notification/Mention.vue' import Status from './Notification/Status.vue' export default defineComponent({ - name: 'notification', - props: { - message: { - type: Object as PropType, - default: {} - }, - filters: { - type: Array as PropType>, - default: [] - }, - focused: { - type: Boolean, - defalt: false - }, - overlaid: { - type: Boolean, - default: false - } - }, + name: 'Notification', components: { StatusReaction, Follow, @@ -134,6 +127,25 @@ export default defineComponent({ Mention, Status }, + props: { + message: { + type: Object as PropType, + default: () => ({}) + }, + filters: { + type: Array as PropType>, + default: () => [] + }, + focused: { + type: Boolean, + defalt: () => false + }, + overlaid: { + type: Boolean, + default: () => false + } + }, + emits: ['focusRight', 'selectNotification', 'update', 'delete'], setup(_props, ctx) { const updateToot = (message: Entity.Status) => { return ctx.emit('update', message) diff --git a/src/renderer/components/organisms/Notification/StatusReaction.vue b/src/renderer/components/organisms/Notification/StatusReaction.vue index 5680b0df..32d4f6dd 100644 --- a/src/renderer/components/organisms/Notification/StatusReaction.vue +++ b/src/renderer/components/organisms/Notification/StatusReaction.vue @@ -183,7 +183,7 @@ export default defineComponent({ return 'notification.poll_vote.body' case 'quote': return 'notification.quote.body' - case 'reaction': + case 'emoji-reaction': return 'notification.reaction.body' case 'reblog': return 'notification.reblog.body'