Polish dashboard UI to match Mento mockup with IRANSans and brand assets.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -349,13 +349,19 @@ onUnmounted(() => {
|
||||
<div class="profile-meta">
|
||||
<strong>{{ auth.user?.fullName }}</strong>
|
||||
<span>{{ roleLabel || 'کاربر' }}</span>
|
||||
<span class="online-label">
|
||||
<i class="online-dot" />
|
||||
آنلاین
|
||||
</span>
|
||||
</div>
|
||||
<span class="online-dot" title="آنلاین" />
|
||||
</div>
|
||||
|
||||
<div class="promo-card">
|
||||
<span class="promo-icon"><UiIcon name="megaphone" :size="18" /></span>
|
||||
<p>با منتو فروشات رو چند برابر کن</p>
|
||||
<span class="promo-icons" aria-hidden="true">
|
||||
<UiIcon name="send" :size="16" />
|
||||
<UiIcon name="sparkle" :size="14" />
|
||||
</span>
|
||||
<p>با منتو فروشات را چند برابر کن</p>
|
||||
</div>
|
||||
|
||||
<button class="logout-link" type="button" @click="onLogout">خروج از حساب</button>
|
||||
@@ -454,10 +460,11 @@ onUnmounted(() => {
|
||||
<style scoped>
|
||||
.shell {
|
||||
display: grid;
|
||||
grid-template-columns: 248px minmax(0, 1fr);
|
||||
grid-template-columns: 268px minmax(0, 1fr);
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
background: #f5f7fa;
|
||||
background: #eef2f6;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.workspace {
|
||||
@@ -477,18 +484,21 @@ onUnmounted(() => {
|
||||
|
||||
.sidebar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
top: 14px;
|
||||
align-self: start;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
height: calc(100dvh - 28px);
|
||||
margin: 14px;
|
||||
margin-inline-end: 10px;
|
||||
background: #fff;
|
||||
border-inline-start: 1px solid #e8eef3;
|
||||
padding: 1.15rem 0.9rem;
|
||||
border: 0;
|
||||
border-radius: 28px;
|
||||
padding: 1.55rem 1.05rem 1.2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
gap: 1.35rem;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
.brand-row {
|
||||
@@ -496,7 +506,7 @@ onUnmounted(() => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
padding: 0 0.35rem;
|
||||
padding: 0.15rem 0.45rem 0.35rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -541,11 +551,12 @@ onUnmounted(() => {
|
||||
|
||||
.side-nav {
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
gap: 0.45rem;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
scrollbar-width: none;
|
||||
padding-inline: 0.15rem;
|
||||
}
|
||||
|
||||
.side-nav::-webkit-scrollbar {
|
||||
@@ -555,19 +566,19 @@ onUnmounted(() => {
|
||||
.nav-primary,
|
||||
.nav-sub {
|
||||
display: grid;
|
||||
gap: 0.22rem;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.7rem;
|
||||
padding: 0.78rem 0.9rem;
|
||||
border-radius: 14px;
|
||||
color: #64748b;
|
||||
gap: 0.75rem;
|
||||
padding: 0.82rem 1rem;
|
||||
border-radius: 18px;
|
||||
color: #334155;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 0.92rem;
|
||||
font-size: 0.94rem;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
@@ -577,7 +588,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.nav-item.router-link-active {
|
||||
background: #d1faf2;
|
||||
background: #d8faf3;
|
||||
color: #0f766e;
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -605,7 +616,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.nav-group {
|
||||
margin-top: 0.35rem;
|
||||
margin-top: 0.55rem;
|
||||
}
|
||||
|
||||
.nav-group-btn {
|
||||
@@ -619,8 +630,8 @@ onUnmounted(() => {
|
||||
font: inherit;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
padding: 0.5rem 0.9rem;
|
||||
border-radius: 10px;
|
||||
padding: 0.55rem 1rem;
|
||||
border-radius: 14px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
}
|
||||
@@ -639,15 +650,15 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.nav-sub {
|
||||
margin-inline-end: 0.75rem;
|
||||
padding-inline-end: 0.35rem;
|
||||
margin-inline-end: 0.55rem;
|
||||
padding-inline-end: 0.25rem;
|
||||
border-inline-end: 1px solid #eef2f7;
|
||||
}
|
||||
|
||||
.nav-sub a {
|
||||
display: block;
|
||||
padding: 0.55rem 0.8rem;
|
||||
border-radius: 10px;
|
||||
padding: 0.58rem 0.9rem;
|
||||
border-radius: 14px;
|
||||
color: #64748b;
|
||||
text-decoration: none;
|
||||
font-size: 0.88rem;
|
||||
@@ -671,20 +682,23 @@ onUnmounted(() => {
|
||||
.sidebar-foot {
|
||||
margin-top: auto;
|
||||
display: grid;
|
||||
gap: 0.7rem;
|
||||
gap: 0.85rem;
|
||||
flex-shrink: 0;
|
||||
padding-top: 0.35rem;
|
||||
}
|
||||
|
||||
.profile-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.65rem;
|
||||
padding: 0.55rem 0.65rem;
|
||||
gap: 0.75rem;
|
||||
padding: 0.85rem 0.9rem;
|
||||
border-radius: 18px;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(145deg, #99f6e4, #5eead4);
|
||||
color: #0f766e;
|
||||
@@ -697,54 +711,59 @@ onUnmounted(() => {
|
||||
.profile-meta {
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
gap: 0.08rem;
|
||||
gap: 0.12rem;
|
||||
}
|
||||
|
||||
.profile-meta strong {
|
||||
font-size: 0.88rem;
|
||||
font-size: 0.9rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.profile-meta span {
|
||||
.profile-meta > span {
|
||||
color: #94a3b8;
|
||||
font-size: 0.75rem;
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.online-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
color: #64748b !important;
|
||||
font-size: 0.74rem !important;
|
||||
}
|
||||
|
||||
.online-dot {
|
||||
margin-inline-start: auto;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 999px;
|
||||
background: #22c55e;
|
||||
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
|
||||
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
|
||||
}
|
||||
|
||||
.promo-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.7rem;
|
||||
padding: 0.95rem 1rem;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(145deg, #0f766e, #115e59 55%, #134e4a);
|
||||
color: #ecfdf5;
|
||||
box-shadow: 0 14px 28px rgba(15, 118, 110, 0.25);
|
||||
padding: 1.05rem 1.05rem;
|
||||
border-radius: 22px;
|
||||
background: linear-gradient(105deg, #c4e84a 0%, #2dd4bf 42%, #1d4ed8 100%);
|
||||
color: #fff;
|
||||
box-shadow: 0 12px 26px rgba(29, 78, 216, 0.18);
|
||||
}
|
||||
|
||||
.promo-icon {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.14);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
.promo-icons {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.promo-card p {
|
||||
margin: 0;
|
||||
font-size: 0.84rem;
|
||||
font-size: 0.86rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.45;
|
||||
}
|
||||
@@ -754,42 +773,55 @@ onUnmounted(() => {
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
font: inherit;
|
||||
font-size: 0.8rem;
|
||||
font-size: 0.78rem;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
padding: 0 0.35rem;
|
||||
padding: 0 0.45rem 0.15rem;
|
||||
}
|
||||
|
||||
.global-search {
|
||||
flex: 1;
|
||||
max-width: 620px;
|
||||
margin-inline: auto;
|
||||
width: min(100%, 420px);
|
||||
max-width: 420px;
|
||||
justify-self: start;
|
||||
/* همتراز با عنوان هیرو: padding هیرو + آواتار خوشآمد + فاصله */
|
||||
margin-inline-start: calc(1.4rem + 48px + 0.8rem);
|
||||
margin-inline-end: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.7rem;
|
||||
background: #eef2f6;
|
||||
background: #fff;
|
||||
border-radius: 999px;
|
||||
padding: 0.78rem 1.1rem;
|
||||
padding: 0.7rem 1.05rem;
|
||||
border: 1px solid transparent;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.desktop-topbar {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
align-items: start;
|
||||
gap: 1rem;
|
||||
padding: 1.05rem 1.5rem 0.85rem;
|
||||
/* همان فاصله بالای سایدبار شناور (14px) */
|
||||
padding: 14px 1.5rem 0.85rem;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
background: rgba(245, 247, 250, 0.92);
|
||||
background: rgba(238, 242, 246, 0.92);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
/* مرکز عمودی نسبت به ارتفاع جستجو (~49px) */
|
||||
min-height: 49px;
|
||||
}
|
||||
|
||||
.global-search:focus-within {
|
||||
background: #fff;
|
||||
border-color: #cbd5e1;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
|
||||
border-color: #e2e8f0;
|
||||
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
.global-search input {
|
||||
@@ -813,18 +845,12 @@ onUnmounted(() => {
|
||||
flex-shrink: 0;
|
||||
font-size: 0.72rem;
|
||||
color: #94a3b8;
|
||||
background: #fff;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
padding: 0.18rem 0.45rem;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.round-btn {
|
||||
position: relative;
|
||||
width: 42px;
|
||||
@@ -1057,6 +1083,9 @@ onUnmounted(() => {
|
||||
bottom: 0;
|
||||
inset-inline-start: 0;
|
||||
width: min(300px, 86vw);
|
||||
height: 100dvh;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
z-index: 35;
|
||||
transform: translateX(110%);
|
||||
transition: transform 0.2s ease;
|
||||
|
||||
Reference in New Issue
Block a user