chore: update nuxt to 3.11.0 (#2692)

This commit is contained in:
Joaquín Sánchez 2024-03-17 15:32:02 +01:00 committed by GitHub
parent 21d5633233
commit ded2e0f3d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1434 additions and 1356 deletions

View file

@ -60,6 +60,8 @@ export function createNotificationOptions(
icon,
lang: preferred_locale,
tag: notification_id,
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
timestamp: new Date().getTime(),
}
@ -70,8 +72,11 @@ export function createNotificationOptions(
if (notification.account.avatar_static)
notificationOptions.icon = notification.account.avatar_static
*/
if (notification.created_at)
if (notification.created_at) {
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
notificationOptions.timestamp = new Date(notification.created_at).getTime()
}
/* TODO: add spolier when actions available, checking also notification type
if (notification.status && (notification.status.spoilerText || notification.status.sensitive)) {
@ -83,8 +88,11 @@ export function createNotificationOptions(
*/
if (notification.status) {
// notificationOptions.body = htmlToPlainText(notification.status.content)
if (notification.status.media_attachments && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url)
if (notification.status.media_attachments && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url) {
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error missing type, just ignore
notificationOptions.image = notification.status.media_attachments[0].preview_url
}
if (notification.type === 'favourite' || notification.type === 'reblog' || notification.type === 'mention')
notificationOptions.data.url = `${user.server}/@${user.account.username}/${notification.status.id}`