Unverified 提交 f7132d0d authored 作者: Olyno's avatar Olyno 提交者: GitHub

fix: unaligned settings (#1618)

# Description This is a small fix to make the settings aligned with the sidebar. It closes #1375 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Aligned the Settings page with the sidebar. The page now sets the active section to "general-settings" on mount, so the content matches the selected sidebar on first load. <!-- End of auto-generated description by cubic. -->
上级 b22928dd
import { useState } from "react";
import { useEffect, useState } from "react";
import { useTheme } from "../contexts/ThemeContext";
import { ProviderSettingsGrid } from "@/components/ProviderSettings";
import ConfirmationDialog from "@/components/ConfirmationDialog";
......@@ -26,6 +26,8 @@ import { NeonIntegration } from "@/components/NeonIntegration";
import { RuntimeModeSelector } from "@/components/RuntimeModeSelector";
import { NodePathSelector } from "@/components/NodePathSelector";
import { ToolsMcpSettings } from "@/components/settings/ToolsMcpSettings";
import { useSetAtom } from "jotai";
import { activeSettingsSectionAtom } from "@/atoms/viewAtoms";
export default function SettingsPage() {
const [isResetDialogOpen, setIsResetDialogOpen] = useState(false);
......@@ -33,6 +35,11 @@ export default function SettingsPage() {
const appVersion = useAppVersion();
const { settings, updateSettings } = useSettings();
const router = useRouter();
const setActiveSettingsSection = useSetAtom(activeSettingsSectionAtom);
useEffect(() => {
setActiveSettingsSection("general-settings");
}, [setActiveSettingsSection]);
const handleResetEverything = async () => {
setIsResetting(true);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论