chore(deps): update lint (#1928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
2838e18ff7
commit
3c43a1cdd1
62 changed files with 464 additions and 434 deletions
|
@ -1,9 +1,7 @@
|
|||
import { closeDatabases, get } from '../utils/elk-idb'
|
||||
import type { MastoNotification, NotificationInfo, PushPayload, UserLogin } from './types'
|
||||
|
||||
export const findNotification = async (
|
||||
{ access_token, notification_id/* , notification_type */ }: PushPayload,
|
||||
): Promise<NotificationInfo | undefined> => {
|
||||
export async function findNotification({ access_token, notification_id/* , notification_type */ }: PushPayload): Promise<NotificationInfo | undefined> {
|
||||
const users = await get<UserLogin[]>('elk-users')
|
||||
if (!users)
|
||||
return undefined
|
||||
|
|
|
@ -13,7 +13,7 @@ self.addEventListener('message', (event) => {
|
|||
clientResolves[id]()
|
||||
})
|
||||
|
||||
export const onShareTarget = (event: FetchEvent) => {
|
||||
export function onShareTarget(event: FetchEvent) {
|
||||
if (!event.request.url.endsWith('/web-share-target') || event.request.method !== 'POST')
|
||||
return
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ self.addEventListener('message', (event) => {
|
|||
closeDatabaseConnections()
|
||||
})
|
||||
|
||||
export const onPush = (event: PushEvent) => {
|
||||
export function onPush(event: PushEvent) {
|
||||
const promise = isClientFocused().then((isFocused) => {
|
||||
if (isFocused)
|
||||
return Promise.resolve()
|
||||
|
@ -35,7 +35,7 @@ export const onPush = (event: PushEvent) => {
|
|||
event.waitUntil(promise)
|
||||
}
|
||||
|
||||
export const onNotificationClick = (event: NotificationEvent) => {
|
||||
export function onNotificationClick(event: NotificationEvent) {
|
||||
const reactToNotificationClick = new Promise((resolve) => {
|
||||
event.notification.close()
|
||||
resolve(openUrl(event.notification.data.url))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue