mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
40 lines
1.8 KiB
TypeScript
40 lines
1.8 KiB
TypeScript
import { ErrorBoundary } from '@sentry/react';
|
|
|
|
import { useKeyDown } from '../../common/hooks/useKeyDown';
|
|
import PanelContent from './panel-content/PanelContent';
|
|
import PanelList from './panel-list/PanelList';
|
|
import AboutPanel from './panel/about-panel/AboutPanel';
|
|
import AutomationPanel from './panel/automations-panel/AutomationPanel';
|
|
import FeaturePanel from './panel/feature-panel/FeaturePanel';
|
|
import ManagePanel from './panel/manage-panel/ManagePanel';
|
|
import NetworkLogPanel from './panel/network-panel/NetworkLogPanel';
|
|
import ProjectPanel from './panel/project-panel/ProjectPanel';
|
|
import SettingsPanel from './panel/settings-panel/SettingsPanel';
|
|
import ShutdownPanel from './panel/shutdown-panel/ShutdownPanel';
|
|
import useAppSettingsNavigation from './useAppSettingsNavigation';
|
|
|
|
import style from './AppSettings.module.scss';
|
|
|
|
export default function AppSettings() {
|
|
const { close, panel, location, setLocation } = useAppSettingsNavigation();
|
|
useKeyDown(close, 'Escape');
|
|
|
|
return (
|
|
<div className={style.container}>
|
|
<ErrorBoundary>
|
|
<PanelList selectedPanel={panel} location={location} />
|
|
<PanelContent onClose={close}>
|
|
{panel === 'settings' && <SettingsPanel location={location} />}
|
|
{panel === 'project' && <ProjectPanel location={location} setLocation={setLocation} />}
|
|
{panel === 'manage' && <ManagePanel location={location} />}
|
|
{panel === 'automation' && <AutomationPanel location={location} />}
|
|
{panel === 'sharing' && <FeaturePanel location={location} />}
|
|
{panel === 'network' && <NetworkLogPanel location={location} />}
|
|
{panel === 'about' && <AboutPanel />}
|
|
{panel === 'shutdown' && <ShutdownPanel />}
|
|
</PanelContent>
|
|
</ErrorBoundary>
|
|
</div>
|
|
);
|
|
}
|