(frontend) add global store for browser permissions monitoring

Introduce new global state management to watch and expose browser
permissions status across the application.

Sets foundation for upcoming changes that will prevent the app from
offering hardware features (camera/microphone) when permissions are
not granted, improving user experience and reducing confusion.
This commit is contained in:
lebaudantoine
2025-08-08 14:06:37 +02:00
committed by aleb_the_flash
parent adb99cc5d9
commit 95190ec690

View File

@@ -0,0 +1,18 @@
import { proxy } from 'valtio'
type PermissionState =
| undefined
| 'granted'
| 'prompt'
| 'denied'
| 'unavailable'
type State = {
cameraPermission: PermissionState
microphonePermission: PermissionState
}
export const permissionsStore = proxy<State>({
cameraPermission: undefined,
microphonePermission: undefined,
})