Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions apps/oneclient/frontend/src/components/SettingsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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'}
`}
>
<div className="flex h-8 w-8 items-center justify-center">
{icon}
</div>
{icon && (
<div className="flex h-8 w-8 items-center justify-center">
{icon}
</div>
)}

<div className="flex flex-1 flex-col gap-2">
<p className="text-lg capitalize leading-tight">{title}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -20,7 +19,6 @@ function RouteComponent() {

<SettingsRow
description="Open Debug Info"
icon={<FileHeart02Icon />}
title="Open Debug Info"
>
<Overlay.Trigger>
Expand All @@ -35,14 +33,12 @@ function RouteComponent() {
<SettingsRow.Header>Dev Tools</SettingsRow.Header>
<SettingsRow
description="Enable The Tanstack Dev Tools"
icon={<Code02Icon />}
title="Tanstack Dev Tools"
>
<SettingsSwitch setting={createSetting('show_tanstack_dev_tools')} />
</SettingsRow>
<SettingsRow
description="Open Dev Tools"
icon={<Code02Icon />}
title="Open Dev Tools"
>
<Button onPress={bindings.debug.openDevTools} size="normal">Open</Button>
Expand All @@ -51,7 +47,6 @@ function RouteComponent() {
<SettingsRow.Header>Onboarding</SettingsRow.Header>
<SettingsRow
description="Open Onboarding"
icon={<Truck01Icon />}
title="Open Onboarding"
>
<Link to="/onboarding">
Expand All @@ -60,21 +55,19 @@ function RouteComponent() {
</SettingsRow>
<SettingsRow
description="Seen onboarding"
icon={<Truck01Icon />}
title="Seen Onboarding"
>
<SettingsSwitch setting={createSetting('seen_onboarding')} />
</SettingsRow>
<SettingsRow
description="Use Grid On Mods List"
icon={<BatteryFullIcon />}
title="Use Grid On Mods List"
>
<SettingsSwitch setting={createSetting('mod_list_use_grid')} />
</SettingsRow>

<SettingsRow.Header>Mod Downloading</SettingsRow.Header>
<SettingsRow description="Use Parallel Mod Downloading for speed. This can create some issues sometimes" icon={<BatteryEmptyIcon />} title="Use Parallel Mod Downloading">
<SettingsRow description="Use Parallel Mod Downloading for speed. This can create some issues sometimes" title="Use Parallel Mod Downloading">
<SettingsSwitch setting={createSetting('parallel_mod_downloading')} />
</SettingsRow>

Expand Down
Loading