feat(notifications): add overlay notifications with position config (#110)

This commit is contained in:
2026-06-10 22:46:52 -07:00
committed by GitHub
parent c09d009a3e
commit 7be1843c41
177 changed files with 7524 additions and 440 deletions
@@ -0,0 +1,32 @@
export function shouldStartOverlayLoadingOsd(args: {
visibleOverlayRequested: boolean;
overlayContentReady: boolean;
mediaPath?: string | null;
}): boolean {
if (!args.visibleOverlayRequested || args.overlayContentReady) {
return false;
}
if (args.mediaPath !== undefined && (args.mediaPath ?? '').trim().length === 0) {
return false;
}
return true;
}
export function createMaybeStartOverlayLoadingOsdHandler(deps: {
getVisibleOverlayRequested: () => boolean;
isOverlayContentReady: () => boolean;
startOverlayLoadingOsd: () => void;
}) {
return (mediaPath?: string | null): void => {
if (
!shouldStartOverlayLoadingOsd({
visibleOverlayRequested: deps.getVisibleOverlayRequested(),
overlayContentReady: deps.isOverlayContentReady(),
mediaPath,
})
) {
return;
}
deps.startOverlayLoadingOsd();
};
}