Matches the existing gallery card treatment (GalleryOverview.jsx): when a
brand or model has an image, the card becomes a full-bleed aspect-[4/3]
photo with a dark gradient and the name overlaid at the bottom, instead of
a small contained thumbnail sitting above the name on a plain card. Cards
without an image are unchanged (same bordered box, centered name) - only
the image case changes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a new custom_fonts table (name, a server-generated collision-free
font_family identifier, file_path) with its own upload endpoint
(CustomFontController) separate from the generic image-only /uploads,
since it needs to accept WOFF2/WOFF/TTF/OTF instead. New management UI in
WebsiteSettings.jsx ("Eigene Schriftarten"): upload with a display name,
list with delete.
CustomFontsContext.jsx fetches the list once per layout (PublicLayout.jsx
for visitors, AdminLayout.jsx for the dashboard) and exposes it two ways:
useFontOptionsWithCustom() appends the uploaded fonts to the existing
static FONT_OPTIONS list for every font picker (RichTextEditor,
TextStyleWidget, the per-section and global site-font dropdowns), and a
new CustomFontFaces.jsx component renders the @font-face rules that
actually make an uploaded font usable - without it, picking a custom font
would just reference a name the browser has no file for. refresh() lets
WebsiteSettings.jsx update every picker immediately after an
upload/delete, not just on next page load.
Fonts::isValid() replaces the three places that validated a font_family
value against the fixed Fonts::VALUES list (site-wide default, per-section
override, per-field text style) - it now also accepts any uploaded
font's generated identifier, so those endpoints don't reject a custom
font as an unknown value.
Verified locally end-to-end: migration creates the table, a simulated
upload's font_family passes validation while a nonexistent one doesn't,
index() returns the expected shape, and destroy() removes both the row
and the file from uploads/.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rolls the generic text_styles mechanism out to three more areas (Phase 3/4
of the earlier text-styling plan): brands.name, car_models.name,
packages.description and packages.price_text. Registry entries reuse each
table's existing manage permission (brands.manage/models.manage/
packages.manage). Widgets are gated on an existing row (editingId in
Brands.jsx/Models.jsx, row.existing in Packages.jsx's batch editor), since
a newly-created row has no id yet to key a style on.
Added fieldStyle()/useTextStylesMap() to TextStylesContext.jsx alongside
the existing useTextStyle() - brand/model lists are open-ended, so styling
each one from inside a .map() can't call a hook per item (rules of hooks);
fieldStyle() does a plain lookup against the already-loaded styles map
instead. pkg.name stays unstyled (it's chosen from a fixed tier list, not
free text).
Deleting a brand cascades to its models and their packages in the
database, so BrandController/ModelController::destroy() now collect the
cascaded ids first and clean up their text_styles rows too (mirroring how
they already do this for orphaned uploaded images); SettingsController's
catalog reset endpoints get the same cleanup in bulk.
Separately: package descriptions can now mark individual bullet points
bold. Packages.jsx gained a "Fett" button that wraps the current textarea
selection in **markers** (one line per bullet is unchanged); the public
ModelPage.jsx renders those through a new BoldText.jsx component that
turns **text** into <strong> via a plain regex - no dangerouslySetInnerHTML,
since the only possible output is a <strong> tag. Product-name bullets
(scraped from the linked shop, not admin-authored) are unaffected.
Verified locally: registry rejects packages.name (not free text) and a
non-numeric id, and deleting a test brand correctly cascades text_styles
cleanup through its model and package.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wrapping the header in an extra <div className="dark"> (to force the
always-dark navbar look from the last change) broke its sticky
positioning - it stayed pinned in place instead of scrolling normally
and sticking to the top edge.
Removes that wrapper entirely and instead hardcodes the header's own
"dark" Tailwind values directly (no dark: prefix, no conditional on the
real theme) for the header background/border, hamburger button, admin
icon, and the navbar's own language dropdown - all previously toggled via
a dark: variant that depended on an ancestor carrying the "dark" class.
The logo now always renders the dark-mode wordmark image directly rather
than swapping between two images via dark:hidden/dark:block.
ThemeToggle.jsx gained an opt-in forceDark prop for this one case, so its
other usages (admin dashboard) keep following the real theme as before -
only the navbar's copy of the button is pinned to look dark, its click
behavior (toggling the site's actual theme) is unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a new text_styles table keyed by field_key ("{table}.{slugOrId}.{column}")
so any individual text field anywhere in the dashboard can get its own
font-family/font-size/color override, without a dedicated column per field.
App\Support\TextStyleFields is a server-side registry of which table/column/
permission combinations are valid, so TextStyleController::update() can't be
used to write styling for a field outside the caller's own permission domain,
and typos can't create permanently orphaned rows. Resetting all three values
deletes the row entirely rather than leaving it null, so the table only ever
holds fields an admin actually customized.
Font-size reuses the same "curated list, mirrored PHP+JS constant" approach
already used for font-family (App\Support\Fonts / fontOptions.js) - a free px
input on dozens of independently-edited fields with no design review step is
the most likely way to end up with an accidentally 4px or 400px heading.
New reusable pieces: TextStyleWidget.jsx (a self-contained font/size/color
toolbar with a live preview, used next to any field by passing its
field_key) and TextStylesContext.jsx + useTextStyle() hook (bulk-fetches all
styles once per page load in PublicLayout.jsx, same pattern as
SiteSettingsContext). This first phase wires both into the home-section
eyebrow/title/button-label fields (the ones from the screenshot that started
this) as a proven pilot; the registry is designed so extending it to the
remaining ~15 admin pages is just adding entries and wiring the widget/hook,
no new architecture.
Verified locally via direct PHP invocation: migration creates the table,
registry validation accepts only known table/slug-or-id/column
combinations and rejects the rest, upsert/reset round-trips correctly, and
a second migration run doesn't re-touch anything.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- MaintenanceNotice: the full-screen maintenance view now has a small
"Anmelden"/"Log in" link fixed in the bottom-right corner, so a logged-out
admin can reach /admin/login (and from there, maintenance-bypass access)
without knowing the URL by heart.
- Navbar: wrapped in a permanently "dark" container so every dark: utility
in it (background, borders, logo variant, icon colors, language-switcher
dropdown) always applies regardless of the visitor's actual light/dark
preference, per customer request. The real theme toggle still controls
the rest of the site as before - only the navbar's own appearance is
pinned. The portal-rendered mobile flyout menu is unaffected (it already
had its own fixed light styling, independent of the toggle).
- AdminLayout: the dashboard's company logo (desktop sidebar and mobile top
bar) is now a link to "/" instead of inert markup.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extracts the system-font list already used by RichTextEditor for mail
templates into a shared hifi-src/src/utils/fontOptions.js (frontend) and
App\Support\Fonts (backend), so it can drive two new pickers with a
consistent set of options.
Global: a new app_settings.site_font setting, exposed as an admin dropdown
in WebsiteSettings.jsx. tailwind.config.js now defines font-sans as
var(--site-font, ui-sans-serif, system-ui, sans-serif); Tailwind's
preflight already applies font-sans globally to <html>, so this alone
makes the chosen font cascade to virtually every text on the public site
without touching individual components. PublicLayout.jsx sets the CSS
variable from the fetched site settings.
Per-section override: a new home_sections.font_family column, editable
per homepage section in HomeSections.jsx ("Standard" = inherit the global
font). Home.jsx applies it as an inline style on each section's wrapper,
which naturally wins over the CSS-variable-driven global default when
set. Reveal.jsx gained an optional style prop (merged into its own
transform/opacity style) so the four flowing-text sections, which use it
directly as their wrapper, can receive the override too.
Verified locally: migration adds both columns without touching existing
rows, and both settings round-trip correctly through the database.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The "Partner" logo row on the homepage was a hard-coded array of ten audio
brand names in Home.jsx, not editable through the dashboard. Adds a
partners table (name, optional logo, sort order), a PartnerController
CRUD under the existing content.manage permission (same one already used
for FAQ-style homepage content), and an admin page modeled on Brands.jsx.
Home.jsx now fetches /partners and shows each entry's logo if set, falling
back to the name as text otherwise.
Schema migration now supports one-time seed data (Schema::SEED_DATA,
applied by SchemaController::runMigration() only at the moment a table is
first created, never again afterwards) so that clicking "Datenbankstruktur
aktualisieren" on an existing site populates the new partners table with
the previous ten names instead of leaving the homepage strip empty.
Verified locally: first migration run creates + seeds the table, a second
run neither re-seeds nor errors.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ImageUploadField now opens a crop overlay (react-easy-crop) before
uploading a newly selected file, and offers a "Zuschneiden" button to
re-crop an already-set image without re-uploading. Cropping happens
entirely client-side via canvas; the resulting blob is sent through the
existing /uploads endpoint unchanged.
Wired a fixed aspect ratio into the fields whose images are displayed at
a fixed ratio elsewhere on the site (gallery project/brand covers and
service images at 4:3, matching their public aspect-[4/3] cards; the
hero image at 16:9). Logo fields (brands, car models, site logo) stay
unset, defaulting to the source image's own aspect ratio so they aren't
forced into an unrelated shape.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
image_path was stored correctly since the brand/model image feature was
added, but VehicleSelect.jsx and BrandPage.jsx rendered cards as plain text
links and never read the column. Falls back to the existing text-only look
when no image is set.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Follow-up to "mach das bitte auch für alle Startseiten-Sektionen" -
the request was for the same drag experience across all six homepage
text sections, but they split into two structurally different groups
and got two different (both live-preview-driven) treatments rather
than forcing one interaction model onto both:
- Hero and the YouTube section have a real background (image, video)
behind the text, structurally identical to the gallery cards - these
get full continuous 2D drag positioning, reusing the same "left/top +
translate(-x%,-y%)" technique. New home_sections.text_align_x/_y
(TINYINT UNSIGNED 0-100, default 50/50 = centered, matching current
behavior) sit alongside the existing text_align column rather than
replacing it, since the other four sections still need it.
- Craft, Advice, Insights, and "More than car-hifi" are normal
paragraph text next to a separate image column, with no background
to drag over - text-align (left/center/right) is the actually correct
tool for how wrapped paragraph lines align, the same way word
processors use alignment buttons rather than a position slider for
body text. These keep the existing text_align enum, but the admin
page (HomeSections.jsx) replaces the old bare <select> with an actual
rendered live preview (title/eyebrow/body snippet in a mock card)
instead of leaving these four with zero visual feedback.
Renamed the shared positioning helper from galleryCardAlign.js /
galleryCardLabelStyle() to dragAnchorPosition.js / dragAnchorStyle()
(now takes a per-caller default so gallery cards keep their bottom-
anchored default while Home.jsx sections default to centered) since
it's no longer gallery-specific - three call sites updated.
Restructured Hero and the YouTube section in Home.jsx so the drag-set
static position doesn't fight with existing animation: Hero already
composes a scroll-linked parallax transform (framer-motion) and an
entrance fade-in on nested motion.div elements, both of which manage
their own `transform` internally - inserting a new plain (non-motion)
div between them for the percentage-based positioning keeps the static
placement and the two animations from touching the same CSS property.
Verified against the local database directly via PHP CLI: hero/youtube
default to 50/50 (centered, no visual change from before), and an
arbitrary pair (25/80) written to hero round-trips correctly through
HomeSectionController::index(), then removed the test row.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extends the just-added horizontal drag to a second axis, per follow-up
request. New app_settings.gallery_card_text_y (TINYINT UNSIGNED 0-100,
default 100 = bottom, matching the original always-bottom position -
no visual change until an admin drags it).
galleryCardLabelStyle() now takes both x and y and combines
`left/top` + a single `transform: translate(-X%, -Y%)` - same
edge-to-edge interpolation trick as the horizontal axis, just on both
axes at once. GalleryOverview.jsx/GalleryBrandPage.jsx drop the
`bottom-0` class entirely now that vertical position is fully
style-driven.
WebsiteSettings.jsx's drag handlers compute both axes from one pointer
position per move (one setForm call, not two) so a diagonal drag reads
as one continuous motion. Added a vertical Oben/Mittig/Unten quick-jump
row alongside the existing horizontal one.
Note left as-is deliberately: the card's dark gradient overlay still
only fades from opaque at the bottom to transparent at the top, so
text dragged toward the top will have less contrast behind it - that's
a real trade-off of allowing free vertical placement, and the live
preview is exactly how an admin would notice and judge it rather than
being blocked from trying.
Verified against the local database directly via PHP CLI: defaults
(0/100) and an arbitrary pair (30/15) both round-trip correctly
through SiteSettingsController::show(), then reset back to defaults.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Follow-up to the previous commit per explicit feedback: three preset
buttons weren't what was asked for - the ask was to grab the label in
the live preview and drag it directly.
Swaps app_settings.gallery_card_text_align (ENUM left/center/right,
one commit old) for gallery_card_text_x (TINYINT UNSIGNED 0-100, same
default position as before at 0). A discrete enum can't represent a
free-dragged position, so this is a real column replacement via
migration_gallery_card_drag.sql (drops the old column outright rather
than keeping both, since the old one is a single commit old and
unlikely to hold any real per-site customization yet).
The label is now positioned with `left: X%; transform: translateX(-X%)`
instead of a text-align class - the standard CSS trick for interpolating
a single percentage continuously between flush-left (X=0) and
flush-right (X=100, shifted back by its own width) with X=50 centering
it, so dragging feels continuous rather than snapping between three
fixed states. hifi-src/src/utils/galleryCardAlign.js now exports a
style-computing function instead of a class lookup table.
WebsiteSettings.jsx's preview label is draggable via Pointer Events
(setPointerCapture on pointerdown, so tracking keeps working even if
the cursor leaves the element mid-drag) with the card's own
getBoundingClientRect() converting cursor position to a 0-100 percent.
Kept small Links/Mittig/Rechts buttons as a secondary quick-jump
alongside the drag, not instead of it.
Verified against the local database directly via PHP CLI: default
comes back as 0, and an arbitrary value (73) written directly to the
column round-trips correctly through SiteSettingsController::show().
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The brand/project name overlaid on gallery cards (GalleryOverview.jsx
and the identical pattern in GalleryBrandPage.jsx) was always left-
aligned with no way to change it - flagged against the brand-overview
page specifically, but the same hard-coded markup exists on the brand
detail page's project cards too, so both get the fix together as one
setting rather than two.
New app_settings.gallery_card_text_align (left/center/right, default
left - no visual change until an admin picks something else), same
site-wide-design-setting pattern as the existing package_card_theme/
package_card_layout. New "Bildergalerie-Kacheln" section in Website
settings renders an actual live preview card - using a real uploaded
gallery image and brand name when one exists, not just a placeholder -
that updates immediately when a button is clicked, rather than a
free-drag positioner: cheaper to build reliably and keeps the label
inside the three positions the design's bottom gradient overlay is
actually built to support.
New shared hifi-src/src/utils/galleryCardAlign.js provides the class
lookup both public pages and the admin preview use - a fixed map
rather than a template-string class name, same reasoning as the
Home.jsx section alignment work: Tailwind's build-time scanner needs
literal class names in the source or it purges them from the
production CSS.
Verified against the local database directly via PHP CLI: the new
column backfilled to 'left' on the existing app_settings row, and
SiteSettingsController::show() returns it correctly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extends the CMS work (Phase 5) to the content the user pointed out was
still missing, using the YouTube section as the concrete example: text,
alignment, and the button link weren't editable anywhere. Rather than
patch that one section, this builds the reusable pattern the user asked
for and applies it to every comparable text block on the homepage:
hero (text only, its two nav buttons stay fixed), the YouTube section,
the craft and consultation blocks, the gallery intro, and the "more
than car-hifi" block.
New home_sections table (bilingual DE/EN, like faqs, since the site has
a language switcher) + HomeSectionController, following the same
DB-row-with-built-in-defaults pattern as legal_pages: a section not yet
customized returns the exact text that used to be hard-coded in the
i18n dictionary, so nothing on a live site goes blank. New "Startseite"
admin page (content.manage, alongside FAQ) with per-section DE/EN tabs,
reusing the Phase 4 RichTextEditor for the body text and a plain
alignment dropdown. Wired into export/import (Settings -> Export &
Import) alongside the other content sections.
Alignment is applied via fixed left/center/right class lookup tables in
Home.jsx rather than a template-string class name, since Tailwind's
build-time scanner needs literal class names present in the source to
avoid purging them from the production CSS.
Known trade-off: two sections (hero, "more than car-hifi") previously
had hand-tuned responsive alignment that differed by breakpoint
(e.g. centered on mobile, left-aligned on desktop for "more"). Making
alignment a single admin-editable value necessarily replaces that with
one fixed choice at every breakpoint - simpler to reason about and
control, at the cost of that responsive nuance.
Verified end-to-end against the local database directly via PHP CLI
(bypassing a local Apache path-routing quirk unrelated to this change):
confirmed defaults come back correctly before any row exists, and that
saving and reading back a row round-trips correctly - then removed the
test row before finishing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Phase 6 of the dashboard roadmap - the largest and riskiest item, since
it overwrites live production code. Pulls the current main branch from
the public Gitea repo over plain HTTPS (archive zip download + REST API
for commit info) and applies it to the live hifi/ tree - no SSH,
git binary, exec(), or shell_exec() anywhere, so it works on plain
shared PHP hosting with no CI/deploy pipeline (exactly the hosting this
site actually runs on, per DEPLOY.md's manual-FTP fallback).
Six independent endpoints (status/check/download/extract/backup/apply)
instead of one big request, mirroring the existing multi-step
SetupController pattern - this app has no job-queue infrastructure, and
a single ~127MB download+extract+backup+copy is the most likely way to
hit an unknown host's max_execution_time or reverse-proxy timeout.
GitUpdateService.php does the actual work; UpdateController.php is a
thin adapter that marks each step in-progress/failed in a new gitignored
update-state.php (same convention as db.php) so a crashed step shows as
failed rather than stuck, and a retry starts clean.
Security-critical bits:
- The backup zip necessarily contains db.php (must be fully restorable),
so it lives under hifi/_update/ behind a "Require all denied" .htaccess
written the instant the directory is created, and hifi/_update/ was
added to .gitignore in this same commit, before any code that could
write into it - both needed since a physically-existing file bypasses
this app's SPA-fallback/API rewrite rules entirely.
- Only hifi/'s own subtree is extracted from the archive (hifi-src/ and
everything else ignored) via a wrapper-folder-prefix detected at
runtime, not hardcoded.
- Copy-then-prune (not copy-only) across the whole hifi/ tree, since
Vite renames JS/CSS chunks on every build and a copy-only updater
would let stale chunks accumulate forever - guarded by a denylist
(db.php, setup.php, ga-service-account.json, update-state.php,
api/uploads/, plus local Claude-tooling dirs) that must never be
touched in either direction.
- index.html is swapped in last via copy+rename (near-atomic), after
the new hashed assets it references are already fully in place.
- Reuses SchemaController's existing migration logic as the last apply
step (extracted into a new runMigration() so it's callable without
Http::send()/exit ending the response early) and app_settings'
existing maintenance-mode column to show visitors a maintenance page
during the brief apply window, restoring whatever maintenance state
existed before the update ran (not just forcing it off).
Gated behind a new, narrower system.update permission (not the broader
settings.manage), with its own settings tab hidden from anyone lacking
it - unlike this app's usual "everyone with settings.manage sees every
tab" pattern, since this one can overwrite the whole site.
Verified in isolation (synthetic zip + fixture directories in a scratch
folder, not the real hifi/ tree): wrapper-folder detection and
selective hifi/-subtree extraction, and copy+prune with denylist
enforcement. Not yet verified: behavior on an actual shared-hosting
target (max_execution_time, ZipArchive availability, outbound HTTPS
egress, disk quota vs disk_free_space()) - per the plan, validate
against the Plesk test server from DEPLOY.md before ever running this
against a real client site. Also enabled the php_zip extension in the
local XAMPP php.ini, since it was disabled and this feature needs it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Phase 4 of the dashboard roadmap. New RichTextEditor component
(Tiptap 3.31.3, pinned past a mergeAttributes XSS advisory affecting
2.x/older 3.x - GHSA-cp6q-959q-f8rh) replaces the plain textareas for
the customer/owner mail bodies in EmailSettings.jsx: bold, italic,
underline, lists, links, and a font-family dropdown. Font choices are
classic system fonts rather than self-hosted webfonts - most email
clients don't load custom @font-face at all, so system fonts are the
only choice that reliably renders as chosen once delivered.
Existing plain-text templates (including the built-in defaults) are
converted to HTML once on load so line breaks survive the switch.
Security fix that had to go with this: Mailer::render() does a raw
strtr() with no escaping, which was fine while bodies were plain text,
but ContactController now sends these as HTML mail - a customer's
public contact-form message could otherwise inject markup into the
HTML notification mail. New Mailer::renderHtml() escapes each
substituted value before it goes into the (admin-authored, otherwise
unchanged) HTML template; ContactController sets isHTML(true) and an
AltBody plain-text fallback for both the owner notification and
customer confirmation.
Known trade-off: Tiptap adds ~400KB (gzipped ~130KB) to the shared
admin+public JS bundle, since the app has no route-based code-splitting
anywhere yet - flagged for a possible follow-up, not fixed here since
it'd mean restructuring the whole admin bundle, not just this feature.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Phase 3 of the dashboard roadmap. Adds brands.image_path and
car_models.image_path, following the exact same pattern as the
existing gallery cover-image columns: Schema.php (create + additive
migration), the export/import wiring (TABLE_COLUMNS + IMAGE_COLUMNS,
so the files survive an export/import round-trip), orphaned-file
cleanup via the Phase 1 Uploads helper (including brand deletes, which
cascade-delete their models), and an ImageUploadField in both admin
pages with a thumbnail column in the tables.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Phase 2 of the dashboard roadmap. app_settings (phone, maintenance
texts, package-card theme, mail templates, etc.) and permission_groups
now round-trip through export/import like every other section - this
was the main gap making a hoster migration more manual than it needed
to be. Admin accounts stay opt-in behind an explicit checkbox (default
off) since they carry password hashes and 2FA secrets; real credentials
(SMTP password, Google Places API key) and the Google Reviews cache are
deliberately still excluded and must be re-entered per environment.
Also fixed exportData() to actually select only the allow-listed
columns per table instead of `SELECT *`, matching what the surrounding
comment already claimed - needed so app_settings' secret columns can't
leak into an export file just because a new column gets added later.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Phase 1 of the dashboard roadmap. ImageUploadField now has a clear
button, and every controller with an image/cover_image column deletes
the old file from hifi/api/uploads/ when it's replaced or the owning
record is deleted (including cascade cleanup for gallery brand/project
deletes) - previously no controller ever unlinked a physical file.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Whoever has the lowest admin_users.id is treated as the root account:
its Super-Admin status can no longer be revoked and the account itself
can't be deleted, regardless of how many other Super-Admins exist. UI
disables the checkbox/delete button for that user with an explanation.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds admin_users.last_active_at, touched on login and throttled to
once per minute via AuthMiddleware::requireAdmin, and shows it in the
Benutzer admin page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bisher lief der Hinweis nur einmal, nachdem die Kartenreihe sichtbar wurde -
Kundenwunsch war eine regelmaessige Wiederholung, solange man noch auf der
ersten Kachel steht. Neues Setting package_wheel_hint_interval (Sekunden,
Default 8, 2-120 geklammert) steuert den Abstand ueber Admin -> Einstellungen
-> Kachel-Layout.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Kachel-Mindesthoehe war fix auf 640px, dadurch ragten Pakete auf dem Handy
weit ueber den Bildschirm hinaus (Kundenfeedback). Jetzt 420px auf Mobile,
640px ab Desktop-Breite.
Der Mausrad-Hinweis lief bisher sofort beim Laden ab, oft bevor die
Kartenreihe ueberhaupt sichtbar gescrollt war - deshalb kam er beim Kunden
nicht an. Spielt jetzt erst ab, sobald die Reihe tatsaechlich im Blickfeld ist.
Leistungen-Karten ohne eigenen CTA (alles ausser Car-Hifi) hatten gar keinen
Link. Fallen jetzt auf das Kontaktformular zurueck statt ins Leere zu laufen.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A single long Google review made every card in the row stretch to match
it (default flex align-items: stretch), leaving short reviews with a
huge empty gap before the name - reported with a real screenshot where
one card towered over its neighbors.
The review paragraph is now capped at line-clamp-6, so no single card's
natural height is unbounded anymore - stretch still aligns the row, but
to a reasonable, consistent height instead of an outlier's full text.
Full text stays in the DOM (still copyable/accessible), just visually
truncated with a native ellipsis.
Added a bit more visual polish while in there: a subtle decorative quote
mark per card, a hover shadow lift, and an avatar next to each name -
the reviewer's real Google profile photo when available, otherwise a
colored initial-letter circle (Home.jsx now passes profile_photo_url
through, previously fetched but unused).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The homepage's "reviews" section was never real - a fixed array of 10
hand-written quotes in the translation files plus a manually-typed
"5,0 von 181 Kunden bewertet" string, none of it sourced from Google.
Wires it to the real thing via the Places API (New), cached in the
database and refreshed on a schedule rather than fetched live per
visitor - the public /google-reviews endpoint only ever reads the last
successfully cached result, so page traffic never touches Google's API
or its quota. Mirrors the existing audio4cars price-refresh cron exactly
(same bootstrap-config-fetch-store shape): refresh_google_reviews.php
reads the Place ID + API key from app_settings, calls
GooglePlacesReviewsFetcher, and replaces the google_reviews table
wholesale on success; refresh_google_reviews.bat is the Task Scheduler
entrypoint. A failed refresh leaves the previous good data in place and
only records the error message, so a bad night never blanks the section.
Admin config lives in a new "Google-Rezensionen" block on the Website
settings page (Place ID + API key, matching the existing GA
service-account field's "leave blank to keep" behavior for the key) plus
a "Jetzt aktualisieren" button to test immediately rather than wait for
the nightly job - both hit the same GoogleReviewsController the cron
script's service class does.
Home.jsx now fetches /google-reviews and swaps in the live rating and
quotes only once at least one fetched review has actual text (Google
sometimes returns star-only reviews with no comment, which StarRating's
quote cards can't render) - until then, or if nothing is configured yet,
it falls back to exactly the previous hardcoded testimonials, so the
section never looks broken mid-rollout. TestimonialSlider/StarRating now
take a per-review rating instead of always drawing 5 stars.
Verified end-to-end except the live Google call itself, which needs a
real API key: schema migration, settings save/load (including the
key's "blank = unchanged" behavior), the CLI script's two failure paths
(unconfigured, and a real Google 400 for an invalid key - confirming the
Places API (New) request shape is correct), and the full display path by
seeding fake "successful" rows directly - homepage correctly switched to
the live rating/quotes and back to the fallback after clearing them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Import always replaced everything - brands, packages, services, FAQs,
gallery - in one irreversible sweep, even if you only wanted to bring in
one part (e.g. restoring just the gallery from an old backup while
leaving today's live catalog alone).
Backend: importData() now accepts a "sections" field (JSON array of
catalog/services/faqs/gallery) and only DELETE+INSERTs the tables that
belong to selected sections; anything not selected is left completely
untouched. Tables stay grouped the way their foreign keys require
(brands -> car_models -> packages -> package_products/upgrades as one
unit, gallery_brands -> gallery_projects -> gallery_photos as another) -
importing "packages" without its models would either orphan rows or
silently rewrite unrelated ones, so the groups aren't splittable further.
Restored images are filtered to just the ones referenced by the tables
actually being imported, so deselecting the gallery means its images
aren't written to /uploads either. No sections field (older callers)
still imports everything, matching prior behavior.
Frontend: picking a file parses it client-side (file.text() + JSON.parse)
to show each section with live counts pulled straight from the file
("4 Marken, 15 Modelle, 17 Pakete"), all checked by default. The
confirmation checkbox's warning text names only what's actually
selected. If parsing fails client-side the picker just doesn't render -
the import still goes through server-side with the (safe) default of
importing everything.
Verified end-to-end against a real ~54MB export: importing only "faqs"
reverted a changed FAQ while a newly added test brand survived
untouched; importing only "catalog" right after removed that test brand
while the FAQ stayed as already restored - confirming sections are
fully independent both ways.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The existing peek animation (row nudges right and back on first load)
only demonstrated that the row moves, not how to move it - ambiguous
now that mouse-drag is gone. On non-touch devices it's paired with a
small pill ("Mit dem Mausrad blättern" / "Scroll to browse", mouse icon
flanked by chevrons) that fades in around the peek and out ~1.2s later,
floating centered over the row at a z-index above even the frontmost
coverflow card. Touch devices keep just the peek, since swiping is
already self-explanatory there. Plays once per page load, gated behind
the same reduced-motion check as the peek itself.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Client feedback: a light/small scroll snapped back to the current card
instead of advancing - native scroll-snap always settles on whichever
card is nearest, and a light nudge rarely crosses the halfway point.
Each wheel burst now tracks its starting card index and net deltaY.
On settle, if the nearest card by position is still the start card but
there was clear directional movement (>4px net), the row advances one
card in that direction instead of springing back - so even a light
wheel tick pages forward. Larger scrolls are unaffected: if the actual
scroll position already lands closer to a farther card, it jumps
straight there (no artificial one-card-per-burst cap), and a burst that
nets out near zero (e.g. wiggling back and forth) correctly stays put.
The settle target is computed the same way the old drag-to-scroll
feature centered cards, and re-enables scroll-snap only after the
settling scrollTo animation would have finished, so it doesn't fight
the smooth scroll.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Client feedback: after removing mouse-drag on the coverflow (it fought
the 3D transform), the thin scrollbar underneath was the only desktop
way to browse tiles - too fiddly.
Hovering the tile row and scrolling the wheel now moves the row
horizontally, fluid/1:1 with the wheel delta rather than snapping one
card per tick, with scroll-snap briefly suspended during the burst and
re-enabled ~150ms after the last tick so cards settle into place
afterward - the same pattern already used for the old drag interaction.
At the first card, scrolling further "up" is left alone (no
preventDefault): the event falls through to native behavior, which is
already exactly how the page scrolls today when hovering the row, so
the page scrolls up instead. Same at the last card scrolling "down" -
the page takes over. Horizontal wheel/trackpad sideswipe (deltaX) is
untouched, since the container already handles that natively. Applies
uniformly to both strip and coverflow (same scrollerRef container); the
scrollbar stays as-is.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Side-by-side with the prototype revealed the section never set its font
family - everything except the Michroma headings fell back to the system
font, which was the biggest visual mismatch (labels, subtitle, feature
bar). The section root now sets Barlow like the handoff specifies; the
subtitle even wraps identically to the prototype again.
The maps iframe crop is rebalanced (290px shifted -60px inside the 210px
window) so the map runs flush to the "Route planen" bar with Google's
bottom attribution cut at the card edge like the prototype, instead of
showing the full attribution line with a gap. The contact card is titled
"HiFi Planet Amorbach" per the design (was "HifiPlanet Amorbach").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Third iteration on this backdrop: composing the layers natively (photo,
scrim, masks, streak stack, topo lines, grunge/splatter/arc) kept
drifting from the intended look, so the handoff now ships each theme's
background as a single pre-composed 2560x1440 image. All hand-built
layers are deleted; the section carries exactly one background-image
via .kontakt-sektion (cover/center), swapped for dark mode through the
existing .dark class. Obsolete layer assets are removed, the unused
imports with them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 310x512 car-light.png was scaled to the full section height via
background-size: cover, which blew it up far past its natural
resolution. It is now a plain <img> (.kontakt-bg-foto in index.css):
natural aspect ratio, width capped at clamp(280px, 24vw, 460px),
anchored bottom-left, opacity .9, and a dual mask (fade right + fade
top, mask-composite: intersect) so it dissolves into the page gradient
with no hard edges. The old scrim overlay is gone - the masks do that
job now.
The green light-streak group on the right is widened to the README's
42% at full section height (was 26%), line opacity .85 and radial glow
blur 20px per spec. Topo lines were already in place.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The redesign itself shipped earlier (78d3d4a, 3079bd2); comparing the
implementation against the README again surfaced two missing details:
- The light-mode backdrop's subtle topo wave lines (five 1px curved
paths in --kf-topo, top-left, ~360x280) were never implemented.
- The Google Maps embed showed Google's own info overlay in the top-left
corner behind our "In Maps öffnen" chip. The iframe is now rendered
taller inside a clipped 210px container with a negative top margin,
cropping that overlay away while keeping the marker and the required
bottom attribution visible.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Client wants the tier called just "Elite". Only the admin checkbox list
(PACKAGE_TIERS) carries tier names; public card theming is price-rank
based, so nothing else changes. An already-created "Elite R" package
would show up under "Weitere Pakete (alte Namen)" in the editor and can
be deleted and recreated as Elite there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The public package tiles stopped showing per-package icons and taglines,
so their admin inputs were dead weight - the IconPicker alone dominated
the form. Both fields are gone from the batch editor and the overview
table; stored values stay untouched because the fields remain in the
save payload, they just can't be edited anymore.
The "Empfohlen" badge sat at -top-3, half outside a card that clips via
overflow-hidden (rounded corners + road artwork), cutting the badge in
half. It now sits at top-2 fully inside the tile, above the name.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Client feedback: creating ~30 models x 8 packages through the old
one-at-a-time form (free-text name, rows={3} description box) was
unworkable. Package names are always the same eight tiers, so the form
asked for information that was never variable.
The page is now a batch editor: pick brand + model, get the eight
standard tiers (Base, Clear, Drive, Prime, Elite R, Apex, The Statement,
Limitless - new shared constant in constants/packageTiers.js) as
checkbox rows. Checking a row opens a large auto-growing description
textarea and the markup fields; icon/tagline/price-text/featured/sort
live in a collapsed details block. One "Alle speichern" button creates
and updates everything in one pass, with per-row error reporting and
failed rows keeping their input. Existing packages load pre-filled;
packages with non-standard names appear in a read-only-named legacy
section, still editable and deletable. Deleting stays behind an explicit
button - unchecking never deletes. The old all-packages table remains
below as a collapsible overview, and its Bearbeiten action now jumps
into the batch editor.
New endpoint POST /models/{id}/copy-packages copies every package of a
source model - including linked package_products rows with their cached
scrape data, so no re-scraping - onto the target, skipping tiers whose
slug already exists there (backed by uniq_model_slug), all in one
transaction. The editor exposes it as "Pakete von anderem Modell
kopieren" with a copied/skipped result line: set up one model, replicate
to the other 29, adjust.
The public tier theming is intentionally untouched: ModelPage keeps
assigning card themes by price rank, so legacy package names continue to
render correctly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swaps the placeholder site photo (hero-trunk) for the actual asset from
the design handoff - a grayscale interior/speaker shot. Anchored bottom-
left at ~34% width with the README's scrim gradient over it, plus a
vertical mask fading the top edge to transparent so it blends into the
hero without a hard boundary. Hidden ≤980px and in dark mode, unchanged
otherwise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rebuilds /kontakt from the design handoff (src/referenz/Kontaktformular
Redesign/) using the site's own stack instead of copying the prototype's
inline-styled HTML: React + Tailwind arbitrary values bound to a small set
of CSS custom properties (.kf-page, index.css) that swap automatically
with the site's existing dark-mode class toggle - no separate theme
control was added, per the brief.
The "Deine Anfrage bezieht sich auf" package box wires into the existing
query-param handoff from the package picker (ModelPage's contactUrl:
brand/model/package/packageId/total) and only renders when all three are
present; the optional-upgrades picker that already existed on this page
is preserved and restyled to match. Submission still posts to the real
/api/contact endpoint (same payload shape as before), so requests keep
landing in the admin inbox.
Adds Michroma (heading/price font) alongside the already-loaded Barlow.
Michroma has no Euro-sign glyph (renders as tofu), so price displays
split the € into a plain-font span rather than showing a broken glyph.
Dark-mode background assets (grunge/splatter) come from the handoff;
the light-mode car photo reuses an existing site asset (hero-trunk) since
none was supplied, masked per the handoff's recipe.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The mouse drag-to-scroll on the card row felt off in combination with the
coverflow's 3D transform (client feedback), so it's removed - desktop users
now navigate via the custom scrollbar underneath, which was already there.
Touch devices keep native scroll-snap swiping, but on first load it wasn't
obvious the row was swipeable. Adds a one-time hint: the row glides right by
~40% of a card width and back, 500ms after mount. Touch-only (pointer:
coarse), skipped under prefers-reduced-motion, plays once per page load.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Logo: adds a dedicated dark-mode variant (grey wordmark lightened to
near-white, green orbit untouched) and drops the white background chip
that was previously painted behind the logo in dark mode across Navbar,
AdminLayout and the admin Login page.
Cursor: the hover core goes back to brand green (with a white rim/glow
for contrast on green buttons) instead of white, per clarified feedback.
Homepage: new hero slogan "Home of pure Sound" (replacing "Audiophil aus
Prinzip" / "Audiophile by principle" in both languages), the "So
funktioniert's" / "How it works" three-step section is removed, and the
brand marquee is replaced with the client's actual supplier list (Ground
Zero Audio, Audison, Hertz, Helix, Brax, Gladen, Alpine, Pioneer,
Kenwood, JVC).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Coverflow cards can now be grabbed and dragged with the mouse; touch
keeps native momentum scrolling. Pointer capture only engages after real
movement so ordinary clicks on card buttons still land, a capture-phase
click handler swallows exactly the one click that ends a drag, and on
release the row glides to the nearest card before snap re-engages.
The native horizontal scrollbar under strip and coverflow is replaced by
a slim centered track with a glowing brand-green thumb - draggable,
click-to-jump, and hidden automatically when everything fits.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cursor: the default state is now just the green dot - the orbital ring and
satellite only appear over interactive elements, where the core switches
to white with a dark rim so it contrasts with the brand-green buttons
instead of vanishing green-on-green. The click pulse is white for the
same reason.
Packages: new optional price_text field (schema column, migration,
controllers, export/import columns, admin form). While set, it replaces
the "ab ca." label and computed price on the tile - e.g. "Coming soon".
Layouts: third package_card_layout option "coverflow" - a scroll-snap row
with CSS 3D perspective where the centered card faces front and its
neighbors rotate away, transforms driven per scroll frame (rAF-throttled,
ResizeObserver covers card expansion). Selectable in the admin website
settings next to grid and strip.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A filled brand-green core with a glowing satellite circling it on a
tilted elliptical path, echoing the orbit swoosh in the HifiPlanet logo.
Over interactive elements the core grows, the orbit widens and brightens,
and the satellite speeds up; clicking fires a subwoofer-style thump plus
an outward pulse ring. Core and orbit track the mouse in perfect sync -
only orbit speed and radius ease between states.
Enabled only on fine-pointer devices and disabled entirely under
prefers-reduced-motion (native cursor untouched in both cases). Over
text fields the orbit hides and the native I-beam takes over.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-encoded from the new 1440p source to the established delivery format:
1080p H.264, audio track stripped (it plays muted behind the dark
overlay), faststart for web streaming. 32.8 MB despite the longer runtime,
down from the previous 42.9 MB.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cards show the first 5 bullet points; anything beyond that sits behind an
accent-colored toggle whose count itself signals package depth (pricier
packages carry longer lists). Expanding affects only the clicked card -
the row aligns items-start instead of stretching every neighbor to the
tallest card. The darkening gradient behind the list holds its opacity
almost to the bottom edge so the toggle and deep list entries stay
readable over the bright road glow, and the expanded state uses a denser
scrim for the same reason.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extracts the 8 embedded road-glow images from the reference file into
assets/roads/ (PNG -> WebP, 5 MB -> 112 KB) and uses them as per-tier
card backgrounds, matched to each package's price rank. Card markup now
mirrors the reference exactly: Barlow Condensed header with gradient
divider, full-bleed road image, "ab ca." price section over the dark
scrim. Package bullet points sit at the top under the name, and the
contact button returns below the price. The two non-reference themes
keep the recolorable neutral glow.
The section background now follows the site's light/dark theme instead
of a fixed dark stage, with theme-aware scrollbar styling and a soft
card shadow so the dark tiles read as cards on the light surface. The
"X Stufen" heading above the tiles is removed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ports the exact 8-tier color progression, Barlow/Barlow Condensed typography,
centered gradient underline, and bottom price scrim from the client-provided
Kacheln.html mockup onto the existing dynamic package system. The material
color engine now stores exact RGB stops (including a dedicated border color)
instead of an HSL round-trip, since the reference colors were already exact
hex values. Price/label color is now fixed off-white per the design instead
of tracking the tier accent.
Drops the tagline and product bullet list to match the mockup's minimal
name+image+price layout - real packages still show these fields elsewhere,
but this tile design has no room for them. Keeps the existing dynamic
neutral-texture road glow (recolored per computed tier) instead of the
mockup's 8 bespoke per-tier photos, since real package counts aren't fixed
at 8. Adds a contact CTA button, which the static mockup doesn't need but
the live page does.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>