From cff34ac8aaac1a22f1b214b46a2e9b2983306c53 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 20 Jun 2026 21:25:31 -0400 Subject: [PATCH] add logo --- apps/admin/src/pages/SystemSettingsPage.tsx | 20 +++++++++++++++++++ .../20260621012355_add_logo_url/migration.sql | 2 ++ apps/backend/prisma/schema.prisma | 1 + apps/backend/src/routes/settings.ts | 1 + apps/spa/src/components/Footer.tsx | 2 +- apps/spa/src/components/Navbar.tsx | 4 +++- 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 apps/backend/prisma/migrations/20260621012355_add_logo_url/migration.sql diff --git a/apps/admin/src/pages/SystemSettingsPage.tsx b/apps/admin/src/pages/SystemSettingsPage.tsx index eee5360..0ab3bb1 100644 --- a/apps/admin/src/pages/SystemSettingsPage.tsx +++ b/apps/admin/src/pages/SystemSettingsPage.tsx @@ -8,6 +8,7 @@ export default function SystemSettingsPage() { // Form State const [brandName, setBrandName] = useState('') + const [logoUrl, setLogoUrl] = useState('') const [shippingFee, setShippingFee] = useState('') const [bankName, setBankName] = useState('') const [bankAccountName, setBankAccountName] = useState('') @@ -31,6 +32,7 @@ export default function SystemSettingsPage() { .then(r => r.json()) .then((data: StoreSettings) => { setBrandName(data.brandName || 'HomAroma') + setLogoUrl(data.logoUrl || '') setShippingFee(data.shippingFee.toString()) setBankName(data.bankName || '') setBankAccountName(data.bankAccountName || '') @@ -61,6 +63,7 @@ export default function SystemSettingsPage() { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ brandName, + logoUrl, shippingFee: parseFloat(shippingFee) || 0, bankName, bankAccountName, @@ -224,6 +227,23 @@ export default function SystemSettingsPage() {

This name is used by the website and spa header/footer as the brand display name.

+
+ + setLogoUrl(e.target.value)} + className="admin-input w-full max-w-sm" + placeholder="https://example.com/logo.png" + /> +

If provided, this image will be displayed instead of the text brand name in headers.

+ {logoUrl && ( +
+ Logo Preview +
+ )} +
+