mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
c1fcdf7065
* feat: get server port from app satate or env optional startup port from env will always override function for parsing port from env populate default port in app state add test for migration * bump version
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import useScrollIntoView from '../../../../common/hooks/useScrollIntoView';
|
|
import { isDocker } from '../../../../externals';
|
|
import type { PanelBaseProps } from '../../panel-list/PanelList';
|
|
import * as Panel from '../../panel-utils/PanelUtils';
|
|
|
|
import GeneralSettings from './GeneralSettings';
|
|
import ProjectData from './ProjectData';
|
|
import ServerPortSettings from './ServerPortSettings';
|
|
import ViewSettings from './ViewSettings';
|
|
|
|
export default function SettingsPanel({ location }: PanelBaseProps) {
|
|
const dataRef = useScrollIntoView<HTMLDivElement>('data', location);
|
|
const generalRef = useScrollIntoView<HTMLDivElement>('general', location);
|
|
const portRef = useScrollIntoView<HTMLDivElement>('port', location);
|
|
const viewRef = useScrollIntoView<HTMLDivElement>('view', location);
|
|
|
|
return (
|
|
<>
|
|
<Panel.Header>Settings</Panel.Header>
|
|
<div ref={dataRef}>
|
|
<ProjectData />
|
|
</div>
|
|
<div ref={generalRef}>
|
|
<GeneralSettings />
|
|
</div>
|
|
<div ref={viewRef}>
|
|
<ViewSettings />
|
|
</div>
|
|
{!isDocker && (
|
|
<div ref={portRef}>
|
|
<ServerPortSettings />
|
|
</div>
|
|
)}
|
|
</>
|
|
);
|
|
}
|