feat: Moved to stream zip downloading.

feat: Implemented Shortcuts.
feat: Ensured it works on steam deck
This commit is contained in:
Simeon Radivoev 2026-02-21 18:28:07 +02:00
parent f15bf9a1e0
commit 62f16cbcc1
Signed by: simeonradivoev
GPG key ID: C16C2132A7660C8E
45 changed files with 1415 additions and 631 deletions

View file

@ -17,12 +17,17 @@ let setCurrentFocusedKey = SpatialNavigation.setCurrentFocusedKey.bind(SpatialNa
type SaveFocusType = "session" | "local";
type HistorySourceType = "settings" | 'details' | 'launch';
type HistorySourceType = "settings" | 'details' | 'launch' | 'game-list';
const historySourceMap = new Map<string, string>();
export function SaveSource (id: HistorySourceType, url?: string)
{
historySourceMap.set(id, url ?? location.hash.replace("#", ''));
const finalUrl = url ?? location.hash.replace("#", '');
if (finalUrl)
{
historySourceMap.set(id, finalUrl);
}
}
export function HasSource (id: HistorySourceType)
@ -46,6 +51,27 @@ export function GetFocusedElement (focusKey: string)
return (SpatialNavigation as any).focusableComponents[focusKey]?.node as HTMLElement;
}
export function GetFocusedTree (leaf: string): string[]
{
const tree: string[] = [];
let component = (SpatialNavigation as any).focusableComponents[leaf];
while (component)
{
tree.push(component.focusKey);
if (component.parentFocusKey && !tree.includes(component.parentFocusKey))
{
component = (SpatialNavigation as any).focusableComponents[component.parentFocusKey];
}
else
{
break;
}
}
return tree;
}
export function dispatchFocusedEvent (event: Event, override?: Element | Window)
{
const focusedElement = GetFocusedElement(getCurrentFocusKey());