feat: notification improvements (#396)
This commit is contained in:
parent
a26cedbdd4
commit
33b0f295f6
9 changed files with 146 additions and 51 deletions
|
@ -1,4 +1,4 @@
|
|||
import type { AccountCredentials, Emoji, Instance, Notification } from 'masto'
|
||||
import type { Account, AccountCredentials, Emoji, Instance, Notification, Status } from 'masto'
|
||||
|
||||
export interface AppInfo {
|
||||
id: string
|
||||
|
@ -26,8 +26,23 @@ export interface ServerInfo extends Instance {
|
|||
|
||||
export interface GroupedNotifications {
|
||||
id: string
|
||||
type: string
|
||||
type: Exclude<string, 'grouped-reblogs-and-favourites'>
|
||||
items: Notification[]
|
||||
}
|
||||
|
||||
export interface GroupedAccountLike {
|
||||
account: Account
|
||||
favourite?: Notification
|
||||
reblog?: Notification
|
||||
}
|
||||
|
||||
export interface GroupedLikeNotifications {
|
||||
id: string
|
||||
type: 'grouped-reblogs-and-favourites'
|
||||
status: Status
|
||||
likes: GroupedAccountLike[]
|
||||
}
|
||||
|
||||
export type NotificationSlot = GroupedNotifications | GroupedLikeNotifications | Notification
|
||||
|
||||
export type TranslateFn = ReturnType<typeof useI18n>['t']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue