From 69171f77789ac4824373113de0392705790924e2 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Sat, 27 Dec 2025 20:00:51 -0600 Subject: [PATCH] fix: post Dark mode fixes --- backend/Dockerfile | 2 +- frontend/index.html | 1 + frontend/src/components/Layout.tsx | 12 ++-- .../admin/mobile/AdminBackupMobileScreen.tsx | 6 +- .../admin/mobile/AdminCatalogMobileScreen.tsx | 22 +++--- .../AdminEmailTemplatesMobileScreen.tsx | 4 +- .../admin/mobile/AdminUsersMobileScreen.tsx | 10 +-- .../features/auth/pages/VerifyEmailPage.tsx | 8 +-- .../mobile/DocumentsMobileScreen.tsx | 24 +++---- .../fuel-logs/components/FuelLogForm.tsx | 10 ++- .../fuel-logs/components/StationPicker.tsx | 5 +- .../settings/mobile/DeleteAccountModal.tsx | 22 +++--- .../settings/mobile/MobileSettingsScreen.tsx | 70 +++++++++---------- frontend/src/index.css | 18 +++++ .../components/mobile/GlassCard.tsx | 2 +- .../components/mobile/MobileContainer.tsx | 2 +- .../components/mobile/MobilePill.tsx | 2 +- 17 files changed, 125 insertions(+), 95 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 6dfcf45..833ecd2 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -53,7 +53,7 @@ COPY --from=builder /app/src/core /app/migrations/core # Copy entrypoint script for permission checks COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -RUN chmod +x /usr/local/bin/docker-entrypoint.sh +RUN chmod 755 /usr/local/bin/docker-entrypoint.sh # Change ownership to non-root user RUN chown -R nodejs:nodejs /app diff --git a/frontend/index.html b/frontend/index.html index 9834c22..8cad153 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,6 +4,7 @@ + MotoVaultPro diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index 440bc51..42c3d53 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { useAuth0 } from '@auth0/auth0-react'; import { Link, useLocation } from 'react-router-dom'; -import { Container, Paper, Typography, Box, IconButton, Avatar, useTheme } from '@mui/material'; +import { Container, Paper, Typography, Box, IconButton, Avatar } from '@mui/material'; import DirectionsCarRoundedIcon from '@mui/icons-material/DirectionsCarRounded'; import LocalGasStationRoundedIcon from '@mui/icons-material/LocalGasStationRounded'; import BuildRoundedIcon from '@mui/icons-material/BuildRounded'; @@ -28,7 +28,6 @@ export const Layout: React.FC = ({ children, mobileMode = false }) const { user, logout } = useAuth0(); const { sidebarOpen, toggleSidebar, setSidebarOpen } = useAppStore(); const location = useLocation(); - const theme = useTheme(); // Sync theme preference with backend useThemeSync(); @@ -128,14 +127,17 @@ export const Layout: React.FC = ({ children, mobileMode = false }) }} > ({ + backgroundColor: 'primary.main', + ...theme.applyStyles('dark', { + backgroundColor: 'transparent', + }), borderRadius: 1, px: 1, py: 0.5, display: 'inline-flex', alignItems: 'center' - }} + })} > { {showRestoreConfirm && (
-
+

Confirm Restore

@@ -988,7 +988,7 @@ export const AdminBackupMobileScreen: React.FC = () => { {/* Delete Backup Confirmation Modal */} {showDeleteBackupConfirm && (

-
+

Delete Backup

Are you sure you want to delete "{selectedBackup?.filename}"? This action cannot be @@ -1016,7 +1016,7 @@ export const AdminBackupMobileScreen: React.FC = () => { {/* Delete Schedule Confirmation Modal */} {showDeleteScheduleConfirm && (

-
+

Delete Schedule

Are you sure you want to delete "{selectedSchedule?.name}"? This action cannot be diff --git a/frontend/src/features/admin/mobile/AdminCatalogMobileScreen.tsx b/frontend/src/features/admin/mobile/AdminCatalogMobileScreen.tsx index 1ec3f2e..4167f92 100644 --- a/frontend/src/features/admin/mobile/AdminCatalogMobileScreen.tsx +++ b/frontend/src/features/admin/mobile/AdminCatalogMobileScreen.tsx @@ -379,14 +379,14 @@ export const AdminCatalogMobileScreen: React.FC = () => { {menuOpen && (

e.stopPropagation()} >
-

Options

+

Options

diff --git a/frontend/src/features/admin/mobile/AdminUsersMobileScreen.tsx b/frontend/src/features/admin/mobile/AdminUsersMobileScreen.tsx index 1a65a88..4701fbf 100644 --- a/frontend/src/features/admin/mobile/AdminUsersMobileScreen.tsx +++ b/frontend/src/features/admin/mobile/AdminUsersMobileScreen.tsx @@ -37,8 +37,8 @@ const Modal: React.FC = ({ isOpen, onClose, title, children, actions return (
-
-

{title}

+
+

{title}

{children}
{actions || ( @@ -337,7 +337,7 @@ export const AdminUsersMobileScreen: React.FC = () => { value={searchInput} onChange={(e) => setSearchInput(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleSearch()} - className="w-full px-4 py-3 rounded-lg border border-slate-200 focus:outline-none focus:ring-2 focus:ring-blue-500 min-h-[44px]" + className="w-full px-4 py-3 rounded-lg border border-slate-200 dark:border-silverstone dark:bg-scuro dark:text-avus focus:outline-none focus:ring-2 focus:ring-blue-500 min-h-[44px]" /> {searchInput && (
-

Session Expired

-

Your session has expired. Please log in again.

+

Session Expired

+

Your session has expired. Please log in again.

- {isLoading &&
Loading...
} + {isLoading &&
Loading...
} {hasError && !isAuthError && (
@@ -162,8 +162,8 @@ export const DocumentsMobileScreen: React.FC = () => {
-

No documents yet

-

Documents will appear here once you create them

+

No documents yet

+

Documents will appear here once you create them

)} @@ -174,8 +174,8 @@ export const DocumentsMobileScreen: React.FC = () => { return (
-
{doc.title}
-
{doc.documentType} • {vehicleLabel}
+
{doc.title}
+
{doc.documentType} • {vehicleLabel}
diff --git a/frontend/src/features/fuel-logs/components/FuelLogForm.tsx b/frontend/src/features/fuel-logs/components/FuelLogForm.tsx index 0c58daf..f379a2b 100644 --- a/frontend/src/features/fuel-logs/components/FuelLogForm.tsx +++ b/frontend/src/features/fuel-logs/components/FuelLogForm.tsx @@ -188,10 +188,16 @@ const FuelLogFormComponent: React.FC<{ onSuccess?: () => void; initial?: Partial InputProps={{ readOnly: true, sx: (theme) => ({ - backgroundColor: theme.palette.mode === 'dark' ? '#4C4E4D' : 'grey.50', + backgroundColor: 'grey.50', + ...theme.applyStyles('dark', { + backgroundColor: '#4C4E4D', + }), '& .MuiOutlinedInput-input': { cursor: 'default', - color: theme.palette.mode === 'dark' ? '#F2F3F6' : 'inherit', + color: 'inherit', + ...theme.applyStyles('dark', { + color: '#F2F3F6', + }), }, }), }} diff --git a/frontend/src/features/fuel-logs/components/StationPicker.tsx b/frontend/src/features/fuel-logs/components/StationPicker.tsx index a29eee0..eb9bd97 100644 --- a/frontend/src/features/fuel-logs/components/StationPicker.tsx +++ b/frontend/src/features/fuel-logs/components/StationPicker.tsx @@ -333,7 +333,10 @@ export const StationPicker: React.FC = ({ sx={(theme) => ({ '& .MuiAutocomplete-groupLabel': { fontWeight: 600, - backgroundColor: theme.palette.mode === 'dark' ? '#4C4E4D' : 'grey.100', + backgroundColor: 'grey.100', + ...theme.applyStyles('dark', { + backgroundColor: '#4C4E4D', + }), fontSize: '0.75rem', textTransform: 'uppercase', letterSpacing: '0.5px' diff --git a/frontend/src/features/settings/mobile/DeleteAccountModal.tsx b/frontend/src/features/settings/mobile/DeleteAccountModal.tsx index b67c39d..d078628 100644 --- a/frontend/src/features/settings/mobile/DeleteAccountModal.tsx +++ b/frontend/src/features/settings/mobile/DeleteAccountModal.tsx @@ -36,13 +36,13 @@ export const DeleteAccountModal: React.FC = ({ isOpen, return (
-
-

Delete Account

+
+

Delete Account

{/* Warning Alert */} -
-

30-Day Grace Period

-

+

+

30-Day Grace Period

+

Your account will be scheduled for deletion in 30 days. You can cancel this request at any time during the grace period by logging back in.

@@ -50,7 +50,7 @@ export const DeleteAccountModal: React.FC = ({ isOpen, {/* Confirmation Input */}
-
{/* Action Buttons */} @@ -73,7 +73,7 @@ export const DeleteAccountModal: React.FC = ({ isOpen, @@ -184,8 +184,8 @@ export const MobileSettingsScreen: React.FC = () => {
{/* Header */}
-

Settings

-

Manage your account and preferences

+

Settings

+

Manage your account and preferences

{/* Pending Deletion Banner */} @@ -195,7 +195,7 @@ export const MobileSettingsScreen: React.FC = () => {
-

Profile

+

Profile

{!isEditingProfile && !profileLoading && (
)}
-

+

{profile?.displayName || user?.name || 'User'}

-

{profile?.email || user?.email}

+

{profile?.email || user?.email}

-
+
-

Display Name

-

{profile?.displayName || 'Not set'}

+

Display Name

+

{profile?.displayName || 'Not set'}

-

Notification Email

-

{profile?.notificationEmail || 'Using primary email'}

+

Notification Email

+

{profile?.notificationEmail || 'Using primary email'}

@@ -319,7 +319,7 @@ export const MobileSettingsScreen: React.FC = () => { {/* Notifications Section */}
-

Notifications

+

Notifications

{ {/* Appearance & Units Section */}
-

Appearance & Units

+

Appearance & Units

{
-

Unit System

-

+

Unit System

+

Currently using {settings.unitSystem === 'imperial' ? 'Miles, Gallons, MPG, USD' : 'Km, Liters, L/100km, EUR'}

@@ -385,7 +385,7 @@ export const MobileSettingsScreen: React.FC = () => { {/* Data Management Section */}
-

Data Management

+

Data Management

-

+

Download a copy of all your vehicle and fuel data

@@ -421,7 +421,7 @@ export const MobileSettingsScreen: React.FC = () => { {!adminLoading && isAdmin && (
-

Admin Console

+

Admin Console

@@ -487,7 +487,7 @@ export const MobileSettingsScreen: React.FC = () => { onClose={() => setShowDataExport(false)} title="Export Data" > -

+

This will create a downloadable file containing all your vehicle data, fuel logs, and preferences.

diff --git a/frontend/src/index.css b/frontend/src/index.css index 2023212..f46efae 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -13,4 +13,22 @@ body { * { box-sizing: border-box; +} + +:root { + color-scheme: light; +} + +:root.dark { + color-scheme: dark; +} + +html { + background-color: #ffffff; + color: #1e293b; +} + +html.dark { + background-color: #231F1C; + color: #F2F3F6; } \ No newline at end of file diff --git a/frontend/src/shared-minimal/components/mobile/GlassCard.tsx b/frontend/src/shared-minimal/components/mobile/GlassCard.tsx index 6413641..54a7348 100644 --- a/frontend/src/shared-minimal/components/mobile/GlassCard.tsx +++ b/frontend/src/shared-minimal/components/mobile/GlassCard.tsx @@ -28,7 +28,7 @@ export const GlassCard: React.FC = ({ return (
= ({ }) => { return (
-
+
{children}
diff --git a/frontend/src/shared-minimal/components/mobile/MobilePill.tsx b/frontend/src/shared-minimal/components/mobile/MobilePill.tsx index 61d3848..b121275 100644 --- a/frontend/src/shared-minimal/components/mobile/MobilePill.tsx +++ b/frontend/src/shared-minimal/components/mobile/MobilePill.tsx @@ -29,7 +29,7 @@ export const MobilePill: React.FC = ({ "group h-11 rounded-2xl text-sm font-medium border transition flex items-center justify-center gap-2 backdrop-blur", active ? "text-white border-transparent shadow-lg bg-gradient-moto" - : "bg-white/80 text-slate-800 border-slate-200 hover:bg-slate-50", + : "bg-white/80 dark:bg-nero/80 text-slate-800 dark:text-avus border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-inactive", className )} >