From d66bbca82ce95794c25160a0830c8ff55aea788a Mon Sep 17 00:00:00 2001 From: Janez T Date: Fri, 3 Apr 2026 22:38:21 +0200 Subject: [PATCH] feat: Add dark theme charts ref: --- ios/Runner.xcodeproj/project.pbxproj | 12 +++--- ios/Runner/Info.plist | 2 +- pubspec.yaml | 2 +- .../components/dashboard/dashboard-shell.tsx | 42 +++++++++---------- worker/src/components/ui/badge.tsx | 2 +- worker/src/components/ui/card.tsx | 2 +- worker/src/index.css | 40 ++++++++++++++++-- worker/src/layouts/BaseLayout.astro | 6 +++ 8 files changed, 73 insertions(+), 35 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index efeaa9a..ff585a7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -489,7 +489,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -511,7 +511,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -530,7 +530,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -547,7 +547,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -679,7 +679,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -702,7 +702,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 131; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 8acee1d..244faf0 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -43,7 +43,7 @@ CFBundleSignature ???? CFBundleVersion - 130 + 131 LSRequiresIPhoneOS ITSAppUsesNonExemptEncryption diff --git a/pubspec.yaml b/pubspec.yaml index 8c77059..d21af7c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2026.0402.1+44 +version: 2026.0403.1+45 environment: sdk: ^3.9.2 diff --git a/worker/src/components/dashboard/dashboard-shell.tsx b/worker/src/components/dashboard/dashboard-shell.tsx index c60bdb2..5ebb6bc 100644 --- a/worker/src/components/dashboard/dashboard-shell.tsx +++ b/worker/src/components/dashboard/dashboard-shell.tsx @@ -504,12 +504,12 @@ function CompositionChart({ points }: { points: CompositionPoint[] }) { > - - + + - - + + @@ -517,21 +517,21 @@ function CompositionChart({ points }: { points: CompositionPoint[] }) { const y = (1 - val / maxVal) * innerH; return ( - - + + {formatCompact(val)} ); })} - + {/* X labels */} {points.map((p, i) => (i % labelStep === 0 || i === count - 1) ? ( - + {p.label.slice(5)} ) : null)} @@ -550,7 +550,7 @@ function CompositionChart({ points }: { points: CompositionPoint[] }) { ))} {hover !== null && ( - + )} @@ -630,12 +630,12 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max > - - + + - - + + @@ -644,8 +644,8 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max const y = (1 - val / maxValue) * innerH; return ( - - + + {formatCompact(val)} @@ -653,7 +653,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max })} {/* baseline */} - + {/* area fill */} @@ -666,7 +666,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max cx={xs[peakIdx] * innerW} cy={ys[peakIdx] * innerH} r={1.5} - fill="hsl(217, 91%, 60%)" + fill="hsl(var(--chart-primary))" stroke="white" strokeWidth={0.6} /> @@ -676,7 +676,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max x={xs[peakIdx] * innerW} y={ys[peakIdx] * innerH - 4} textAnchor="middle" - fill="hsl(217, 91%, 45%)" + fill="hsl(var(--chart-primary-accent))" fontSize={3} fontWeight={600} fontFamily="var(--font-sans)" @@ -691,7 +691,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max x={xs[i] * innerW} y={innerH + 10} textAnchor="middle" - fill="hsl(208, 19%, 55%)" + fill="hsl(var(--chart-label))" fontSize={2.8} fontFamily="var(--font-sans)" > @@ -723,7 +723,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max y1={0} x2={xs[hover] * innerW} y2={innerH} - stroke="hsl(217, 91%, 60%)" + stroke="hsl(var(--chart-primary))" strokeWidth={0.3} strokeDasharray="1.5 1" /> @@ -732,7 +732,7 @@ function TrafficChart({ points, maxValue: _rawMax }: { points: ChartPoint[]; max cy={ys[hover] * innerH} r={1.2} fill="white" - stroke="hsl(217, 91%, 60%)" + stroke="hsl(var(--chart-primary))" strokeWidth={0.6} /> diff --git a/worker/src/components/ui/badge.tsx b/worker/src/components/ui/badge.tsx index 988f062..8f48d14 100644 --- a/worker/src/components/ui/badge.tsx +++ b/worker/src/components/ui/badge.tsx @@ -11,7 +11,7 @@ const badgeVariants = cva( default: "border-transparent bg-primary text-primary-foreground", secondary: "border-transparent bg-secondary text-secondary-foreground", destructive: "border-transparent bg-destructive text-destructive-foreground", - outline: "text-foreground bg-white/60", + outline: "text-foreground bg-card/60", }, }, defaultVariants: { diff --git a/worker/src/components/ui/card.tsx b/worker/src/components/ui/card.tsx index 6171474..42d2df2 100644 --- a/worker/src/components/ui/card.tsx +++ b/worker/src/components/ui/card.tsx @@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
+