SearchView: Removed the dynamic collection-tile grid (e.g. "پرفروشهای این هفته") and the "نتایج / N محصول" section header from the UI. Underlying data/filtering logic untouched.
DashboardView ("میز کار"): Rebuilt from scratch with a new structure, distinct from the old card+grid layout but visually aligned with HomeView (same blurred bar, @ink/@wine palette, staged reveal animation on mount):
Single hero card (ink→wine gradient) showing balance, gold/fiat debt, and identity — no quick-action icons inside it anymore.
Live gold rate folded into a slim inline row at the bottom instead of a titled section.
Iterated shadow/spacing on the hero card per feedback (softer, less clipped).
DialogVant / DialogVantOneButton (shared modal components, used in 7+ call sites: Dashboard, Cart, SingleProduct, Register, App): Replaced Vant's default dialog chrome with the app's own rounded-card language — circular icon badge for the illustration, pill-shaped primary/secondary buttons. No call-site markup changed.
LoginView: Rebuilt from scratch — full-bleed dark hero (brand + step copy) overlapped by a floating white form sheet, animated crossfade transition between the mobile-number and OTP steps, same staged entrance animation as Home/Dashboard. All auth logic (API check, OTP stub, session login) unchanged.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
// Ported from legacy henza_admin/vue.config.js.
|
||||
@@ -8,8 +8,15 @@ import vue from '@vitejs/plugin-vue';
|
||||
// which src/utils/index.ts reads via import.meta.env.MODE.
|
||||
export default defineConfig(({ mode }) => {
|
||||
const isBranch = mode === 'branch';
|
||||
// Ports are defined once in the repo-root .env (ADMIN_PANEL_PORT / API_PORT)
|
||||
// — see that file's comment block. envDir points here so `vite` picks it up
|
||||
// even though this app's own directory has no .env of its own.
|
||||
const rootEnv = loadEnv(mode, fileURLToPath(new URL('../..', import.meta.url)), '');
|
||||
const port = Number(rootEnv.ADMIN_PANEL_PORT ?? 5180);
|
||||
const apiPort = Number(rootEnv.API_PORT ?? 3000);
|
||||
|
||||
return {
|
||||
envDir: fileURLToPath(new URL('../..', import.meta.url)),
|
||||
// Admin is served on its own subdomain (e.g. adm.bnk…), so assets must be
|
||||
// rooted at `/`. Legacy used publicPath `admin/` because it shared a host
|
||||
// path; keeping that here made index.html request `/admin/assets/…` while
|
||||
@@ -47,13 +54,16 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5174,
|
||||
port,
|
||||
// Never silently fall back to another port — fail loudly instead so a
|
||||
// stuck dev server is obvious rather than moving to a random port.
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
'/api': 'http://localhost:3000',
|
||||
'/api': `http://localhost:${apiPort}`,
|
||||
// Uploaded files (ProductImage.url etc.) are served by the API's own
|
||||
// static handler, not this dev server — without this they 404 in dev
|
||||
// even though production nginx (nginx.conf) already proxies them.
|
||||
'/uploads': 'http://localhost:3000',
|
||||
'/uploads': `http://localhost:${apiPort}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user