diff --git a/apps/business/src/components/Sidebar.module.css b/apps/business/src/components/Sidebar.module.css
index 9ded9b7..5c37f94 100644
--- a/apps/business/src/components/Sidebar.module.css
+++ b/apps/business/src/components/Sidebar.module.css
@@ -104,6 +104,7 @@
gap: 12px;
padding: 10px 14px;
border-radius: var(--radius-sm);
+ border: 1px solid transparent;
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
@@ -118,17 +119,18 @@
}
.navItem.active {
- background: var(--primary);
- color: #fff;
+ background: rgba(var(--primary-rgb) / 0.1);
+ color: var(--primary);
+ border-color: var(--primary);
}
.navItem.active:hover {
- background: var(--primary-dark);
- color: #fff;
+ background: rgba(var(--primary-rgb) / 0.16);
+ color: var(--primary);
}
.navItem.active .chevron {
- color: #fff;
+ color: var(--primary);
}
.navGroupBtn {
@@ -163,6 +165,7 @@
display: block;
padding: 8px 12px;
border-radius: 8px;
+ border: 1px solid transparent;
font-size: 13px;
font-weight: 500;
color: var(--text-secondary);
@@ -175,13 +178,14 @@
}
.subNavActive {
- background: var(--primary);
- color: #fff;
+ background: rgba(var(--primary-rgb) / 0.1);
+ color: var(--primary);
+ border-color: var(--primary);
}
.subNavActive:hover {
- background: var(--primary-dark);
- color: #fff;
+ background: rgba(var(--primary-rgb) / 0.16);
+ color: var(--primary);
}
.footer {
diff --git a/apps/business/src/i18n/messages.ts b/apps/business/src/i18n/messages.ts
index 6f525d2..7950c1c 100644
--- a/apps/business/src/i18n/messages.ts
+++ b/apps/business/src/i18n/messages.ts
@@ -1351,7 +1351,7 @@ const en = {
'website.staticImages.subtitle':
'Websites load these by key from GET /tenants/{domain}/website/static-images',
'website.staticImages.loading': 'Loading static images...',
- 'website.staticImages.empty': 'No image slots yet for this website.',
+ 'website.staticImages.empty': 'No image slots yet. Refresh to read them from the website.',
'website.staticImages.emptyPage': 'No static images on this page yet.',
'website.staticImages.errorLoad': 'Unable to load static images.',
'website.staticImages.errorCreate': 'Unable to create image slot.',
@@ -1360,11 +1360,16 @@ const en = {
'website.staticImages.errorUpload': 'Unable to upload image.',
'website.staticImages.errorAddImage': 'Unable to save image.',
'website.staticImages.errorRemoveImage': 'Unable to remove image.',
+ 'website.staticImages.errorRefresh': 'Unable to read image slots from the website.',
'website.staticImages.toastCreated': 'Image slot created.',
'website.staticImages.toastUpdated': 'Image slot updated.',
'website.staticImages.toastDeleted': 'Image slot deleted.',
'website.staticImages.toastImageSaved': 'Image saved.',
'website.staticImages.toastImageRemoved': 'Image removed.',
+ 'website.staticImages.toastRefreshed':
+ '{created} slots added, {deleted} removed.',
+ 'website.staticImages.toastRefreshedNone': 'No new slots. The list is up to date.',
+ 'website.staticImages.refresh': 'Refresh slots from website',
'website.staticImages.addSlot': 'Add image slot',
'website.staticImages.createTitle': 'Add image slot',
'website.staticImages.editTitle': 'Edit image slot',
@@ -3286,7 +3291,7 @@ const fa: Record
{error}
} diff --git a/apps/business/src/services/websiteStaticImageService.ts b/apps/business/src/services/websiteStaticImageService.ts index 30d10cc..702e51f 100644 --- a/apps/business/src/services/websiteStaticImageService.ts +++ b/apps/business/src/services/websiteStaticImageService.ts @@ -37,6 +37,19 @@ export async function createWebsiteStaticImageSlot( }) } +export async function syncWebsiteStaticImageSlots() { + return apiRequest<{ + message: string + created: number + updated: number + deleted: number + items: WebsiteStaticImageSlot[] + }>(businessPath('/sync'), { + method: 'POST', + auth: true, + }) +} + export async function updateWebsiteStaticImageSlot( slotId: string, payload: UpdateWebsiteStaticImageSlotPayload, diff --git a/apps/customer/src/components/Sidebar.module.css b/apps/customer/src/components/Sidebar.module.css index 14d3195..e4dd746 100644 --- a/apps/customer/src/components/Sidebar.module.css +++ b/apps/customer/src/components/Sidebar.module.css @@ -101,6 +101,7 @@ gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); + border: 1px solid transparent; font-size: 14px; font-weight: 500; color: var(--text-secondary); @@ -115,17 +116,18 @@ } .navItem.active { - background: var(--primary); - color: #fff; + background: rgba(var(--primary-rgb) / 0.1); + color: var(--primary); + border-color: var(--primary); } .navItem.active:hover { - background: var(--primary-dark); - color: #fff; + background: rgba(var(--primary-rgb) / 0.16); + color: var(--primary); } .navItem.active .chevron { - color: #fff; + color: var(--primary); } .navGroupBtn { @@ -160,6 +162,7 @@ display: block; padding: 8px 12px; border-radius: 8px; + border: 1px solid transparent; font-size: 13px; font-weight: 500; color: var(--text-secondary); @@ -172,13 +175,14 @@ } .subNavActive { - background: var(--primary); - color: #fff; + background: rgba(var(--primary-rgb) / 0.1); + color: var(--primary); + border-color: var(--primary); } .subNavActive:hover { - background: var(--primary-dark); - color: #fff; + background: rgba(var(--primary-rgb) / 0.16); + color: var(--primary); } .footer { diff --git a/docs/PROJECT_CONTEXT.md b/docs/PROJECT_CONTEXT.md index 14d3910..edfbb9f 100644 --- a/docs/PROJECT_CONTEXT.md +++ b/docs/PROJECT_CONTEXT.md @@ -298,6 +298,7 @@ Products accept optional `brandId` on create/update. - `GET/POST/PATCH/DELETE /businesses/:businessId/website/brand-groups` — groups with `brandIds[]` - `GET /tenants/:host/website/category-groups` — public category groups - `GET/POST/PATCH/DELETE /businesses/:businessId/website/static-images` — named image slots (`single` or `list`) with `pageKey` + per-image `titleFa` / `titleEn` / `subtext` / `linkUrl` +- `POST /businesses/:businessId/website/static-images/sync` — read slot keys from the live website (`GET https://{domain}/meshkee/static-image-slots`) and upsert them - `GET /tenants/:host/website/static-images` — public slots (`?pageKey=home` to filter by page) - `GET /tenants/:host/website/static-images/:key` — one public slot - `GET/POST/PATCH/DELETE /businesses/:businessId/website/sliders` — sliders with `slides[]` (imageMediaId, title, linkUrl)