HifiPlanet-Website/hifi-src/src/pages/admin/settings
Maaxxs 5f1d4e1092 Add CMS v1: editable business identity and legal pages
Phase 5 of the dashboard roadmap. Business-facing data that was
previously hard-coded (and, for address/hours, duplicated three
independent ways across Footer.jsx, ContactPage.jsx, and the i18n
strings) is now stored in app_settings and editable under Website
settings: logo (light/dark variants, falling back to the bundled
defaults until set), street/zip/city, and a day-by-day business_hours
editor. Footer.jsx and ContactPage.jsx now share one open/closed and
hours-formatting implementation (new utils/businessHours.js) instead
of three separate hard-coded representations of the same thing.

New legal_pages table (impressum/datenschutz/agb) + PageContentController
replaces the three fully hard-coded React pages with fetched, admin-
editable HTML - built-in defaults matching the original page content
kick in until an admin saves anything, so a fresh install isn't blank.
Reuses the Phase 4 RichTextEditor (extended with a heading toggle and
inline-code toggle, since the legal text needs both) via a new
"Rechtstexte" tab in Settings. Legal content lives only in DB and is
authored exclusively by logged-in admins, so dangerouslySetInnerHTML
here doesn't take untrusted input.

IMAGE_COLUMNS in SettingsController (export/import) is now table =>
array of columns instead of table => one column, since app_settings
has three image columns (hero/logo/logo_dark) - this also retroactively
fixes hero_image_path never having been wired into export/import at
all. app_settings and legal_pages both got TABLE_COLUMNS/IMPORT_SECTIONS
entries so they round-trip through a hoster-migration export like
everything else.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 02:03:59 +02:00
..
DatabaseSettings.jsx Redesign navbar mobile menu and rework site color palette 2026-07-06 16:21:48 +02:00
EmailSettings.jsx Add rich-text formatting and font choice for email templates 2026-09-09 01:49:13 +02:00
ExportImportSettings.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
LegalSettings.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
MaintenanceSettings.jsx Redesign navbar mobile menu and rework site color palette 2026-07-06 16:21:48 +02:00
ResetSettings.jsx Populate the gallery with the full photo collection from the old hifi-planet.de site 2026-07-07 19:50:49 +02:00
SettingsLayout.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
WebsiteSettings.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00