diff --git a/packages/app/src/screens/settings-screen.tsx b/packages/app/src/screens/settings-screen.tsx index f823a1aaf..1f8ac5293 100644 --- a/packages/app/src/screens/settings-screen.tsx +++ b/packages/app/src/screens/settings-screen.tsx @@ -114,7 +114,6 @@ import { MetadataGenerationPage } from "@/screens/settings/metadata-generation-p import ProjectsScreen from "@/screens/projects-screen"; import ProjectSettingsScreen from "@/screens/project-settings-screen"; import { SETTINGS_DESKTOP_SIDEBAR_WIDTH, useIsCompactFormFactor } from "@/constants/layout"; -import { isNative } from "@/constants/platform"; import { useLocalDaemonServerId } from "@/hooks/use-is-local-daemon"; import { type EnableBuiltInDaemonOption, @@ -128,6 +127,7 @@ import { } from "@/utils/host-routes"; import { useLastWorkspaceSelection } from "@/stores/navigation-active-workspace-store"; import { returnFromSettings, type SettingsView } from "@/navigation/settings-navigation"; +import { isNative, isWeb } from "@/constants/platform"; // --------------------------------------------------------------------------- // View model @@ -138,12 +138,13 @@ interface SidebarSectionItem { labelKey: string; icon: ComponentType<{ size: number; color: string }>; desktopOnly?: boolean; + webOnly?: boolean; } const SIDEBAR_SECTION_ITEMS: SidebarSectionItem[] = [ { id: "general", labelKey: "settings.sections.general", icon: Settings }, { id: "appearance", labelKey: "settings.sections.appearance", icon: Palette }, - { id: "editor", labelKey: "settings.sections.editor", icon: Code2 }, + { id: "editor", labelKey: "settings.sections.editor", icon: Code2, webOnly: true }, { id: "shortcuts", labelKey: "settings.sections.shortcuts", icon: Keyboard, desktopOnly: true }, { id: "integrations", @@ -1004,7 +1005,9 @@ function SettingsSidebar({ const hasHosts = sortedHosts.length > 0; const enableBuiltInDaemonOption = useEnableBuiltInDaemonOption(); const isDesktopApp = isElectronRuntime(); - const items = SIDEBAR_SECTION_ITEMS.filter((item) => !item.desktopOnly || isDesktopApp); + const items = SIDEBAR_SECTION_ITEMS.filter( + (item) => (!item.desktopOnly || isDesktopApp) && (!item.webOnly || isWeb), + ); const insets = useSafeAreaInsets(); const isDesktop = layout === "desktop"; const outerContainerStyle = useMemo( @@ -1424,7 +1427,7 @@ export default function SettingsScreen({ view, openAddHostIntent = null }: Setti case "appearance": return ; case "editor": - return ; + return isWeb ? : null; case "shortcuts": return isDesktopApp ? : null; case "integrations":