mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 04:32:02 +00:00
9503d5cee0
* git no work so manually uploading files :( * argh i wish git was working * ok next time i'll make git work * Update updater.py * git please work next time this took ages without you * fix me locales * Update updater.py * Update en-US.json * Update updater.py * Update updater.py * i wish my python LSP stuff was working * fix it * Update updater.py * Update updater.py * Only show testing branch as an option if it is already selected * Initial implementation for fetching the open PRs. Still need testing and a token to complete this. * Wrong filter capitalization * Fix a couple of typos in the python backend updater. * Fix typos pt 3 * This should be the last one * Prepend the PR version number with PR- to make it clearer that's the PR number. * Update prettier to the latest version otherwise it will never be happy with the formatting. * fix merge mistake * fix pyright errors & type hint most new code * fix strict pyright errors... * not sure why my local linter didn't catch this * Reimplement the logic between PR and artifact build to limit API calls * Fix pyright errors * use nightly.link for downloads * remove accidental dollar sign * fix various logical errors. the code actually works now. * set branch to testing when user downloads a testing version --------- Co-authored-by: Marco Rodolfi <marco.rodolfi@tuta.io>
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
import { SidebarNavigation } from 'decky-frontend-lib';
|
|
import { lazy } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { FaCode, FaFlask, FaPlug } from 'react-icons/fa';
|
|
|
|
import { useSetting } from '../../utils/hooks/useSetting';
|
|
import DeckyIcon from '../DeckyIcon';
|
|
import WithSuspense from '../WithSuspense';
|
|
import GeneralSettings from './pages/general';
|
|
import PluginList from './pages/plugin_list';
|
|
|
|
const DeveloperSettings = lazy(() => import('./pages/developer'));
|
|
const TestingMenu = lazy(() => import('./pages/testing'));
|
|
|
|
export default function SettingsPage() {
|
|
const [isDeveloper, setIsDeveloper] = useSetting<boolean>('developer.enabled', false);
|
|
const { t } = useTranslation();
|
|
|
|
const pages = [
|
|
{
|
|
title: t('SettingsIndex.general_title'),
|
|
content: <GeneralSettings isDeveloper={isDeveloper} setIsDeveloper={setIsDeveloper} />,
|
|
route: '/decky/settings/general',
|
|
icon: <DeckyIcon />,
|
|
},
|
|
{
|
|
title: t('SettingsIndex.plugins_title'),
|
|
content: <PluginList />,
|
|
route: '/decky/settings/plugins',
|
|
icon: <FaPlug />,
|
|
},
|
|
{
|
|
title: t('SettingsIndex.developer_title'),
|
|
content: (
|
|
<WithSuspense>
|
|
<DeveloperSettings />
|
|
</WithSuspense>
|
|
),
|
|
route: '/decky/settings/developer',
|
|
icon: <FaCode />,
|
|
visible: isDeveloper,
|
|
},
|
|
{
|
|
title: t('SettingsIndex.testing_title'),
|
|
content: (
|
|
<WithSuspense>
|
|
<TestingMenu />
|
|
</WithSuspense>
|
|
),
|
|
route: '/decky/settings/testing',
|
|
icon: <FaFlask />,
|
|
visible: isDeveloper,
|
|
},
|
|
];
|
|
|
|
return <SidebarNavigation pages={pages} />;
|
|
}
|