komplette überarbeitung des Gäste-Hilfebereichs und Ergänzung eines One-Time-Containers zum Aktualisieren der Hilfedokumente
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import AppearanceToggleDropdown from '@/components/appearance-dropdown';
|
||||
import {
|
||||
User,
|
||||
@@ -131,6 +131,7 @@ function renderEventAvatar(name: string, icon: unknown, accentColor: string, tex
|
||||
}
|
||||
|
||||
export default function Header({ eventToken, title = '' }: { eventToken?: string; title?: string }) {
|
||||
const location = useLocation();
|
||||
const statsContext = useOptionalEventStats();
|
||||
const identity = useOptionalGuestIdentity();
|
||||
const { t } = useTranslation();
|
||||
@@ -189,6 +190,12 @@ export default function Header({ eventToken, title = '' }: { eventToken?: string
|
||||
|
||||
const headerFont = branding.typography?.heading ?? branding.fontFamily ?? undefined;
|
||||
const bodyFont = branding.typography?.body ?? branding.fontFamily ?? undefined;
|
||||
const basePath = eventToken ? `/e/${encodeURIComponent(eventToken)}` : '';
|
||||
const showGalleryHelp = Boolean(
|
||||
basePath
|
||||
&& (location.pathname.startsWith(`${basePath}/gallery`) || location.pathname.startsWith(`${basePath}/photo`))
|
||||
);
|
||||
const galleryHelpHref = basePath ? `${basePath}/help/gallery-and-sharing` : '/help/gallery-and-sharing';
|
||||
|
||||
const headerStyle: React.CSSProperties = {
|
||||
background: `linear-gradient(135deg, ${branding.primaryColor}, ${branding.secondaryColor})`,
|
||||
@@ -255,6 +262,15 @@ export default function Header({ eventToken, title = '' }: { eventToken?: string
|
||||
t={t}
|
||||
/>
|
||||
)}
|
||||
{showGalleryHelp && (
|
||||
<Link
|
||||
to={galleryHelpHref}
|
||||
className="rounded-full bg-white/15 p-2 text-white transition hover:bg-white/30"
|
||||
aria-label={t('header.helpGallery')}
|
||||
>
|
||||
<LifeBuoy className="h-5 w-5" aria-hidden />
|
||||
</Link>
|
||||
)}
|
||||
<AppearanceToggleDropdown />
|
||||
<SettingsSheet />
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,10 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
online: 'online',
|
||||
tasksSolved: 'Aufgaben gelöst',
|
||||
},
|
||||
helpGallery: 'Hilfe zu Galerie & Teilen',
|
||||
notifications: {
|
||||
tabStatus: 'Upload-Status',
|
||||
},
|
||||
},
|
||||
eventAccess: {
|
||||
loading: {
|
||||
@@ -659,10 +663,10 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
clear: 'Cache leeren',
|
||||
clearing: 'Leere Cache...',
|
||||
cleared: 'Cache gelöscht.',
|
||||
note: 'Dies betrifft nur diesen Browser und muss pro Gerät erneut ausgeführt werden.',
|
||||
note: 'Dies betrifft nur diesen Browser. Wartende Uploads können verloren gehen.',
|
||||
},
|
||||
help: {
|
||||
title: 'Hilfe & Support',
|
||||
title: 'Hilfecenter',
|
||||
description: 'Öffne das Hilfecenter mit Schritt-für-Schritt-Anleitungen.',
|
||||
cta: 'Hilfecenter öffnen',
|
||||
},
|
||||
@@ -677,7 +681,7 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
},
|
||||
help: {
|
||||
center: {
|
||||
title: 'Hilfe & Tipps',
|
||||
title: 'Hilfecenter',
|
||||
subtitle: 'Antworten für Gäste – nach dem ersten Laden auch offline verfügbar.',
|
||||
searchPlaceholder: 'Suche nach Thema oder Stichwort',
|
||||
offlineBadge: 'Offline-Version',
|
||||
@@ -716,6 +720,10 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
online: 'online',
|
||||
tasksSolved: 'tasks solved',
|
||||
},
|
||||
helpGallery: 'Help: Gallery & sharing',
|
||||
notifications: {
|
||||
tabStatus: 'Upload status',
|
||||
},
|
||||
},
|
||||
eventAccess: {
|
||||
loading: {
|
||||
@@ -1339,10 +1347,10 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
clear: 'Clear cache',
|
||||
clearing: 'Clearing cache...',
|
||||
cleared: 'Cache cleared.',
|
||||
note: 'This only affects this browser and must be repeated per device.',
|
||||
note: 'This only affects this browser. Pending uploads may be lost.',
|
||||
},
|
||||
help: {
|
||||
title: 'Help & support',
|
||||
title: 'Help Center',
|
||||
description: 'Open the help center for guides and quick answers.',
|
||||
cta: 'Open help center',
|
||||
},
|
||||
@@ -1357,7 +1365,7 @@ export const messages: Record<LocaleCode, NestedMessages> = {
|
||||
},
|
||||
help: {
|
||||
center: {
|
||||
title: 'Help & tips',
|
||||
title: 'Help Center',
|
||||
subtitle: 'Guides for guests – available offline after the first sync.',
|
||||
searchPlaceholder: 'Search by topic or keyword',
|
||||
offlineBadge: 'Offline copy',
|
||||
|
||||
Reference in New Issue
Block a user