updated table structure for photobooth/sparkbooth settings. now there's a separate table for it. update all references and tests. also fixed the notification panel and the lightbox in the guest app.
This commit is contained in:
@@ -279,13 +279,17 @@ export default function HomePage() {
|
||||
introArray.push(candidate);
|
||||
}
|
||||
}
|
||||
const introMessage =
|
||||
introArray.length > 0 ? introArray[Math.floor(Math.random() * introArray.length)] : '';
|
||||
const introMessageRef = React.useRef<string | null>(null);
|
||||
if (!introMessageRef.current) {
|
||||
introMessageRef.current =
|
||||
introArray.length > 0 ? introArray[Math.floor(Math.random() * introArray.length)] : '';
|
||||
}
|
||||
const introMessage = introMessageRef.current;
|
||||
|
||||
if (!tasksEnabled) {
|
||||
return (
|
||||
<div className="space-y-3 pb-24" style={bodyFont ? { fontFamily: bodyFont } : undefined}>
|
||||
<section className="space-y-1 px-4">
|
||||
<section className="space-y-1 px-4" style={headingFont ? { fontFamily: headingFont } : undefined}>
|
||||
<p className="text-sm font-semibold text-foreground">
|
||||
{t('home.welcomeLine').replace('{name}', displayName)}
|
||||
</p>
|
||||
@@ -312,7 +316,7 @@ export default function HomePage() {
|
||||
|
||||
return (
|
||||
<div className="space-y-0.5 pb-24" style={bodyFont ? { fontFamily: bodyFont } : undefined}>
|
||||
<section className="space-y-1 px-4">
|
||||
<section className="space-y-1 px-4" style={headingFont ? { fontFamily: headingFont } : undefined}>
|
||||
<p className="text-sm font-semibold text-foreground">
|
||||
{t('home.welcomeLine').replace('{name}', displayName)}
|
||||
</p>
|
||||
@@ -476,12 +480,13 @@ function MissionActionCard({
|
||||
const bodyFont = branding.typography?.body ?? branding.fontFamily ?? undefined;
|
||||
const cards = mission ? [mission, ...stack] : stack;
|
||||
const shellRadius = `${radius + 10}px`;
|
||||
const normalizeText = (value: string | undefined | null) =>
|
||||
(value ?? '').trim().toLowerCase().replace(/\s+/g, ' ');
|
||||
|
||||
const renderCardContent = (card: MissionPreview | null) => {
|
||||
const theme = getEmotionTheme(card?.emotion ?? null);
|
||||
const emotionIcon = getEmotionIcon(card?.emotion ?? null);
|
||||
const durationMinutes = card?.duration ?? 3;
|
||||
const progressValue = Math.min(100, Math.max(20, (durationMinutes / 8) * 100));
|
||||
const titleFont = headingFont ? { fontFamily: headingFont } : undefined;
|
||||
const gradientBackground = card ? theme.gradientBackground : `linear-gradient(135deg, ${primary}, ${secondary})`;
|
||||
|
||||
@@ -524,7 +529,7 @@ function MissionActionCard({
|
||||
</Badge>
|
||||
<div className="flex items-center gap-2 text-xs font-medium text-slate-600">
|
||||
<Sparkles className="h-4 w-4 text-amber-500" aria-hidden />
|
||||
<span>Deine nächste Foto-Aufgabe wartet</span>
|
||||
<span>Foto-Challenge</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -538,7 +543,7 @@ function MissionActionCard({
|
||||
<div className="mt-4 text-center">
|
||||
{card ? (
|
||||
<p
|
||||
className="text-2xl font-semibold leading-tight text-slate-900 line-clamp-2"
|
||||
className="text-2xl font-semibold leading-tight text-slate-900 line-clamp-3 min-h-[3.5rem] py-1"
|
||||
style={{ ...titleFont, textShadow: '0 6px 18px rgba(15,23,42,0.28)' }}
|
||||
>
|
||||
{card.title}
|
||||
@@ -554,16 +559,18 @@ function MissionActionCard({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{card?.description && normalizeText(card.title) !== normalizeText(card.description) ? (
|
||||
<div className="mt-4 space-y-2">
|
||||
<Progress
|
||||
value={card ? progressValue : 35}
|
||||
className="h-2 overflow-hidden bg-white/70"
|
||||
/>
|
||||
<div className="flex items-center justify-between text-[11px] font-semibold uppercase tracking-wide text-slate-500">
|
||||
<span>Mission bereit</span>
|
||||
<span>{card ? 'Tippe zum Start' : 'Neue Mission lädt'}</span>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1 text-left">
|
||||
<p className="text-sm font-semibold text-slate-800" style={titleFont}>
|
||||
{card.title}
|
||||
</p>
|
||||
<p className="text-sm leading-relaxed text-slate-600">{card.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="mt-4 grid grid-cols-[2fr_1fr] gap-2">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user