From ef315b6ddeb4bcc1a9a2994e75a46cefb735441e Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 23 Nov 2025 16:55:46 +0100 Subject: [PATCH] consistent borders and removed some comments --- interface/src/App.tsx | 1 - interface/src/CustomTheme.tsx | 4 +--- interface/src/app/status/SystemMonitor.tsx | 2 +- interface/src/components/inputs/LanguageSelector.tsx | 2 -- interface/src/components/layout/ListMenuItem.tsx | 1 - interface/src/components/loading/LazyLoader.tsx | 1 - interface/src/components/loading/LoadingSpinner.tsx | 1 - 7 files changed, 2 insertions(+), 10 deletions(-) diff --git a/interface/src/App.tsx b/interface/src/App.tsx index 6bd614984..c92e5f9cd 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -8,7 +8,6 @@ import type { Locales } from 'i18n/i18n-types'; import { loadLocaleAsync } from 'i18n/i18n-util.async'; import { detectLocale, navigatorDetector } from 'typesafe-i18n/detectors'; -// Memoize available locales to prevent recreation on every render const AVAILABLE_LOCALES = [ 'de', 'en', diff --git a/interface/src/CustomTheme.tsx b/interface/src/CustomTheme.tsx index 223e55ba7..7709210fd 100644 --- a/interface/src/CustomTheme.tsx +++ b/interface/src/CustomTheme.tsx @@ -11,17 +11,15 @@ import { createTheme } from '@mui/material/styles'; import type { RequiredChildrenProps } from 'utils'; -// Memoize dialog style to prevent recreation export const dialogStyle = { '& .MuiDialog-paper': { borderRadius: '8px', borderColor: '#565656', borderStyle: 'solid', - borderWidth: '1px' + borderWidth: '2px' } } as const; -// Memoize theme creation to prevent recreation const theme = responsiveFontSizes( createTheme({ typography: { diff --git a/interface/src/app/status/SystemMonitor.tsx b/interface/src/app/status/SystemMonitor.tsx index 79ce8c8e8..492049074 100644 --- a/interface/src/app/status/SystemMonitor.tsx +++ b/interface/src/app/status/SystemMonitor.tsx @@ -113,7 +113,7 @@ const SystemMonitor = () => { minWidth: '300px', maxWidth: '500px', backgroundColor: '#393939', - border: 3, + border: 2, borderColor: '#565656', borderRadius: '8px', boxShadow: '0 8px 32px rgba(0, 0, 0, 0.3)', diff --git a/interface/src/components/inputs/LanguageSelector.tsx b/interface/src/components/inputs/LanguageSelector.tsx index 3b862a35f..6e0ab57f2 100644 --- a/interface/src/components/inputs/LanguageSelector.tsx +++ b/interface/src/components/inputs/LanguageSelector.tsx @@ -19,10 +19,8 @@ import { I18nContext } from 'i18n/i18n-react'; import type { Locales } from 'i18n/i18n-types'; import { loadLocaleAsync } from 'i18n/i18n-util.async'; -// Extract style to constant to prevent recreation const flagStyle: CSSProperties = { width: 16, verticalAlign: 'middle' }; -// Define language options outside component to prevent recreation interface LanguageOption { key: Locales; flag: string; diff --git a/interface/src/components/layout/ListMenuItem.tsx b/interface/src/components/layout/ListMenuItem.tsx index b20d2409b..db92093de 100644 --- a/interface/src/components/layout/ListMenuItem.tsx +++ b/interface/src/components/layout/ListMenuItem.tsx @@ -22,7 +22,6 @@ interface ListMenuItemProps { disabled?: boolean; } -// Extract styles to prevent recreation const iconStyles: CSSProperties = { justifyContent: 'right', color: 'lightblue', diff --git a/interface/src/components/loading/LazyLoader.tsx b/interface/src/components/loading/LazyLoader.tsx index 02ba6bce7..6a765ebea 100644 --- a/interface/src/components/loading/LazyLoader.tsx +++ b/interface/src/components/loading/LazyLoader.tsx @@ -3,7 +3,6 @@ import { memo } from 'react'; import { Box, CircularProgress } from '@mui/material'; import type { SxProps, Theme } from '@mui/material'; -// Extract styles to prevent recreation on every render const containerStyles: SxProps = { display: 'flex', justifyContent: 'center', diff --git a/interface/src/components/loading/LoadingSpinner.tsx b/interface/src/components/loading/LoadingSpinner.tsx index b824789bb..c979f8c27 100644 --- a/interface/src/components/loading/LoadingSpinner.tsx +++ b/interface/src/components/loading/LoadingSpinner.tsx @@ -7,7 +7,6 @@ interface LoadingSpinnerProps { height?: number | string; } -// Extract styles to prevent recreation on every render const circularProgressStyles: SxProps = (theme: Theme) => ({ margin: theme.spacing(4), color: theme.palette.text.secondary