feat: implement role-based entry and navigation enhancements

- Replace credential login with Admin/Practitioner role selection
- Add role-switcher toggle in header with automatic reversion for Admin mode
- Implement immediate return to role selection via system logo click
- Integrate role state management into global app state
This commit is contained in:
2026-06-01 17:56:22 +09:00
parent 19d4222470
commit 9e8ab11f99
5 changed files with 226 additions and 81 deletions

View File

@@ -229,6 +229,85 @@ body {
}
}
/* --- Role Switcher Toggle --- */
.role-switcher {
display: flex;
align-items: center;
gap: 0.75rem;
margin-right: 0.5rem;
padding: 0 0.75rem;
border-right: 1px solid var(--border-color);
height: 24px;
}
.role-label {
font-size: 11px;
font-weight: 700;
color: var(--text-muted);
transition: color 0.2s;
}
.role-label.active {
color: var(--primary-color);
}
.role-label.admin.active {
color: var(--color-orange);
}
/* Toggle Switch Base */
.switch {
position: relative;
display: inline-block;
width: 34px;
height: 18px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: #ccc;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 12px;
width: 12px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .4s;
}
input:checked + .slider {
background-color: var(--color-orange);
}
input:focus + .slider {
box-shadow: 0 0 1px var(--color-orange);
}
input:checked + .slider:before {
transform: translateX(16px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
/* --- Global Actions & Buttons --- */
.header-actions {
display: flex;