Version 1.0 squash

This commit is contained in:
Kenan Alić
2025-10-21 18:45:02 +02:00
parent 7536290f23
commit d1784542d3
30 changed files with 2534 additions and 15 deletions

50
web/src/routes/about.tsx Normal file
View File

@@ -0,0 +1,50 @@
/**
* About Page
*
* Displays information about credits and sponsors for the facility.
* Content is editable by staff through PocketBase rich text editor.
* Updates appear in real-time across all kiosks.
*/
/* Context */
import { useKioskData } from "@/contexts/kiosk-data-context";
/* Constants */
import { LOADING_MESSAGES, ERROR_MESSAGES, EMPTY_MESSAGES } from "@/constants/ui-text";
export function About() {
const { about, loading, error } = useKioskData();
/* Loading state */
if (loading) {
return (
<main className="flex h-full items-center justify-center">
<p className="text-muted-foreground">{LOADING_MESSAGES.content}</p>
</main>
);
}
/* Error state */
if (error) {
return (
<main className="flex h-full items-center justify-center">
<p className="text-destructive">{ERROR_MESSAGES.generic}</p>
</main>
);
}
/* Empty state - no about content created yet */
if (!about) {
return (
<main className="flex h-full items-center justify-center">
<p className="text-muted-foreground">{EMPTY_MESSAGES.noContent}</p>
</main>
);
}
return (
<main className="flex h-full flex-col overflow-auto">
<div className="prose prose-lg max-w-none" dangerouslySetInnerHTML={{ __html: about.content }} />
</main>
);
}