Tighten sidebar chrome: hide nav scrollbar, icon notifications, compact user row.
Move alerts next to the brand and merge name with role to free foot space. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -221,12 +221,23 @@ onUnmounted(() => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<aside id="app-sidebar" class="sidebar" :class="{ open: menuOpen }">
|
<aside id="app-sidebar" class="sidebar" :class="{ open: menuOpen }">
|
||||||
<div class="brand desktop-only">
|
<div class="brand-row desktop-only">
|
||||||
<span class="mark">M</span>
|
<div class="brand">
|
||||||
<div>
|
<span class="mark">M</span>
|
||||||
<strong>منتو</strong>
|
<div>
|
||||||
<small>Mento CRM</small>
|
<strong>منتو</strong>
|
||||||
|
<small>Mento CRM</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
class="notif-icon-btn"
|
||||||
|
type="button"
|
||||||
|
aria-label="اعلانها"
|
||||||
|
@click="toggleNotif"
|
||||||
|
>
|
||||||
|
<span class="bell" aria-hidden="true" />
|
||||||
|
<span v-if="hasUnread" class="badge">{{ unreadCount }}</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-head mobile-only">
|
<div class="drawer-head mobile-only">
|
||||||
@@ -332,14 +343,10 @@ onUnmounted(() => {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="sidebar-foot">
|
<div class="sidebar-foot">
|
||||||
<div class="notif-wrap desktop-only">
|
<p class="user-line">
|
||||||
<button class="notif-btn" type="button" @click="toggleNotif">
|
<span class="user-name">{{ auth.user?.fullName }}</span>
|
||||||
اعلانها
|
<span v-if="roleLabel" class="role-pill">{{ roleLabel }}</span>
|
||||||
<span v-if="hasUnread" class="badge">{{ unreadCount }}</span>
|
</p>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<p>{{ auth.user?.fullName }}</p>
|
|
||||||
<p v-if="roleLabel" class="role-line">{{ roleLabel }}</p>
|
|
||||||
<button class="btn btn-ghost logout" type="button" @click="onLogout">خروج</button>
|
<button class="btn btn-ghost logout" type="button" @click="onLogout">خروج</button>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -421,10 +428,18 @@ onUnmounted(() => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.brand-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.brand {
|
.brand {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.8rem;
|
gap: 0.8rem;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mark {
|
.mark {
|
||||||
@@ -443,6 +458,69 @@ onUnmounted(() => {
|
|||||||
color: #9fb3aa;
|
color: #9fb3aa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notif-icon-btn {
|
||||||
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
border-radius: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
color: #edf5f1;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notif-icon-btn:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bell {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border: 1.7px solid currentColor;
|
||||||
|
border-radius: 50% 50% 45% 45%;
|
||||||
|
border-bottom: 0;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bell::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: -3px;
|
||||||
|
left: 50%;
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
border: 1.5px solid currentColor;
|
||||||
|
border-radius: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bell::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -3px;
|
||||||
|
left: 50%;
|
||||||
|
width: 10px;
|
||||||
|
height: 2px;
|
||||||
|
background: currentColor;
|
||||||
|
border-radius: 2px;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.notif-icon-btn .badge {
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
left: -5px;
|
||||||
|
min-width: 1.15rem;
|
||||||
|
height: 1.15rem;
|
||||||
|
font-size: 0.68rem;
|
||||||
|
}
|
||||||
|
|
||||||
nav,
|
nav,
|
||||||
.side-nav {
|
.side-nav {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -452,6 +530,14 @@ nav,
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding-left: 0.15rem;
|
padding-left: 0.15rem;
|
||||||
margin-left: -0.15rem;
|
margin-left: -0.15rem;
|
||||||
|
scrollbar-width: none;
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-nav::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-primary,
|
.nav-primary,
|
||||||
@@ -556,17 +642,36 @@ nav a.router-link-active {
|
|||||||
.sidebar-foot {
|
.sidebar-foot {
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.75rem;
|
gap: 0.65rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-foot p {
|
.user-line {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #b7c8c0;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.45rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.role-line {
|
.user-name {
|
||||||
font-size: 0.8rem;
|
color: #d7e4de;
|
||||||
color: #8fa399 !important;
|
font-size: 0.92rem;
|
||||||
|
font-weight: 600;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-pill {
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: #9fb3aa;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 0.12rem 0.45rem;
|
||||||
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logout {
|
.logout {
|
||||||
@@ -574,20 +679,6 @@ nav a.router-link-active {
|
|||||||
border-color: rgba(255, 255, 255, 0.18);
|
border-color: rgba(255, 255, 255, 0.18);
|
||||||
}
|
}
|
||||||
|
|
||||||
.notif-btn {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
||||||
background: rgba(255, 255, 255, 0.06);
|
|
||||||
color: #edf5f1;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 0.65rem 0.85rem;
|
|
||||||
cursor: pointer;
|
|
||||||
font: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
min-width: 1.4rem;
|
min-width: 1.4rem;
|
||||||
height: 1.4rem;
|
height: 1.4rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user