mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-10 23:51:59 +00:00
6e3c05072c
* add settings utils to use settings outside of components * initial implementation of developer menu * ✨ Add support for addScriptToEvaluateOnNewDocument * React DevTools support * increase chance of RDT successfully injecting * Rewrite toaster hook to not re-create the window * remove friends focus workaround because it's fixed * Expose various DFL utilities as DFL in dev mode * try to fix text field focuss * move focusable to outside field * add onTouchEnd and onClick to focusable * Update pnpm-lock.yaml Co-authored-by: FinalDoom <7464170-FinalDoom@users.noreply.gitlab.com> Co-authored-by: TrainDoctor <traindoctor@protonmail.com>
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { SidebarNavigation } from 'decky-frontend-lib';
|
|
import { lazy } from 'react';
|
|
|
|
import { useSetting } from '../../utils/hooks/useSetting';
|
|
import WithSuspense from '../WithSuspense';
|
|
import GeneralSettings from './pages/general';
|
|
import PluginList from './pages/plugin_list';
|
|
|
|
const DeveloperSettings = lazy(() => import('./pages/developer'));
|
|
|
|
export default function SettingsPage() {
|
|
const [isDeveloper, setIsDeveloper] = useSetting<boolean>('developer.enabled', false);
|
|
|
|
const pages = [
|
|
{
|
|
title: 'General',
|
|
content: <GeneralSettings isDeveloper={isDeveloper} setIsDeveloper={setIsDeveloper} />,
|
|
route: '/decky/settings/general',
|
|
},
|
|
{
|
|
title: 'Plugins',
|
|
content: <PluginList />,
|
|
route: '/decky/settings/plugins',
|
|
},
|
|
];
|
|
|
|
if (isDeveloper)
|
|
pages.push({
|
|
title: 'Developer',
|
|
content: (
|
|
<WithSuspense>
|
|
<DeveloperSettings />
|
|
</WithSuspense>
|
|
),
|
|
route: '/decky/settings/developer',
|
|
});
|
|
|
|
return <SidebarNavigation title="Decky Settings" showTitle pages={pages} />;
|
|
}
|