feat(ui): adopt Tailwind v4 design system and archive change

- Add tailwindcss v4 + @tailwindcss/vite to mall, shop-admin, admin
- Add @vmall/shared/theme.css tokens with html[data-accent] presets
- Add @vmall/ui kit (VBtn/VBadge/VField/VInput/VCard/VPanel/VTable/VPage,
  VAccentSwatch, useAccent) as a Nuxt module
- Convert all three apps to kit + utilities; delete ui.css/mall.css and
  every <style scoped>; consoles get accent presets, mall locked to red
- Fix VCard boolean prop default (padding) and PDP/store stale
  useAsyncData keys on param navigation
- Archive adopt-tailwind-design-system; new frontend-ui capability spec
This commit is contained in:
Chengdong Zhang
2026-09-22 18:22:50 +08:00
parent 4d2ee3b0bf
commit 0d0e10b97b
101 changed files with 2833 additions and 7207 deletions
+18 -48
View File
@@ -37,54 +37,24 @@ async function submit(): Promise<void> {
</script>
<template>
<div class="login-shell">
<form class="card form-narrow login-card" @submit.prevent="submit">
<p class="eyebrow">{{ $t("common.appName") }} · Admin</p>
<h1 class="page-title">{{ $t("auth.welcome") }}</h1>
<p class="muted">{{ $t("admin.dashboardTitle") }}</p>
<div class="field">
<label for="email">{{ $t("common.email") }}</label>
<input id="email" v-model="email" type="email" autocomplete="username" required />
</div>
<div class="field">
<label for="password">{{ $t("common.password") }}</label>
<input id="password" v-model="password" type="password" autocomplete="current-password" required />
</div>
<p v-if="errorMessage" class="error-text" role="alert">{{ errorMessage }}</p>
<button class="btn primary submit-button" type="submit" :disabled="loading">
{{ loading ? $t("common.loading") : $t("common.login") }}
</button>
<p class="muted hint">{{ $t("auth.adminHint") }}</p>
<div class="grid min-h-screen place-items-center bg-bg px-6 py-8 font-sans text-text">
<form class="w-full max-w-[420px]" @submit.prevent="submit">
<VCard>
<p class="mb-2 text-xs font-bold uppercase tracking-[0.08em] text-primary">{{ $t("common.appName") }} · Admin</p>
<h1 class="mb-2 text-xl font-bold">{{ $t("auth.welcome") }}</h1>
<p class="mb-5 text-sm text-muted">{{ $t("admin.dashboardTitle") }}</p>
<VField :label="$t('common.email')">
<VInput id="email" v-model="email" type="email" autocomplete="username" required />
</VField>
<VField :label="$t('common.password')">
<VInput id="password" v-model="password" type="password" autocomplete="current-password" required />
</VField>
<p v-if="errorMessage" class="my-2 text-sm text-danger" role="alert">{{ errorMessage }}</p>
<VBtn class="w-full" variant="primary" type="submit" :disabled="loading">
{{ loading ? $t("common.loading") : $t("common.login") }}
</VBtn>
<p class="mt-4 text-center text-xs text-muted">{{ $t("auth.adminHint") }}</p>
</VCard>
</form>
</div>
</template>
<style scoped>
.login-shell {
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
}
.login-card {
width: min(100%, 420px);
margin: 0;
}
.eyebrow {
color: var(--primary);
font-size: 13px;
font-weight: 700;
letter-spacing: 0.08em;
margin: 0 0 10px;
text-transform: uppercase;
}
.submit-button {
width: 100%;
justify-content: center;
}
.hint {
font-size: 12px;
margin: 16px 0 0;
text-align: center;
}
</style>