feat: show `quote` type notification

pull/3435/head
TAKAHASHI Shuuji 2025-11-23 23:32:47 +09:00
rodzic 83d1f5c66c
commit 37ec9e0f73
6 zmienionych plików z 14 dodań i 4 usunięć

Wyświetl plik

@ -25,6 +25,7 @@ const supportedNotificationTypes: NotificationType[] = [
'update',
'status',
'annual_report',
'quote',
]
// well-known emoji reactions types Elk does not support yet
@ -130,7 +131,14 @@ const timeAgo = useTimeAgo(() => notification.createdAt, timeAgoOptions)
</template>
</StatusCard>
</template>
<template v-else-if="notification.type === 'mention' || notification.type === 'poll' || notification.type === 'status'">
<template
v-else-if="
notification.type === 'mention'
|| notification.type === 'poll'
|| notification.type === 'status'
|| notification.type === 'quote'
"
>
<StatusCard :status="notification.status!" />
</template>
<template v-else-if="notification.type === 'annual_report'">

Wyświetl plik

@ -13,7 +13,7 @@ const virtualScroller = false // TODO: fix flickering issue with virtual scroll
const groupCapacity = Number.MAX_VALUE // No limit
const includeNotificationTypes: mastodon.v1.NotificationType[] = ['update', 'mention', 'poll', 'status']
const includeNotificationTypes: mastodon.v1.NotificationType[] = ['update', 'mention', 'poll', 'status', 'quote']
let id = 0

Wyświetl plik

@ -27,7 +27,7 @@ export const STORAGE_KEY_BOTTOM_NAV_BUTTONS = 'elk-bottom-nav-buttons'
export const HANDLED_MASTO_URLS = /^(https?:\/\/)?([\w\-]+\.)+\w+\/(@[@\w\-.]+)(\/objects)?(\/\d+)?$/
export const NOTIFICATION_FILTER_TYPES: mastodon.v1.NotificationType[] = ['status', 'reblog', 'follow', 'follow_request', 'favourite', 'poll', 'update', 'admin.sign_up', 'admin.report']
export const NOTIFICATION_FILTER_TYPES: mastodon.v1.NotificationType[] = ['status', 'reblog', 'follow', 'follow_request', 'favourite', 'poll', 'update', 'admin.sign_up', 'admin.report', 'quote']
export const THEME_COLORS = {
defaultTheme: '#cc7d24',

Wyświetl plik

@ -49,6 +49,7 @@ const filterIconMap: Record<mastodon.v1.NotificationType, string> = {
'admin.report': 'i-ri:flag-line',
'severed_relationships': 'i-ri:user-unfollow-line',
'moderation_warning': 'i-ri:error-warning-line',
'quote': 'i-ri:double-quotes-l',
}
const filterText = computed(() => `${t('tab.notifications_more_tooltip')}${filter.value ? `: ${t(`tab.notifications_${filter.value}`)}` : ''}`)

Wyświetl plik

@ -676,6 +676,7 @@
"notifications_mention": "Mentions",
"notifications_more_tooltip": "Filter notifications by type",
"notifications_poll": "Poll",
"notifications_quote": "Quote",
"notifications_reblog": "Boost",
"notifications_status": "Status",
"notifications_update": "Update",

Wyświetl plik

@ -3,7 +3,7 @@
// I just copy/paste any entry from masto api and convert it to snake case, reusing types not including camel case props
import type { mastodon } from 'masto'
export type NotificationType = 'mention' | 'status' | 'reblog' | 'follow' | 'follow_request' | 'favourite' | 'poll' | 'update' | 'admin.sign_up' | 'admin.report'
export type NotificationType = 'mention' | 'status' | 'reblog' | 'follow' | 'follow_request' | 'favourite' | 'poll' | 'update' | 'admin.sign_up' | 'admin.report' | 'quote'
export interface PushPayload {
access_token: string