This commit is contained in:
Tomáš Dvořák
2025-10-17 11:15:09 +02:00
parent 35d0954afd
commit 96ff7895a6
61 changed files with 3824 additions and 1061 deletions
+10 -3
View File
@@ -13,7 +13,7 @@ import { SearchResult } from '../services/facr/types';
import { extractPalette, pickTextColor, generateJwtSecret, contrastRatio, isContrastAccessible, generateThemeCandidates, ThemeCandidate, adjustForContrast } from '../utils/colors';
import { clearToken, setHasAdmin } from '../utils/auth';
import ContactMap from '../components/home/ContactMap';
import { FONT_PAIRINGS, loadGoogleFont, getFontStyleColor } from '../config/fonts';
import { FONT_PAIRINGS, applyFontPairing, getFontStyleColor } from '../config/fonts';
import MapLinkImporter from '../components/admin/MapLinkImporter';
import MapStyleSelector from '../components/admin/MapStyleSelector';
import { MapCoordinates } from '../utils/mapUrlParser';
@@ -165,14 +165,21 @@ const SetupPage: React.FC = () => {
return () => clearTimeout(t);
}, [clubQuery, searchClubs]);
// Load selected font for preview
// Load and apply selected font for preview
useEffect(() => {
const pairing = FONT_PAIRINGS.find((f) => f.id === selectedFont);
if (pairing) {
loadGoogleFont(pairing.googleFontsUrl);
applyFontPairing(pairing);
}
}, [selectedFont]);
// Auto-fill SMTP username from contact email
useEffect(() => {
if (contactEmail && !smtpUser) {
setSmtpUser(contactEmail);
}
}, [contactEmail, smtpUser]);
const handleSelectClub = async (item: SearchResult) => {
const clubIdValue = item.club_id || '';
setClubId(clubIdValue);