diff --git a/public/brand/welcome-dark.png b/public/brand/welcome-dark.png new file mode 100644 index 0000000..8ff9129 Binary files /dev/null and b/public/brand/welcome-dark.png differ diff --git a/public/brand/welcome-lite.png b/public/brand/welcome-lite.png new file mode 100644 index 0000000..6ae93c9 Binary files /dev/null and b/public/brand/welcome-lite.png differ diff --git a/public/welcome dark.png b/public/welcome dark.png new file mode 100644 index 0000000..8ff9129 Binary files /dev/null and b/public/welcome dark.png differ diff --git a/public/welcome lite.png b/public/welcome lite.png new file mode 100644 index 0000000..6ae93c9 Binary files /dev/null and b/public/welcome lite.png differ diff --git a/src/api/auth.ts b/src/api/auth.ts index 7c091d3..082ba31 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -51,7 +51,6 @@ export function loginWithPassword(mobile: string, password: string) { export function setPassword(payload: { password: string; confirmPassword: string; - currentPassword?: string; }) { return api('/auth/set-password', { method: 'POST', diff --git a/src/components/brand/AppWelcomeMessage.vue b/src/components/brand/AppWelcomeMessage.vue new file mode 100644 index 0000000..ad4cc3e --- /dev/null +++ b/src/components/brand/AppWelcomeMessage.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/components/business/BusinessImageGallery.vue b/src/components/business/BusinessImageGallery.vue new file mode 100644 index 0000000..7461afe --- /dev/null +++ b/src/components/business/BusinessImageGallery.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/layouts/WebAppLayout.vue b/src/layouts/WebAppLayout.vue index ae02fc4..e37e4dc 100644 --- a/src/layouts/WebAppLayout.vue +++ b/src/layouts/WebAppLayout.vue @@ -76,13 +76,6 @@ const navItems = computed((): NavItem[] => { label: 'کسب‌وکار', icon: 'store', }); - } else if (auth.isCustomer) { - items.splice(2, 0, { - to: '/app/register-business', - name: 'app-register-business', - label: 'ثبت کسب‌وکار', - icon: 'plus', - }); } return items; }); diff --git a/src/utils/media.ts b/src/utils/media.ts index 5f2a7e2..c96af59 100644 --- a/src/utils/media.ts +++ b/src/utils/media.ts @@ -19,3 +19,18 @@ export function businessCoverUrl( const cover = images.find((i) => i.isCover) ?? images[0]; return uploadUrl(cover?.url) || null; } + +export function businessGalleryUrls( + images?: { url: string; isCover?: boolean; sortOrder?: number }[] | null, +): string[] { + if (!images?.length) return []; + return [...images] + .sort((a, b) => { + if (a.isCover !== b.isCover) { + return a.isCover ? -1 : 1; + } + return (a.sortOrder ?? 0) - (b.sortOrder ?? 0); + }) + .map((image) => uploadUrl(image.url)) + .filter(Boolean); +} diff --git a/src/views/app/AppBusinessDetailView.vue b/src/views/app/AppBusinessDetailView.vue index c12f327..dfb12df 100644 --- a/src/views/app/AppBusinessDetailView.vue +++ b/src/views/app/AppBusinessDetailView.vue @@ -18,6 +18,8 @@ بازگشت + +
-