mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
ef9afa8cbc
* Add notification settings, which allows muting decky/plugin toast notifications * Fix typos
55 lines
2.0 KiB
TypeScript
55 lines
2.0 KiB
TypeScript
import { DialogBody, DialogControlsSection, DialogControlsSectionHeader, Field, Toggle } from 'decky-frontend-lib';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { useDeckyState } from '../../../DeckyState';
|
|
import BranchSelect from './BranchSelect';
|
|
import NotificationSettings from './NotificationSettings';
|
|
import StoreSelect from './StoreSelect';
|
|
import UpdaterSettings from './Updater';
|
|
|
|
export default function GeneralSettings({
|
|
isDeveloper,
|
|
setIsDeveloper,
|
|
}: {
|
|
isDeveloper: boolean;
|
|
setIsDeveloper: (val: boolean) => void;
|
|
}) {
|
|
const { versionInfo } = useDeckyState();
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<DialogBody>
|
|
<DialogControlsSection>
|
|
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.updates.header')}</DialogControlsSectionHeader>
|
|
<UpdaterSettings />
|
|
</DialogControlsSection>
|
|
<DialogControlsSection>
|
|
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.beta.header')}</DialogControlsSectionHeader>
|
|
<BranchSelect />
|
|
<StoreSelect />
|
|
</DialogControlsSection>
|
|
<DialogControlsSection>
|
|
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.notifications.header')}</DialogControlsSectionHeader>
|
|
<NotificationSettings />
|
|
</DialogControlsSection>
|
|
<DialogControlsSection>
|
|
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.other.header')}</DialogControlsSectionHeader>
|
|
<Field label={t('SettingsGeneralIndex.developer_mode.label')}>
|
|
<Toggle
|
|
value={isDeveloper}
|
|
onChange={(toggleValue) => {
|
|
setIsDeveloper(toggleValue);
|
|
}}
|
|
/>
|
|
</Field>
|
|
</DialogControlsSection>
|
|
<DialogControlsSection>
|
|
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.about.header')}</DialogControlsSectionHeader>
|
|
<Field label={t('SettingsGeneralIndex.about.decky_version')} focusable={true}>
|
|
<div style={{ color: 'var(--gpSystemLighterGrey)' }}>{versionInfo?.current}</div>
|
|
</Field>
|
|
</DialogControlsSection>
|
|
</DialogBody>
|
|
);
|
|
}
|