Skip to content

Commit dcf873d

Browse files
committed
Enhance dark mode support across various components by updating styles and adding dark variants for better visibility. Adjusted button, input, and text colors to ensure consistency in dark theme. Improved layout and spacing in several areas for a more polished UI experience.
1 parent 501a25f commit dcf873d

13 files changed

Lines changed: 95 additions & 38 deletions

File tree

src/app/src/components/UnitInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function UnitInput({
2121
return (
2222
<div
2323
className={cx(
24-
"border border-gray-300 rounded flex flex-row items-center flex-1 justify-between pl-2 pr-2",
24+
"border border-gray-300 rounded flex flex-row items-center flex-1 justify-between pl-2 pr-2 dark:border-outline",
2525
{
2626
"opacity-50": disabled,
2727
},

src/app/src/components/Wizard/SecondaryContentPanel.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ export function SecondaryContentPanel({
122122

123123
{linkItem && (
124124
<div className="flex-shrink-0 mt-auto pt-2">
125-
<div className="bg-white rounded-lg border border-gray-200 px-3 py-2 shadow-sm">
125+
<div className="bg-white dark:bg-surface-raised rounded-lg border border-gray-200 dark:border-gray-600 px-3 py-2 shadow-sm">
126126
<div className="flex items-center gap-2">
127127
<ExternalLink className="text-blue-500 flex-shrink-0" size={16} />
128-
<span className="flex-1 text-sm text-gray-700">
128+
<span className="flex-1 text-sm text-gray-700 dark:text-content-primary">
129129
{linkItem.title && (
130-
<span className="font-semibold text-gray-900">
130+
<span className="font-semibold text-gray-900 dark:text-content-primary">
131131
{linkItem.title}{" "}
132132
</span>
133133
)}
@@ -151,7 +151,7 @@ export function SecondaryContentPanel({
151151
<Popover>
152152
<PopoverTrigger asChild>
153153
<button className="flex-shrink-0 p-1.5 rounded-md hover:bg-gray-100 transition-colors">
154-
<QrCode className="text-gray-600" size={18} />
154+
<QrCode className="text-gray-600 dark:text-content-primary" size={18} />
155155
</button>
156156
</PopoverTrigger>
157157
<PopoverContent
@@ -161,10 +161,10 @@ export function SecondaryContentPanel({
161161
align="end"
162162
>
163163
<div className="flex flex-col items-center gap-3">
164-
<div className="text-sm font-semibold text-gray-900">
164+
<div className="text-sm font-semibold text-gray-900 dark:text-content-primary">
165165
Scan QR Code
166166
</div>
167-
<div className="bg-white p-2 rounded border border-gray-100">
167+
<div className="bg-white dark:bg-surface-raised p-2 rounded border border-gray-100 dark:border-gray-600">
168168
<QRCodeComponent
169169
value={linkItem.url}
170170
size={180}

src/app/src/components/Wizard/WizardLanding.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function WizardLanding({
6060
isDisabled
6161
? "bg-gray-200 text-gray-400 cursor-not-allowed"
6262
: isActive
63-
? "bg-gray-900 text-white hover:bg-gray-800"
63+
? "bg-gray-900 text-white hover:bg-gray-800 dark:bg-gray-600 dark:text-white dark:hover:bg-gray-500"
6464
: "bg-gray-200 text-gray-700 hover:bg-gray-300"
6565
}
6666
`}
@@ -102,7 +102,7 @@ export function WizardLanding({
102102
</p>
103103
)}
104104
{activeSubWizard?.description && (
105-
<p className="mb-8">{activeSubWizard.description}</p>
105+
<p className="mb-8 dark:text-content-primary">{activeSubWizard.description}</p>
106106
)}
107107
<ValidationBanner validations={validations} />
108108
<div className="flex flex-col gap-3 mt-12 max-w-md">

src/app/src/features/Config/components/ActionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const ActionButton = React.forwardRef(function ActionButton(
2323
ref={ref}
2424
onClick={onClick}
2525
disabled={disabled}
26-
className="inline-flex flex-col disabled:bg-gray-200 disabled:text-gray-300 disabled:cursor-not-allowed items-center justify-center px-5 group group-hover:text-blue-500 hover:bg-gray-50 dark:hover:bg-gray-800"
26+
className="rounded-r-lg inline-flex h-full flex-col disabled:bg-gray-200 disabled:text-gray-300 disabled:cursor-not-allowed items-center justify-center px-5 group group-hover:text-blue-500 hover:bg-gray-50 dark:hover:bg-gray-800 dark:disabled:bg-surface-elevated dark:disabled:text-content-secondary"
2727
data-testid={testId}
2828
>
2929
<span className="enabled:group-hover:text-blue-500 text-gray-600 dark:text-content-primary">

src/app/src/features/Config/components/ProfileBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ export function ProfileBar() {
152152
className={cn(
153153
"ring rounded relative ml-4",
154154
{ "ring-green-600": settingsAreDirty },
155-
{ "ring-gray-300": !settingsAreDirty },
155+
{ "ring-gray-300 dark:ring-outline": !settingsAreDirty },
156156
)}
157157
>
158158
<button
159159
className={cn(
160160
"p-3 text-lg rounded-sm border-gray-500",
161-
{ "bg-gray-300 text-gray-500": !settingsAreDirty },
161+
{ "bg-gray-300 text-gray-500 dark:bg-surface-elevated dark:text-content-secondary": !settingsAreDirty },
162162
{
163163
"bg-green-600 text-white": settingsAreDirty,
164164
},

src/app/src/features/Config/components/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function Search() {
4444
<input
4545
type="text"
4646
id="simple-search"
47-
className="bg-gray-50 focus:outline-none border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5"
47+
className="bg-gray-50 focus:outline-none border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-surface-elevated dark:border-outline dark:text-content-primary"
4848
placeholder="Search Config"
4949
value={searchTerm}
5050
onChange={onSearchChange}

src/app/src/features/DRO/component/GoTo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export function GoTo({ units, wpos, disabled }: GotoProps) {
217217
key={key}
218218
onClick={() => !isDisabled && onModeChange(key)}
219219
className={`flex-1 py-1 text-xs font-medium transition-colors
220-
${isActive ? "bg-blue-600 text-white" : "text-gray-600 hover:bg-gray-100"}
220+
${isActive ? "bg-blue-600 text-white" : "text-gray-600 hover:bg-gray-100 dark:text-content-primary dark:hover:bg-surface-hover"}
221221
${isDisabled ? "opacity-40 cursor-not-allowed" : ""}`}
222222
disabled={isDisabled}
223223
title={

src/app/src/features/Gamepad/JoystickOptions.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ControlledInput } from "app/components/ControlledInput";
22
import { Switch } from "app/components/shadcn/Switch";
3+
import { getThemeCssColor } from "app/lib/getThemeCssColor";
34
import { useGamepadListener } from "app/lib/hooks/useGamepadListener";
45
import cloneDeep from "lodash/cloneDeep";
56
import get from "lodash/get";

src/app/src/features/Keyboard/Keyboard/EditArea.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const EditArea = ({ shortcut, shortcuts, edit, onClose }: EditProps) => {
183183
let cleanedShortcut = null;
184184

185185
if (shortcut.keys === "") {
186-
return <span className="text-gray-500">None</span>;
186+
return <span className="text-gray-500 dark:text-gray-300">None</span>;
187187
}
188188

189189
if (shortcutArray[shortcutArray.length - 1] === "") {
@@ -243,18 +243,18 @@ const EditArea = ({ shortcut, shortcuts, edit, onClose }: EditProps) => {
243243

244244
return (
245245
<>
246-
<div className="space-y-6">
246+
<div className="mt-2 space-y-6">
247247
{/* Header Section */}
248-
<div className="grid grid-cols-2 gap-4 p-4 bg-gray-50 rounded-lg">
248+
<div className="grid grid-cols-2 gap-4 p-4 bg-gray-50 dark:bg-surface-elevated rounded-lg">
249249
<div>
250-
<h4 className="text-sm font-medium text-gray-500 mb-1">Action</h4>
251-
<h4 className="text-lg font-semibold text-gray-900">{title}</h4>
250+
<h4 className="text-sm font-medium text-gray-500 dark:text-gray-400 mb-1">Action</h4>
251+
<h4 className="text-lg font-semibold text-gray-900 dark:text-gray-100">{title}</h4>
252252
</div>
253253
<div>
254-
<h4 className="text-sm font-medium text-gray-500 mb-1">
254+
<h4 className="text-sm font-medium text-gray-500 dark:text-gray-400 mb-1">
255255
Current Shortcut
256256
</h4>
257-
<h4 className="text-lg font-semibold text-gray-900">
257+
<h4 className="text-lg font-semibold text-gray-900 dark:text-gray-100">
258258
{displayShortcut()}
259259
</h4>
260260
</div>

src/app/src/features/MachineInfo/MachineInfoDisplay.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ export function MachineInfoDisplay({
189189
</div>
190190
{currentTool >= 0 && (
191191
<div className="text-gray-500 flex w-full gap-4">
192-
<span>Current tool: </span>
193-
<span className="text-black">T{currentTool}</span>
192+
<span className="text-gray-500 dark:text-content-primary">Current tool: </span>
193+
<span className="text-black dark:text-content-primary">T{currentTool}</span>
194194
</div>
195195
)}
196196
<div className="flex flex-row gap-4 items-center mt-4">

0 commit comments

Comments
 (0)