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:
Simeon Radivoev 2026-03-29 22:18:05 +03:00
parent a7eb655a48
commit 90d6711935
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
31 changed files with 1382 additions and 88 deletions

View file

@ -62,33 +62,46 @@ export const system = new Elysia({ prefix: '/api/system' })
return new Response(buildNotificationsStream());
})
.ws('/info/system', {
response: SystemInfoSchema,
response: z.discriminatedUnion('type', [
z.object({ type: z.literal('info'), data: SystemInfoSchema }),
z.object({ type: z.literal('focus') })
]),
async open (ws)
{
const battery = await si.battery();
const wifi = await si.wifiConnections();
const bluetooth = await si.bluetoothDevices();
ws.send({
battery: battery,
wifiConnections: wifi,
bluetoothDevices: bluetooth
type: 'info',
data: {
battery: battery,
wifiConnections: wifi,
bluetoothDevices: bluetooth
}
}, true);
const handleFocus = () => ws.send({ type: 'focus' });
events.on('focus', handleFocus);
(ws.data as any).dispose = [() => events.removeListener('focus', handleFocus)];
(ws.data as any).observer = setInterval(async () =>
{
const battery = await si.battery();
const wifi = await si.wifiConnections();
const bluetooth = await si.bluetoothDevices();
ws.send({
battery: battery,
wifiConnections: wifi,
bluetoothDevices: bluetooth
type: 'info',
data: {
battery: battery,
wifiConnections: wifi,
bluetoothDevices: bluetooth
}
}, true);
}, 1000 * 30);
},
close (ws)
{
clearInterval((ws.data as any).observer);
(ws.data as any).dispose.forEach((dispose: any) => dispose());
}
})
.get('/drives', async () =>