PWA Settings

Fixed webmanifest generation and pwa icon.

Made nav bar text optional.
This commit is contained in:
Stefan Lazic committed 2026-08-07 13:38:11 +01:00
1 parent a702320d4e
commit 769d3f9ebc
23 files changed
+1065 -91

No files matched your search

@@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE `Business` ADD COLUMN `icon192Url` VARCHAR(191) NULL,
ADD COLUMN `icon512Url` VARCHAR(191) NULL,
ADD COLUMN `maskableIcon192Url` VARCHAR(191) NULL,
ADD COLUMN `maskableIcon512Url` VARCHAR(191) NULL,
ADD COLUMN `splashScreenLandscapeUrl` VARCHAR(191) NULL,
ADD COLUMN `splashScreenPortraitUrl` VARCHAR(191) NULL;
@@ -0,0 +1,11 @@
/*
Warnings:
- You are about to drop the column `splashScreenLandscapeUrl` on the `Business` table. All the data in the column will be lost.
- You are about to drop the column `splashScreenPortraitUrl` on the `Business` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE `Business` DROP COLUMN `splashScreenLandscapeUrl`,
DROP COLUMN `splashScreenPortraitUrl`,
ADD COLUMN `splashScreens` JSON NULL;
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `Business` ADD COLUMN `bottomNavShowLabels` BOOLEAN NOT NULL DEFAULT true;
+38 -8
View File
@@ -257,13 +257,43 @@ model Business {
/// src/app/icon.png and the branding fallback rules in
/// src/lib/business/branding.ts.
faviconUrl String?
/// Used for the PWA manifest icon set — falls back to the same neutral
/// app icon as the favicon when unset.
/// Apple touch icon — iOS Safari's "Add to Home Screen" icon. Falls back
/// to the same neutral app icon as the favicon when unset. Distinct from
/// the four PWA manifest icon fields below (Android/Chrome installs read
/// the manifest's `icons` array, not this field).
appIconUrl String?
/// Hex color, e.g. "#111b15" — PWA `theme_color` / manifest and
/// browser chrome. Falls back to the app's own theme color when unset.
themeColor String?
backgroundColor String?
/// PWA manifest `icons` array (Android/Chrome home-screen install) — one
/// upload per required size/purpose rather than generating them from a
/// single source image, since there's no image-processing pipeline in
/// this app. Each falls back independently to the app's own generated
/// icon when unset — see src/app/manifest.ts.
icon192Url String?
icon512Url String?
/// "Maskable" purpose — Android adaptive-icon safe zone, must have the
/// subject inset within the center ~80% since the OS may crop to a
/// circle/squircle/rounded-square.
maskableIcon192Url String?
maskableIcon512Url String?
/// iOS `apple-touch-startup-image` splash screens shown while the app
/// launches from the home screen — Safari has no manifest-driven splash
/// generation (unlike Chrome, which derives one from the manifest's
/// icon/name/background_color automatically), so this needs explicit
/// per-device images. An array of `{ media, url }` pairs — one exact
/// `(device-width/height/pixel-ratio/orientation)` media query per
/// device, matching the bundle a generator like progressier.com
/// produces — rather than the 2 generic portrait/landscape images this
/// field held before, since a real per-device bundle is now imported
/// wholesale (see importAppIconZipAction) instead of hand-picked.
splashScreens Json?
/// Icon-only vs icon+label bottom navigation (customer and staff/owner
/// alike — see components/navigation/bottom-nav.tsx). Super
/// Administrator only, same as the rest of this display-config block —
/// see updateNavigationSettingsAction.
bottomNavShowLabels Boolean @default(true)
/// Phase 9 — Welcome page background, desktop breakpoint. Falls back to
/// the existing plain background when unset. See src/app/page.tsx.
welcomeBackgroundDesktopUrl String?
@@ -1217,15 +1247,15 @@ model LoyaltyProgramme {
/// Phase 11 — replaces the hardcoded "Loyalty Card" title shown top-left
/// on the card. Null/empty falls back to "Loyalty Card", same as before
/// this was configurable.
cardTitleText String?
cardTitleText String?
/// Card-wide — applies to all card text, not just the title. See
/// LoyaltyCardFont's doc comment for why this is card-wide rather than a
/// control per element.
cardFont LoyaltyCardFont @default(SANS)
cardTitleTextSize LoyaltyCardTextSize @default(MD)
cardTitleTextColor String?
cardBorderColor String?
cardMemberNumberColor String?
cardFont LoyaltyCardFont @default(SANS)
cardTitleTextSize LoyaltyCardTextSize @default(MD)
cardTitleTextColor String?
cardBorderColor String?
cardMemberNumberColor String?
updatedAt DateTime @updatedAt