feat First implementation of plugins system

feat: Added PCSX2 integration
feat: Revamped UI a bit made it look better on light mode
This commit is contained in:
Simeon Radivoev 2026-03-25 21:51:10 +02:00
parent d85268fad7
commit a78e75335f
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
95 changed files with 2639 additions and 1259 deletions

View file

@ -4,6 +4,7 @@ import Notifications from "../components/Notifications";
import { Toaster } from "react-hot-toast";
import { mobileCheck, useLocalSetting } from "../scripts/utils";
import useActiveControl from "../scripts/gamepads";
import { useEffect } from "react";
export const Route = createRootRouteWithContext<RouterContext>()({
component: RootComponent,
@ -14,9 +15,24 @@ function RootComponent ()
const isMobile = mobileCheck();
const theme = useLocalSetting('theme');
const { control } = useActiveControl();
useEffect(() =>
{
if (theme === 'auto')
{
const preferred = window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light';
window.document.documentElement.dataset.theme = preferred;
} else
{
window.document.documentElement.dataset.theme = theme;
}
}, [theme]);
return (
<div data-theme={theme === 'auto' ? undefined : theme} data-device={isMobile ? 'mobile' : ''} data-active-control={control} className="w-screen h-screen overflow-hidden">
<div data-device={isMobile ? 'mobile' : ''} data-active-control={control} className="w-screen h-screen overflow-hidden">
<Outlet />
<Notifications />
<Toaster containerStyle={{ viewTimelineName: 'toasters' }} />