Skip to content

Commit ff7e7b4

Browse files
committed
refactor BottomToolbar and ThemeToggle components; update disconnect button styles
1 parent a12388f commit ff7e7b4

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

src/app/components/BottomToolbar.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ function BottomToolbar({
4040
function getConnectionButtonClasses() {
4141
const baseClasses = "text-white text-base p-2 w-36 rounded-lg h-full transition-all duration-200 disconnect-btn";
4242
const cursorClass = isConnecting ? "cursor-not-allowed" : "cursor-pointer";
43-
44-
if (isConnected) {
45-
return `${cursorClass} ${baseClasses}`;
46-
}
47-
return `bg-surface dark:bg-surface hover:bg-surface/90 dark:hover:bg-surface/90 ${cursorClass} ${baseClasses}`;
43+
return `${cursorClass} ${baseClasses}`;
4844
}
4945

5046
return (

src/app/components/ThemeToggle.tsx

+26-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,23 @@ export function ThemeToggle() {
2323
className="p-2 rounded-lg bg-primary/10 hover:bg-primary/20 transition-colors dark:bg-primary/20 dark:hover:bg-primary/30"
2424
aria-label="Toggle dark mode"
2525
>
26-
{mode === 'light' ? '🌙' : '☀️'}
26+
{mode === 'light' ? (
27+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
28+
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
29+
</svg>
30+
) : (
31+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
32+
<circle cx="12" cy="12" r="5"></circle>
33+
<line x1="12" y1="1" x2="12" y2="3"></line>
34+
<line x1="12" y1="21" x2="12" y2="23"></line>
35+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
36+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
37+
<line x1="1" y1="12" x2="3" y2="12"></line>
38+
<line x1="21" y1="12" x2="23" y2="12"></line>
39+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
40+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
41+
</svg>
42+
)}
2743
</button>
2844

2945
{/* Theme Selector Toggle */}
@@ -32,7 +48,14 @@ export function ThemeToggle() {
3248
className="p-2 rounded-lg bg-primary/10 hover:bg-primary/20 transition-colors dark:bg-primary/20 dark:hover:bg-primary/30"
3349
aria-label="Select theme"
3450
>
35-
🎨
51+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
52+
<circle cx="12" cy="12" r="10"></circle>
53+
<circle cx="12" cy="12" r="4"></circle>
54+
<line x1="12" y1="2" x2="12" y2="4"></line>
55+
<line x1="12" y1="20" x2="12" y2="22"></line>
56+
<line x1="2" y1="12" x2="4" y2="12"></line>
57+
<line x1="20" y1="12" x2="22" y2="12"></line>
58+
</svg>
3659
</button>
3760
</div>
3861

@@ -57,4 +80,4 @@ export function ThemeToggle() {
5780
)}
5881
</>
5982
);
60-
}
83+
}

src/app/globals.css

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
--muted: #6b7280;
1313
--border: #6b7280;
1414
--divider: #282828;
15+
--disconnect: #dc2626;
16+
--disconnect-hover: #b91c1c;
17+
--surface: #f1f5f9;
1518
}
1619

1720
/* Default Dark Theme */
@@ -61,13 +64,13 @@
6164
box-shadow 0.1s ease-in-out;
6265
}
6366

64-
/* Dark mode specific button styles */
65-
.dark .disconnect-btn {
67+
/* Disconnect button styles */
68+
.disconnect-btn {
6669
background: var(--disconnect);
67-
border: 1px solid var(--panel-border);
70+
border: 1px solid var(--border);
6871
}
6972

70-
.dark .disconnect-btn:hover {
73+
.disconnect-btn:hover {
7174
background: var(--disconnect-hover);
7275
}
7376
/* Blue Theme - Light */

0 commit comments

Comments
 (0)