die tenant admin oauth authentifizierung wurde implementiert und funktioniert jetzt. Zudem wurde das marketing frontend dashboard implementiert.

This commit is contained in:
Codex Agent
2025-11-04 16:14:07 +01:00
parent 55c606bdd4
commit 92e64c361a
11 changed files with 407 additions and 156 deletions

View File

@@ -92,37 +92,16 @@ export default function GalleryPage() {
const galleryLimits = eventPackage?.limits?.gallery ?? null;
const galleryCountdown = React.useMemo(() => {
if (!galleryLimits) {
if (!galleryLimits || galleryLimits.state !== 'expired') {
return null;
}
if (galleryLimits.state === 'expired') {
return {
tone: 'danger' as const,
label: t('galleryCountdown.expired'),
description: t('galleryCountdown.expiredDescription'),
cta: null,
};
}
if (galleryLimits.state === 'warning') {
const days = Math.max(0, galleryLimits.days_remaining ?? 0);
const label = days <= 1
? t('galleryCountdown.expiresToday')
: t('galleryCountdown.expiresIn').replace('{days}', `${days}`);
return {
tone: days <= 1 ? ('danger' as const) : ('warning' as const),
label,
description: t('galleryCountdown.description'),
cta: {
type: 'upload' as const,
label: t('galleryCountdown.ctaUpload'),
},
};
}
return null;
return {
tone: 'danger' as const,
label: t('galleryCountdown.expired'),
description: t('galleryCountdown.expiredDescription'),
cta: null,
};
}, [galleryLimits, t]);
const handleCountdownCta = React.useCallback(() => {
@@ -146,18 +125,6 @@ export default function GalleryPage() {
.replace('{used}', `${photoLimits.used}`)
.replace('{max}', `${photoLimits.limit}`),
});
} else if (
photoLimits?.state === 'warning'
&& typeof photoLimits.remaining === 'number'
&& typeof photoLimits.limit === 'number'
) {
warnings.push({
id: 'photos-warning',
tone: 'warning',
message: t('upload.limitWarning')
.replace('{remaining}', `${photoLimits.remaining}`)
.replace('{max}', `${photoLimits.limit}`),
});
}
if (galleryLimits?.state === 'expired') {
@@ -166,14 +133,6 @@ export default function GalleryPage() {
tone: 'danger',
message: t('upload.errors.galleryExpired'),
});
} else if (galleryLimits?.state === 'warning') {
const days = Math.max(0, galleryLimits.days_remaining ?? 0);
const key = days === 1 ? 'upload.galleryWarningDay' : 'upload.galleryWarningDays';
warnings.push({
id: 'gallery-warning',
tone: 'warning',
message: t(key).replace('{days}', `${days}`),
});
}
return warnings;