feat: port tauri header top-menu to admin topbar
Rebuild admin Topbar to match clinic-pro-tauri header: - Icon order: theme -> settings -> bell (was theme -> bell -> settings) - Settings gear now navigates to the role-based settings page instead of opening the personalization panel - Search placeholder changed to «جستجو», dropped the ⌘K hint - Add ProfileMenu: avatar + user name + context/role subtitle + caret, with a dropdown (profile / payments / settings / personalization / logout). Links are role-aware; personalization keeps the existing settings panel. Frontend-only, no API changes. Adds ProfileMenu.test + Topbar.test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -457,6 +457,43 @@ body {
|
||||
.topbar-crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
|
||||
.topbar-crumbs b { color: var(--text); }
|
||||
|
||||
/* ── Profile menu (topbar) — معادلِ MenuProfile در clinic-pro-tauri ── */
|
||||
.profile-trigger {
|
||||
display: flex; align-items: center; gap: 8px; flex-shrink: 0;
|
||||
padding: 4px 6px; border-radius: var(--r-sm);
|
||||
background: none; border: 1px solid transparent; cursor: pointer;
|
||||
transition: .15s; color: var(--text);
|
||||
}
|
||||
.profile-trigger:hover { background: var(--surface-2); border-color: var(--border); }
|
||||
.profile-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; overflow: hidden; }
|
||||
.profile-meta b { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
|
||||
.profile-meta span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
|
||||
.profile-caret { color: var(--text-3); }
|
||||
/* موبایل: فقط آواتار (مثل md:hidden در tauri) */
|
||||
@media (max-width: 640px) {
|
||||
.profile-meta, .profile-caret { display: none; }
|
||||
}
|
||||
|
||||
.profile-menu {
|
||||
z-index: 9000; min-width: 190px; overflow: hidden;
|
||||
padding: 8px; display: flex; flex-direction: column; gap: 2px;
|
||||
background: var(--surface); border: 1px solid var(--border);
|
||||
border-radius: var(--r); box-shadow: var(--shadow-lg);
|
||||
}
|
||||
.profile-item {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
width: 100%; padding: 8px 10px; border-radius: var(--r-sm);
|
||||
font-size: 13px; font-weight: 500; color: var(--text-2);
|
||||
background: transparent; border: none; cursor: pointer; text-align: right;
|
||||
transition: .12s;
|
||||
}
|
||||
.profile-item:hover { background: var(--surface-2); color: var(--text); }
|
||||
.profile-item.danger {
|
||||
margin-top: 6px; justify-content: center;
|
||||
color: var(--on-primary); background: var(--danger); font-weight: 600;
|
||||
}
|
||||
.profile-item.danger:hover { background: var(--danger); filter: brightness(0.94); color: var(--on-primary); }
|
||||
|
||||
/* در dark مرز سایدبار/هدر محو است — مثل clinic-pro-tauri */
|
||||
[data-theme="dark"] .sidebar,
|
||||
[data-theme="dark"] .sidebar-brand,
|
||||
|
||||
Reference in New Issue
Block a user