feat: Implemented launching and downloading of roms

This is just an initial implementation lots of kings to iron out
This commit is contained in:
Simeon Radivoev 2026-02-19 16:10:29 +02:00
parent ef08fa6114
commit f15bf9a1e0
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
117 changed files with 37776 additions and 1073 deletions

View file

@ -10,28 +10,15 @@ import
} from "@tanstack/react-router";
import { routeTree } from "./gen/routeTree.gen";
import { QueryClient } from "@tanstack/react-query";
import { AppType } from "../bun/api/rpc";
import { RPC_URL } from "../shared/constants";
import "./scripts/gamepads";
import "./scripts/windowEvents";
import { Toasters } from "./contexts/ToasterContext";
import { client as rommClient } from "../clients/romm/client.gen";
import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query";
import "./scripts/spatialNavigation";
import
{
treaty
} from '@elysiajs/eden';
const hashHistory = createHashHistory({});
export const client = treaty<AppType>(RPC_URL(__HOST__), {
keepDomain: true,
fetch: {
credentials: 'include',
}
});
rommClient.setConfig({
baseUrl: `${RPC_URL(__HOST__)}/api/romm`,
credentials: "include",
@ -51,8 +38,7 @@ export const Router = createRouter({
history: hashHistory,
defaultPreload: "intent",
context: { queryClient },
scrollRestoration: true,
scrollToTopSelectors: ["[save-scroll]"],
scrollRestoration: false,
defaultNotFoundComponent: () =>
{
return (
@ -86,7 +72,6 @@ if (!rootElement.innerHTML)
root.render(
<StrictMode>
<RouterProvider router={Router} />
<Toasters />
</StrictMode>,
);
}