Add version number to settings page

This commit is contained in:
2025-12-20 14:35:23 -07:00
parent 50d64b2905
commit cc79eb6d4a
10 changed files with 100 additions and 66 deletions

View File

@@ -0,0 +1,17 @@
import {
isPermissionGranted,
requestPermission,
sendNotification
} from '@tauri-apps/plugin-notification'
export async function notifyUser (title: string, body: string) {
let permissionGranted = await isPermissionGranted()
if (!permissionGranted) {
const permission = await requestPermission()
permissionGranted = permission === 'granted'
}
if (permissionGranted) {
sendNotification({ title, body })
}
}