Request notification permission on start

This commit is contained in:
Lncvrt committed 2026-03-25 18:07:57 -07:00
1 parent 43a3c436f4
commit ef3674935f
1 file changed
+6
+6
View File
@@ -9,6 +9,10 @@ import { useEffect, useState } from 'react'
import { fetch } from '@tauri-apps/plugin-http'
import { app } from '@tauri-apps/api'
import LauncherManifest from '@/types/LauncherManifest'
import {
isPermissionGranted,
requestPermission
} from '@tauri-apps/plugin-notification'
const roboto = Roboto({
variable: '--font-roboto',
@@ -55,6 +59,8 @@ export default function RootLayout ({
return
}
if (!(await isPermissionGranted())) await requestPermission()
setLoading(3)
})()
}, [])