Skip to content

Commit 2f779f2

Browse files
committed
🤖 feat: replace theme toggle with settings gear button
_Generated with mux_
1 parent 3179f17 commit 2f779f2

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Settings } from "lucide-react";
2+
import { useSettings } from "@/browser/contexts/SettingsContext";
3+
import { TooltipWrapper, Tooltip } from "./Tooltip";
4+
5+
export function SettingsButton() {
6+
const { open } = useSettings();
7+
8+
return (
9+
<TooltipWrapper>
10+
<button
11+
type="button"
12+
onClick={() => open()}
13+
className="border-border-light text-muted-foreground hover:border-border-medium/80 hover:bg-toggle-bg/70 focus-visible:ring-border-medium flex h-5 w-5 items-center justify-center rounded-md border bg-transparent transition-colors duration-150 focus-visible:ring-1"
14+
aria-label="Open settings"
15+
data-testid="settings-button"
16+
>
17+
<Settings className="h-3.5 w-3.5" aria-hidden />
18+
</button>
19+
<Tooltip align="right">Settings</Tooltip>
20+
</TooltipWrapper>
21+
);
22+
}

src/browser/components/TitleBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect, useRef } from "react";
22
import { cn } from "@/common/lib/utils";
33
import { VERSION } from "@/version";
4-
import { ThemeToggleButton } from "./ThemeToggleButton";
4+
import { SettingsButton } from "./SettingsButton";
55
import { TooltipWrapper, Tooltip } from "./Tooltip";
66
import type { UpdateStatus } from "@/common/types/ipc";
77
import { isTelemetryEnabled } from "@/common/telemetry";
@@ -253,7 +253,7 @@ export function TitleBar() {
253253
</div>
254254
</div>
255255
<div className="flex items-center gap-3">
256-
<ThemeToggleButton />
256+
<SettingsButton />
257257
<TooltipWrapper>
258258
<div className="cursor-default text-[11px] opacity-70">{buildDate}</div>
259259
<Tooltip align="right">Built at {extendedTimestamp}</Tooltip>

0 commit comments

Comments
 (0)