mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 22:49:18 +00:00
refactor: add to correct section
This commit is contained in:
@@ -4,7 +4,6 @@ import GenerateLinkFormExport from '../../../sharing/GenerateLinkFormExport';
|
|||||||
import type { PanelBaseProps } from '../../panel-list/PanelList';
|
import type { PanelBaseProps } from '../../panel-list/PanelList';
|
||||||
import * as Panel from '../../panel-utils/PanelUtils';
|
import * as Panel from '../../panel-utils/PanelUtils';
|
||||||
import InfoNif from '../network-panel/NetworkInterfaces';
|
import InfoNif from '../network-panel/NetworkInterfaces';
|
||||||
import McpSection from './McpSection';
|
|
||||||
import ReportSettings from './ReportSettings';
|
import ReportSettings from './ReportSettings';
|
||||||
import URLPresets from './URLPresets';
|
import URLPresets from './URLPresets';
|
||||||
|
|
||||||
@@ -12,7 +11,6 @@ export default function FeaturePanel({ location }: PanelBaseProps) {
|
|||||||
const presetsRef = useScrollIntoView<HTMLDivElement>('presets', location);
|
const presetsRef = useScrollIntoView<HTMLDivElement>('presets', location);
|
||||||
const linkRef = useScrollIntoView<HTMLDivElement>('link', location);
|
const linkRef = useScrollIntoView<HTMLDivElement>('link', location);
|
||||||
const reportRef = useScrollIntoView<HTMLDivElement>('report', location);
|
const reportRef = useScrollIntoView<HTMLDivElement>('report', location);
|
||||||
const mcpRef = useScrollIntoView<HTMLDivElement>('mcp', location);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -35,9 +33,6 @@ export default function FeaturePanel({ location }: PanelBaseProps) {
|
|||||||
</Panel.Card>
|
</Panel.Card>
|
||||||
</Panel.Section>
|
</Panel.Section>
|
||||||
</div>
|
</div>
|
||||||
<div ref={mcpRef}>
|
|
||||||
<McpSection />
|
|
||||||
</div>
|
|
||||||
<div ref={reportRef}>
|
<div ref={reportRef}>
|
||||||
<ReportSettings />
|
<ReportSettings />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
-1
@@ -6,7 +6,6 @@ import useInfo from '../../../../common/hooks-query/useInfo';
|
|||||||
import { isOntimeCloud, serverURL } from '../../../../externals';
|
import { isOntimeCloud, serverURL } from '../../../../externals';
|
||||||
import * as Panel from '../../panel-utils/PanelUtils';
|
import * as Panel from '../../panel-utils/PanelUtils';
|
||||||
|
|
||||||
/** MCP endpoint card — isolated so that URL state changes don't re-render the rest of FeaturePanel */
|
|
||||||
export default function McpSection() {
|
export default function McpSection() {
|
||||||
const { data: infoData } = useInfo();
|
const { data: infoData } = useInfo();
|
||||||
const [mcpEndpointUrl, setMcpEndpointUrl] = useState('');
|
const [mcpEndpointUrl, setMcpEndpointUrl] = useState('');
|
||||||
@@ -4,6 +4,7 @@ import type { PanelBaseProps } from '../../panel-list/PanelList';
|
|||||||
import * as Panel from '../../panel-utils/PanelUtils';
|
import * as Panel from '../../panel-utils/PanelUtils';
|
||||||
import CustomViews from '../manage-panel/CustomViews';
|
import CustomViews from '../manage-panel/CustomViews';
|
||||||
import GeneralSettings from './GeneralSettings';
|
import GeneralSettings from './GeneralSettings';
|
||||||
|
import McpSection from './McpSection';
|
||||||
import ProjectData from './ProjectData';
|
import ProjectData from './ProjectData';
|
||||||
import ServerPortSettings from './ServerPortSettings';
|
import ServerPortSettings from './ServerPortSettings';
|
||||||
import ViewSettings from './ViewSettings';
|
import ViewSettings from './ViewSettings';
|
||||||
@@ -13,6 +14,7 @@ export default function SettingsPanel({ location }: PanelBaseProps) {
|
|||||||
const generalRef = useScrollIntoView<HTMLDivElement>('general', location);
|
const generalRef = useScrollIntoView<HTMLDivElement>('general', location);
|
||||||
const viewRef = useScrollIntoView<HTMLDivElement>('view', location);
|
const viewRef = useScrollIntoView<HTMLDivElement>('view', location);
|
||||||
const customViewsRef = useScrollIntoView<HTMLDivElement>('custom-views', location);
|
const customViewsRef = useScrollIntoView<HTMLDivElement>('custom-views', location);
|
||||||
|
const mcpRef = useScrollIntoView<HTMLDivElement>('mcp', location);
|
||||||
const portRef = useScrollIntoView<HTMLDivElement>('port', location);
|
const portRef = useScrollIntoView<HTMLDivElement>('port', location);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -30,6 +32,9 @@ export default function SettingsPanel({ location }: PanelBaseProps) {
|
|||||||
<div ref={customViewsRef}>
|
<div ref={customViewsRef}>
|
||||||
<CustomViews />
|
<CustomViews />
|
||||||
</div>
|
</div>
|
||||||
|
<div ref={mcpRef}>
|
||||||
|
<McpSection />
|
||||||
|
</div>
|
||||||
{!isDocker && (
|
{!isDocker && (
|
||||||
<div ref={portRef}>
|
<div ref={portRef}>
|
||||||
<ServerPortSettings />
|
<ServerPortSettings />
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const staticOptions = [
|
|||||||
{ id: 'settings__view', label: 'View settings' },
|
{ id: 'settings__view', label: 'View settings' },
|
||||||
{ id: 'settings__custom-views', label: 'Custom views' },
|
{ id: 'settings__custom-views', label: 'Custom views' },
|
||||||
{ id: 'settings__port', label: 'Server port' },
|
{ id: 'settings__port', label: 'Server port' },
|
||||||
|
{ id: 'sharing__mcp', label: 'MCP Server' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user