ui(admin-panel): restore login page design from the local design line

Only the template, styles and decorative icon imports change. The script
logic (login flow, validation, redirects) is identical to dev.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-10-14 03:55:51 +03:30
co-authored by Claude Haiku 5.5
parent ea987b708f
commit e26dddebd9
+607 -47
View File
@@ -6,15 +6,92 @@
the loading overlay becomes the button's own loading state.
-->
<div id="page-login">
<a-card class="login-card" :bordered="false">
<div class="login-grid">
<div class="login-form">
<div class="vx-card__title">
<h4>ورود به محیط مدیریت</h4>
<p>لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.</p>
<div class="aurora" aria-hidden="true">
<span class="blob blob--gold"></span>
<span class="blob blob--teal"></span>
<span class="blob blob--navy"></span>
</div>
<div class="grid-bg" aria-hidden="true"></div>
<div class="sparkles" aria-hidden="true">
<i v-for="n in 14" :key="n" :style="sparkleStyle(n)"></i>
</div>
<main class="login-layout">
<section class="hero" aria-hidden="true">
<div class="brand-row">
<div class="logo-chip">
<img src="../../assets/images/logo/montzar-icon.png" alt="" />
</div>
<span class="brand-name">Montzar</span>
</div>
<h2 class="hero-title">
مدیریت هوشمند
<span class="gold-text">کسب‌وکار طلا</span>
</h2>
<p class="hero-sub">سفارش‌ها، مشتریان، محصولات و حسابداری؛ همه در یک پنل.</p>
<div class="ingots">
<div class="ingot-glow"></div>
<svg viewBox="0 0 400 240" class="ingot-svg">
<defs>
<linearGradient id="ig-front" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#ffe7a3" />
<stop offset="0.45" stop-color="#e9b949" />
<stop offset="1" stop-color="#b07a1e" />
</linearGradient>
<linearGradient id="ig-top" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="#fff6d6" />
<stop offset="1" stop-color="#f4cf6a" />
</linearGradient>
<linearGradient id="ig-side" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#c58f2a" />
<stop offset="1" stop-color="#7d5313" />
</linearGradient>
<linearGradient id="ig-shine" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="#fff" stop-opacity="0" />
<stop offset="0.5" stop-color="#fff" stop-opacity="0.75" />
<stop offset="1" stop-color="#fff" stop-opacity="0" />
</linearGradient>
<clipPath id="ig-clip">
<polygon points="0,64 176,64 156,20 20,20" />
</clipPath>
<g id="ingot">
<polygon points="20,20 156,20 172,6 36,6" fill="url(#ig-top)" />
<polygon points="156,20 172,6 196,50 176,64" fill="url(#ig-side)" />
<polygon points="0,64 176,64 156,20 20,20" fill="url(#ig-front)" />
<g clip-path="url(#ig-clip)">
<rect class="shine" x="-80" y="0" width="60" height="70" fill="url(#ig-shine)" />
</g>
<text x="88" y="49" text-anchor="middle" class="ingot-label">999.9</text>
</g>
</defs>
<use href="#ingot" x="0" y="160" />
<use href="#ingot" x="196" y="160" />
<use href="#ingot" x="98" y="104" />
</svg>
</div>
<ul class="chips">
<li><LineChartOutlined /> گزارش لحظه‌ای</li>
<li><TeamOutlined /> مدیریت مشتریان</li>
<li><ShoppingOutlined /> پیگیری سفارش</li>
</ul>
</section>
<section class="form-side">
<div class="glass-card">
<div class="card-head">
<div class="logo-chip logo-chip--sm">
<img src="../../assets/images/logo/montzar-icon.png" alt="Montzar" />
</div>
<span class="eyebrow"><span class="dot"></span>پنل مدیریت</span>
</div>
<a-form layout="vertical" class="mt-8" @submit.prevent="loginJWT">
<h1 class="title">ورود به محیط مدیریت</h1>
<p class="subtitle">لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.</p>
<a-form layout="vertical" class="login-form" @submit.prevent="loginJWT">
<a-form-item
label="موبایل"
:validate-status="mobileError ? 'error' : ''"
@@ -23,9 +100,13 @@
<a-input
v-model:value="mobile"
autocomplete="off"
size="large"
inputmode="numeric"
placeholder="09xxxxxxxxx"
class="ltr-input"
@blur="touchedMobile = true"
/>
>
<template #prefix><MobileOutlined class="field-icon" /></template>
</a-input>
</a-form-item>
<a-form-item
@@ -35,29 +116,37 @@
>
<a-input-password
v-model:value="password"
size="large"
placeholder="••••••"
class="ltr-input"
@blur="touchedPassword = true"
@pressEnter="loginJWT"
/>
>
<template #prefix><LockOutlined class="field-icon" /></template>
</a-input-password>
</a-form-item>
<a-button
type="primary"
size="large"
block
class="submit-btn"
:disabled="!validateForm"
:loading="loading"
@click="loginJWT"
>
ورود
<span>ورود</span>
<ArrowLeftOutlined v-if="!loading" class="btn-arrow" />
</a-button>
</a-form>
</div>
<div class="login-art">
<img src="../../assets/images/logo/montzar-icon.png" alt="Montzar" />
<p class="secure-note">
<SafetyCertificateOutlined />
<span>اتصال شما رمزنگاری شده و امن است</span>
</p>
</div>
</div>
</a-card>
</section>
</main>
<footer class="page-footer">© Montzar</footer>
</div>
</template>
@@ -65,6 +154,15 @@
import { computed, ref } from 'vue';
import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue';
import {
ArrowLeftOutlined,
LineChartOutlined,
LockOutlined,
MobileOutlined,
SafetyCertificateOutlined,
ShoppingOutlined,
TeamOutlined,
} from '@ant-design/icons-vue';
import { useAuthStore } from '../../stores/auth';
const router = useRouter();
@@ -76,6 +174,18 @@ const loading = ref(false);
const touchedMobile = ref(false);
const touchedPassword = ref(false);
// Deterministic positions so the sparkles do not jump on re-render.
function sparkleStyle(n: number) {
const x = (n * 37) % 100;
const y = (n * 53) % 100;
return {
left: `${x}%`,
top: `${y}%`,
animationDelay: `${(n * 0.7) % 6}s`,
transform: `scale(${0.6 + ((n * 13) % 10) / 15})`,
};
}
// legacy VeeValidate rules: mobile 'required|min:8', password 'required|min:5',
// both validated on blur.
const mobileError = computed(() => {
@@ -117,45 +227,495 @@ async function loginJWT() {
<style scoped>
#page-login {
--bg: #060b1c;
--navy: #1c2d56;
--gold-1: #fff1c1;
--gold-2: #f2c95c;
--gold-3: #c8902a;
--teal: #13877a;
position: relative;
min-height: 100vh;
min-height: 100dvh;
overflow: hidden;
display: flex;
flex-direction: column;
color: #e6ebf5;
background:
radial-gradient(1000px 700px at 85% -10%, #14234a 0%, transparent 60%),
radial-gradient(800px 600px at 0% 110%, #0e2a33 0%, transparent 60%),
var(--bg);
}
/* ---------- animated background ---------- */
.aurora {
position: absolute;
inset: 0;
pointer-events: none;
filter: blur(90px);
opacity: 0.85;
}
.blob {
position: absolute;
border-radius: 50%;
animation: drift 18s ease-in-out infinite alternate;
}
.blob--gold {
width: 46vmax;
height: 46vmax;
top: -18vmax;
left: -10vmax;
background: radial-gradient(circle, rgba(242, 201, 92, 0.38), transparent 65%);
}
.blob--teal {
width: 40vmax;
height: 40vmax;
bottom: -20vmax;
right: -8vmax;
background: radial-gradient(circle, rgba(19, 135, 122, 0.42), transparent 65%);
animation-duration: 22s;
animation-direction: alternate-reverse;
}
.blob--navy {
width: 36vmax;
height: 36vmax;
top: 30%;
left: 40%;
background: radial-gradient(circle, rgba(60, 90, 170, 0.35), transparent 65%);
animation-duration: 26s;
}
@keyframes drift {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(6vmax, 4vmax) scale(1.08); }
100% { transform: translate(-4vmax, 6vmax) scale(0.95); }
}
.grid-bg {
position: absolute;
inset: 0;
pointer-events: none;
background-image:
linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
background-size: 48px 48px;
mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
}
.sparkles {
position: absolute;
inset: 0;
pointer-events: none;
}
.sparkles i {
position: absolute;
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--gold-1);
box-shadow: 0 0 10px 2px rgba(242, 201, 92, 0.7);
opacity: 0;
animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle {
0%, 100% { opacity: 0; }
50% { opacity: 0.9; }
}
/* ---------- layout ---------- */
.login-layout {
position: relative;
z-index: 1;
flex: 1;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 40px 32px;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
gap: 64px;
}
/* ---------- hero ---------- */
.hero {
display: flex;
flex-direction: column;
}
.brand-row {
display: flex;
align-items: center;
gap: 12px;
}
.logo-chip {
width: 52px;
height: 52px;
display: grid;
place-items: center;
border-radius: 16px;
background: #fff;
box-shadow:
0 0 0 1px rgba(255, 255, 255, 0.2),
0 10px 30px -8px rgba(242, 201, 92, 0.45);
}
.logo-chip img {
width: 64%;
}
.brand-name {
font-size: 16px;
font-weight: 500;
letter-spacing: 1px;
color: #fff;
}
.hero-title {
margin: 36px 0 14px;
font-size: 16px;
font-weight: 500;
line-height: 1.35;
color: #fff;
}
.gold-text {
display: block;
background: linear-gradient(100deg, var(--gold-1) 0%, var(--gold-2) 40%, var(--gold-3) 70%, var(--gold-1) 100%);
background-size: 200% auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: gold-flow 6s linear infinite;
}
@keyframes gold-flow {
to { background-position: 200% center; }
}
.hero-sub {
margin: 0;
max-width: 440px;
font-size: 15px;
line-height: 1.9;
color: rgba(230, 235, 245, 0.65);
}
.ingots {
position: relative;
width: 100%;
max-width: 420px;
margin: 40px 0 28px;
animation: float 6s ease-in-out infinite;
}
.ingot-glow {
position: absolute;
left: 10%;
right: 10%;
bottom: -6%;
height: 40%;
border-radius: 50%;
background: radial-gradient(ellipse, rgba(242, 201, 92, 0.55), transparent 70%);
filter: blur(24px);
}
.ingot-svg {
position: relative;
width: 100%;
height: auto;
overflow: visible;
filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
}
.ingot-label {
font: 700 13px/1 ui-sans-serif, system-ui, sans-serif;
fill: rgba(110, 70, 10, 0.55);
letter-spacing: 1px;
}
.shine {
animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine {
0%, 55% { transform: translateX(0); }
100% { transform: translateX(320px); }
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-12px); }
}
.chips {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.chips li {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
border-radius: 999px;
font-size: 13px;
color: rgba(255, 255, 255, 0.85);
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(8px);
}
.chips li :deep(.anticon) {
color: var(--gold-2);
}
/* ---------- glass card ---------- */
.form-side {
display: flex;
justify-content: center;
}
.glass-card {
position: relative;
width: 100%;
max-width: 440px;
padding: 40px 36px 32px;
border-radius: 28px;
background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
backdrop-filter: blur(24px) saturate(140%);
-webkit-backdrop-filter: blur(24px) saturate(140%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.12),
0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.glass-card::before {
content: '';
position: absolute;
inset: 0;
padding: 1px;
border-radius: inherit;
background: linear-gradient(140deg, rgba(242, 201, 92, 0.6), rgba(255, 255, 255, 0.08) 35%, rgba(19, 135, 122, 0.5));
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
.card-head {
display: flex;
align-items: center;
justify-content: space-between;
}
.logo-chip--sm {
width: 44px;
height: 44px;
border-radius: 14px;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
border-radius: 999px;
font-size: 12px;
font-weight: 500;
color: var(--gold-2);
background: rgba(242, 201, 92, 0.1);
border: 1px solid rgba(242, 201, 92, 0.25);
}
.dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #34d399;
box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}
.title {
margin: 28px 0 8px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.subtitle {
margin: 0 0 28px;
font-size: 13.5px;
line-height: 1.9;
color: rgba(230, 235, 245, 0.6);
}
/* ---------- form controls (dark) ---------- */
.login-form :deep(.ant-form-item) {
margin-bottom: 20px;
}
.login-form :deep(.ant-form-item-label > label) {
color: rgba(230, 235, 245, 0.85);
font-weight: 500;
font-size: 13px;
}
.login-form :deep(.ant-input-affix-wrapper) {
height: 52px;
border-radius: 14px;
background: rgba(6, 11, 28, 0.55);
border: 1px solid rgba(255, 255, 255, 0.12);
box-shadow: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.login-form :deep(.ant-input-affix-wrapper:hover) {
border-color: rgba(242, 201, 92, 0.45);
}
.login-form :deep(.ant-input-affix-wrapper-focused) {
background: rgba(6, 11, 28, 0.75);
border-color: var(--gold-2);
box-shadow: 0 0 0 4px rgba(242, 201, 92, 0.15);
}
.login-form :deep(.ant-input-affix-wrapper-status-error) {
border-color: #f87171 !important;
box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12) !important;
}
.login-form :deep(.ant-input) {
background: transparent;
color: #fff;
font-size: 15px;
}
.login-form :deep(.ant-input::placeholder) {
color: rgba(230, 235, 245, 0.3);
}
.login-form :deep(.ant-input-password-icon),
.login-form :deep(.ant-input-suffix .anticon) {
color: rgba(230, 235, 245, 0.45);
}
.login-form :deep(.ant-input-password-icon:hover) {
color: var(--gold-2);
}
.login-form :deep(.ant-form-item-explain-error) {
color: #fca5a5;
font-size: 12px;
margin-top: 4px;
}
.login-form :deep(input:-webkit-autofill) {
-webkit-text-fill-color: #fff;
transition: background-color 9999s ease-in-out 0s;
}
.ltr-input :deep(input) {
direction: ltr;
text-align: right;
letter-spacing: 0.6px;
}
.field-icon {
color: var(--gold-2);
font-size: 16px;
margin-inline-end: 8px;
opacity: 0.85;
}
/* ---------- button ---------- */
.submit-btn {
position: relative;
overflow: hidden;
height: 54px;
margin-top: 8px;
border: none;
border-radius: 14px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
font-size: 16px;
font-weight: 500;
color: #2a1a02;
background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 100%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.6),
0 14px 30px -12px rgba(242, 201, 92, 0.75);
transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.submit-btn::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 40%;
left: -60%;
background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
transform: skewX(-20deg);
}
.submit-btn:not(:disabled):hover {
color: #2a1a02;
background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 100%);
transform: translateY(-2px);
filter: brightness(1.05);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.6),
0 18px 36px -12px rgba(242, 201, 92, 0.9);
}
.submit-btn:not(:disabled):hover::after {
animation: btn-shine 0.9s ease;
}
@keyframes btn-shine {
to { left: 120%; }
}
.submit-btn:disabled,
.submit-btn:disabled:hover {
color: rgba(230, 235, 245, 0.35);
background: rgba(255, 255, 255, 0.07);
box-shadow: none;
transform: none;
}
.btn-arrow {
font-size: 15px;
transition: transform 0.2s ease;
}
.submit-btn:not(:disabled):hover .btn-arrow {
transform: translateX(-4px);
}
.secure-note {
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
gap: 6px;
margin: 22px 0 0;
font-size: 12px;
color: rgba(230, 235, 245, 0.45);
}
.login-card {
width: 100%;
max-width: 900px;
.secure-note :deep(.anticon) {
color: #34d399;
}
.login-grid {
display: grid;
grid-template-columns: 1fr;
align-items: center;
}
@media (min-width: 992px) {
.login-grid {
grid-template-columns: 1fr 1fr;
}
}
.login-form {
background-color: #eff2f7; /* legacy inline style */
padding: 2rem;
min-height: 505px; /* legacy .login-tabs-container */
}
.login-art {
display: none;
.page-footer {
position: relative;
z-index: 1;
padding: 0 0 18px;
text-align: center;
font-size: 12px;
color: rgba(230, 235, 245, 0.3);
direction: ltr;
}
@media (min-width: 992px) {
.login-art {
display: block;
/* ---------- responsive ---------- */
@media (max-width: 1100px) {
.hero-title {
font-size: 16px;
}
.login-layout {
gap: 40px;
}
}
.login-art img {
max-width: 70%;
margin: 0 auto;
@media (max-width: 991px) {
.login-layout {
grid-template-columns: 1fr;
max-width: 480px;
padding: 32px 20px;
gap: 0;
}
.hero {
display: none;
}
}
.mt-8 {
margin-top: 2rem;
@media (max-width: 575px) {
.login-layout {
padding: 20px 16px;
align-items: start;
}
.glass-card {
padding: 28px 20px 24px;
border-radius: 24px;
margin-top: 24px;
}
.title {
font-size: 16px;
}
}
@media (prefers-reduced-motion: reduce) {
.blob,
.sparkles i,
.gold-text,
.ingots,
.shine {
animation: none;
}
}
</style>