feat: implemented a basic store and emulatorjs
This commit is contained in:
parent
2f32cbc730
commit
7286541822
121 changed files with 5900 additions and 1092 deletions
34
src/mainview/scripts/contexts.ts
Normal file
34
src/mainview/scripts/contexts.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Drive } from "@/shared/constants";
|
||||
import { FocusDetails } from "@noriginmedia/norigin-spatial-navigation";
|
||||
import { createContext } from "react";
|
||||
|
||||
export const StoreContext = createContext({} as {
|
||||
showDetails: (type: 'emulator' | 'game', source: string, id: string, focusSource: string) => void;
|
||||
forceFocus?: string;
|
||||
});
|
||||
|
||||
export const AnimatedBackgroundContext = createContext({} as { setBackground: (url: string) => void; });
|
||||
|
||||
export const ContextDialogContext = createContext({} as {
|
||||
close: () => void,
|
||||
id: string;
|
||||
});
|
||||
|
||||
export const OptionContext = createContext(
|
||||
{} as {
|
||||
focused: boolean;
|
||||
focus: (focusDetails?: FocusDetails | undefined) => void;
|
||||
eventTarget: EventTarget;
|
||||
},
|
||||
);
|
||||
|
||||
export const FilePickerContext = createContext<{
|
||||
allowNewFolderCreation: boolean;
|
||||
isDirectoryPicker: boolean;
|
||||
setCurrentPath: (path: string) => void;
|
||||
currentPath: string | undefined,
|
||||
startingPath: string | undefined;
|
||||
refetchFiles: () => void;
|
||||
drives: Drive[],
|
||||
activeDrive: Drive | undefined;
|
||||
}>({} as any);
|
||||
Loading…
Add table
Add a link
Reference in a new issue