From 29adbbc5410e246f3eef7e6053e8c8f826dd9931 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sun, 11 Jan 2026 21:04:50 +0800 Subject: [PATCH] feat(OneClient-SettingsRow): optional settings icon (#475) * feat(OneClient-SettingsRow): optional settings icon * fix: building --- apps/oneclient/frontend/src/components/SettingsRow.tsx | 10 ++++++---- .../frontend/src/routes/app/settings/developer.tsx | 9 +-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/oneclient/frontend/src/components/SettingsRow.tsx b/apps/oneclient/frontend/src/components/SettingsRow.tsx index 8ef6bfa0..0ba53b7d 100644 --- a/apps/oneclient/frontend/src/components/SettingsRow.tsx +++ b/apps/oneclient/frontend/src/components/SettingsRow.tsx @@ -3,7 +3,7 @@ import type { JSX } from 'react'; export interface SettingsRowProps { title: JSX.Element | string; description: JSX.Element | string; - icon: JSX.Element; + icon?: JSX.Element; disabled?: boolean; children?: JSX.Element; } @@ -16,9 +16,11 @@ export function SettingsRow({ disabled, description, icon, title, children }: Se ${disabled ? 'bg-component-bg-disabled' : 'bg-page-elevated hover:bg-component-bg-hover'} `} > -
- {icon} -
+ {icon && ( +
+ {icon} +
+ )}

{title}

diff --git a/apps/oneclient/frontend/src/routes/app/settings/developer.tsx b/apps/oneclient/frontend/src/routes/app/settings/developer.tsx index 1457066b..d9e5cd62 100644 --- a/apps/oneclient/frontend/src/routes/app/settings/developer.tsx +++ b/apps/oneclient/frontend/src/routes/app/settings/developer.tsx @@ -4,7 +4,6 @@ import { bindings } from '@/main'; import { Sidebar } from '@/routes/app/settings/route'; import { Button } from '@onelauncher/common/components'; import { createFileRoute, Link } from '@tanstack/react-router'; -import { BatteryEmptyIcon, BatteryFullIcon, Code02Icon, FileHeart02Icon, Truck01Icon } from '@untitled-theme/icons-react'; export const Route = createFileRoute('/app/settings/developer')({ component: RouteComponent, @@ -20,7 +19,6 @@ function RouteComponent() { } title="Open Debug Info" > @@ -35,14 +33,12 @@ function RouteComponent() { Dev Tools } title="Tanstack Dev Tools" > } title="Open Dev Tools" > @@ -51,7 +47,6 @@ function RouteComponent() { Onboarding } title="Open Onboarding" > @@ -60,21 +55,19 @@ function RouteComponent() { } title="Seen Onboarding" > } title="Use Grid On Mods List" > Mod Downloading - } title="Use Parallel Mod Downloading"> +