diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5edce2d2..d14790f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ We've added some `UnoCSS` utilities styles to help you with that: ## Internationalization -We are using [vue-i18n](https://vue-i18n.intlify.dev/) via [nuxt-i18n](https://v8.i18n.nuxtjs.org/) to handle internationalization. +We are using [vue-i18n](https://vue-i18n.intlify.dev/) via [nuxt-i18n](https://i18n.nuxtjs.org/) to handle internationalization. You can check the current [translation status](https://docs.elk.zone/docs/guide/contributing#translation-status): more instructions on the table caption. diff --git a/components/account/AccountAvatar.vue b/components/account/AccountAvatar.vue index c7f52056..823411ac 100644 --- a/components/account/AccountAvatar.vue +++ b/components/account/AccountAvatar.vue @@ -1,27 +1,32 @@ command ? options.map(tab => ({ - scope: 'Tabs', - name: tab.display, - icon: tab.icon ?? 'i-ri:file-list-2-line', - onActivate: () => router.replace(tab.to), - })) + scope: 'Tabs', + name: tab.display, + icon: tab.icon ?? 'i-ri:file-list-2-line', + onActivate: () => router.replace(tab.to), + })) : []) diff --git a/components/common/CommonTabs.vue b/components/common/CommonTabs.vue index c83c3cd1..75a8b2a2 100644 --- a/components/common/CommonTabs.vue +++ b/components/common/CommonTabs.vue @@ -25,13 +25,13 @@ function toValidName(option: string) { useCommands(() => command ? tabs.value.map(tab => ({ - scope: 'Tabs', + scope: 'Tabs', - name: tab.display, - icon: tab.icon ?? 'i-ri:file-list-2-line', + name: tab.display, + icon: tab.icon ?? 'i-ri:file-list-2-line', - onActivate: () => modelValue.value = tab.name, - })) + onActivate: () => modelValue.value = tab.name, + })) : []) diff --git a/components/modal/ModalContainer.vue b/components/modal/ModalContainer.vue index 07fa1153..bb87ee5c 100644 --- a/components/modal/ModalContainer.vue +++ b/components/modal/ModalContainer.vue @@ -1,5 +1,6 @@ + -defineModel() +const model = defineModel() import type { mastodon } from 'masto' +// Add undocumented 'annual_report' type introduced in v4.3 +// ref. https://github.com/mastodon/documentation/issues/1211#:~:text=api/v1/annual_reports +type NotificationType = mastodon.v1.Notification['type'] | 'annual_report' +type Notification = Omit & { type: NotificationType } + const { notification } = defineProps<{ - notification: mastodon.v1.Notification + notification: Notification }>() const { t } = useI18n() +// list of notification types Elk currently implemented +// type 'favourite' and 'reblog' should always rendered by NotificationGroupedLikes +const supportedNotificationTypes: NotificationType[] = [ + 'follow', + 'admin.sign_up', + 'admin.report', + 'follow_request', + 'update', + 'mention', + 'poll', + 'update', + 'status', + 'annual_report', +] + // well-known emoji reactions types Elk does not support yet const unsupportedEmojiReactionTypes = ['pleroma:emoji_reaction', 'reaction'] -if (unsupportedEmojiReactionTypes.includes(notification.type)) + +if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotificationTypes.includes(notification.type)) { console.warn(`[DEV] ${t('notification.missing_type')} '${notification.type}' (notification.id: ${notification.id})`) +} @@ -95,11 +117,21 @@ if (unsupportedEmojiReactionTypes.includes(notification.type)) - - - - - [DEV] {{ $t('notification.missing_type') }} '{{ notification.type }}' + + + + + + Your 2024 + #Wrapstodon + awaits! Unveil your year's highlights and memorable moments on Mastodon! + + + + View #Wrapstodon on Mastodon + + + diff --git a/components/notification/NotificationPaginator.vue b/components/notification/NotificationPaginator.vue index 6ec7120e..7944be99 100644 --- a/components/notification/NotificationPaginator.vue +++ b/components/notification/NotificationPaginator.vue @@ -1,8 +1,8 @@ - + diff --git a/components/tiptap/TiptapEmojiList.vue b/components/tiptap/TiptapEmojiList.vue index 88234590..a349763e 100644 --- a/components/tiptap/TiptapEmojiList.vue +++ b/components/tiptap/TiptapEmojiList.vue @@ -1,8 +1,8 @@
+ Your 2024 + #Wrapstodon + awaits! Unveil your year's highlights and memorable moments on Mastodon! +
+ + View #Wrapstodon on Mastodon + +