From b660f0f6c31b81ef3593150c0e8faff7741daf14 Mon Sep 17 00:00:00 2001 From: David Fencl Date: Fri, 5 Jun 2026 23:40:56 +0200 Subject: [PATCH] feat: add contact link to settings, update lake labels and sidebar icons, and enhance KPI flow visualization --- src/components/KpiCards.tsx | 20 ++++++++++++++++---- src/components/SettingsModal.tsx | 25 +++++++++++++++++++++++++ src/components/Sidebar.tsx | 4 ++-- src/translations.ts | 8 ++++++-- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/components/KpiCards.tsx b/src/components/KpiCards.tsx index dfd8632..b60f993 100644 --- a/src/components/KpiCards.tsx +++ b/src/components/KpiCards.tsx @@ -79,10 +79,22 @@ const KpiCards = ({ data, language, lakeName = 'Lipno 1' }: Props) => { {/* Flow Circle */} -
- -
{data.outflow.toFixed(1)}
-
m³/s
+
= 0 ? 'rgba(74, 222, 128, 0.2)' : 'rgba(248, 113, 113, 0.2)'}`, + borderTopColor: flowDiff >= 0 ? 'var(--color-green)' : 'var(--color-red)', + borderRightColor: flowDiff >= 0 ? 'var(--color-green)' : 'var(--color-red)', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + transform: 'rotate(-45deg)', + flexShrink: 0 + }}> + = 0 ? 'var(--color-green)' : 'var(--color-red)', fontWeight: 'bold', textAlign: 'center', lineHeight: 1.2 }}> +
{flowDiff > 0 ? '+' : ''}{flowDiff.toFixed(1)}
+
m³/s
diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx index 6176a5b..aa2f8da 100644 --- a/src/components/SettingsModal.tsx +++ b/src/components/SettingsModal.tsx @@ -114,6 +114,31 @@ const SettingsModal = ({ language, setLanguage, theme, setTheme, onClose }: Prop + {/* Contact */} +
+ + e.currentTarget.style.opacity = '1'} + onMouseOut={(e) => e.currentTarget.style.opacity = '0.9'} + > + ✉ info@hladinator.cz + +
+ {/* Buy me a coffee */}
{dict.favorites}
handleNavigate('/')}> - + {dict.lakes}
handleNavigate('/map')}> diff --git a/src/translations.ts b/src/translations.ts index 106c0bc..1e99ae8 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -4,7 +4,7 @@ export const t = { en: { sidebar: { favorites: 'Favorites', - lakes: 'Lakes', + lakes: 'Lakes & Reservoirs', map: 'Map', settings: 'Settings' }, @@ -46,13 +46,15 @@ export const t = { language: 'Language', english: 'English', czech: 'Čeština', + contact: 'Contact', + contactPlaceholder: 'Your email address', buyCoffee: 'Buy Me a Coffee' } }, cs: { sidebar: { favorites: 'Oblíbené', - lakes: 'Jezera', + lakes: 'Jezera a nádrže', map: 'Mapa', settings: 'Nastavení' }, @@ -94,6 +96,8 @@ export const t = { language: 'Jazyk', english: 'English', czech: 'Čeština', + contact: 'Kontakt', + contactPlaceholder: 'Vaše e-mailová adresa', buyCoffee: 'Kup mi kávu' } }