feat: implement multilingual SEO support and enhance map UI with data synchronization updates

This commit is contained in:
David Fencl
2026-06-06 17:24:30 +02:00
parent 66021e001e
commit 6395df1992
30 changed files with 3036 additions and 280 deletions
+41 -4
View File
@@ -1,4 +1,4 @@
import { FiX, FiMoon, FiSun, FiGlobe, FiCoffee } from 'react-icons/fi';
import { FiX, FiMoon, FiSun, FiGlobe, FiCoffee, FiWind } from 'react-icons/fi';
import { type Language, t } from '../translations';
interface Props {
@@ -6,10 +6,12 @@ interface Props {
setLanguage: (lang: Language) => void;
theme: 'dark' | 'light';
setTheme: (theme: 'dark' | 'light') => void;
windUnit: 'kmh' | 'ms';
setWindUnit: (unit: 'kmh' | 'ms') => void;
onClose: () => void;
}
const SettingsModal = ({ language, setLanguage, theme, setTheme, onClose }: Props) => {
const SettingsModal = ({ language, setLanguage, theme, setTheme, windUnit, setWindUnit, onClose }: Props) => {
const dict = t[language].settings;
return (
@@ -96,7 +98,7 @@ const SettingsModal = ({ language, setLanguage, theme, setTheme, onClose }: Prop
cursor: 'pointer', transition: 'all 0.2s'
}}
>
<FiGlobe /> {dict.english}
<span style={{ fontSize: '1.2rem', lineHeight: 1 }}>🇬🇧</span> {dict.english}
</button>
<button
onClick={() => setLanguage('cs')}
@@ -109,7 +111,42 @@ const SettingsModal = ({ language, setLanguage, theme, setTheme, onClose }: Prop
cursor: 'pointer', transition: 'all 0.2s'
}}
>
<FiGlobe /> {dict.czech}
<span style={{ fontSize: '1.2rem', lineHeight: 1 }}>🇨🇿</span> {dict.czech}
</button>
</div>
</div>
{/* Wind Units Setting */}
<div style={{ marginBottom: '2rem' }}>
<label style={{ display: 'block', marginBottom: '0.75rem', color: 'var(--text-muted)', fontSize: '0.85rem', textTransform: 'uppercase', letterSpacing: '1px' }}>
{dict.windUnits}
</label>
<div style={{ display: 'flex', gap: '1rem' }}>
<button
onClick={() => setWindUnit('kmh')}
style={{
flex: 1, padding: '0.75rem', borderRadius: '0.5rem',
display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.5rem',
border: windUnit === 'kmh' ? '1px solid var(--color-cyan)' : '1px solid var(--border-color)',
backgroundColor: windUnit === 'kmh' ? 'rgba(6, 182, 212, 0.1)' : 'transparent',
color: windUnit === 'kmh' ? 'var(--color-cyan)' : 'var(--text-main)',
cursor: 'pointer', transition: 'all 0.2s'
}}
>
<FiWind /> {dict.windUnitKmh}
</button>
<button
onClick={() => setWindUnit('ms')}
style={{
flex: 1, padding: '0.75rem', borderRadius: '0.5rem',
display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.5rem',
border: windUnit === 'ms' ? '1px solid var(--color-cyan)' : '1px solid var(--border-color)',
backgroundColor: windUnit === 'ms' ? 'rgba(6, 182, 212, 0.1)' : 'transparent',
color: windUnit === 'ms' ? 'var(--color-cyan)' : 'var(--text-main)',
cursor: 'pointer', transition: 'all 0.2s'
}}
>
<FiWind /> {dict.windUnitMs}
</button>
</div>
</div>