better life handling

This commit is contained in:
Viktor Rådberg
2023-09-22 13:13:29 +02:00
parent d7d9d26540
commit 4157ef53c1
15 changed files with 197 additions and 268 deletions

View File

@@ -1,9 +1,22 @@
import { createContext } from 'react';
export type GlobalSettingsContextType = {
isFullscreen: boolean;
enableFullscreen: () => void;
disableFullscreen: () => void;
fullscreen: {
isFullscreen: boolean;
enableFullscreen: () => void;
disableFullscreen: () => void;
};
wakeLock: {
isSupported: boolean;
release: () => void;
active: boolean;
request: () => void;
type: 'screen' | undefined;
toggleWakeLock: () => void;
};
goToStart: () => void;
showPlay: boolean;
setShowPlay: (showPlay: boolean) => void;
};
export const GlobalSettingsContext =