fix: switched to node-7z
fix: switched to bun spawn but with windowsVerbatimArguments feat: Added ppsspp integration feat: Added focusing controls for windows feat: Added shortcut to kill emulators
This commit is contained in:
parent
a7eb655a48
commit
90d6711935
31 changed files with 1382 additions and 88 deletions
33
src/mainview/components/AppCommunication.tsx
Normal file
33
src/mainview/components/AppCommunication.tsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { SystemInfoContext } from "../scripts/contexts";
|
||||
import { systemApi } from "../scripts/clientApi";
|
||||
import { SystemInfoType } from "@/shared/constants";
|
||||
|
||||
export default function AppCommunication (data: { children: any; })
|
||||
{
|
||||
|
||||
const [systemInfo, setSystemInfo] = useState<SystemInfoType | undefined>();
|
||||
useEffect(() =>
|
||||
{
|
||||
const sub = systemApi.api.system.info.system.subscribe();
|
||||
sub.subscribe(({ data }) =>
|
||||
{
|
||||
switch (data.type)
|
||||
{
|
||||
case "info":
|
||||
setSystemInfo(data.data);
|
||||
break;
|
||||
case "focus":
|
||||
window.focus();
|
||||
break;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
document.documentElement.dataset.loaded = "true";
|
||||
}, []);
|
||||
|
||||
return <SystemInfoContext value={systemInfo}>
|
||||
{data.children}
|
||||
</SystemInfoContext>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue