mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(frontend): default sidebar sections open and theme toasts
- Rework useSidebarSections to track sections independently, open by default - Theme sonner toasts with app color tokens and the selected theme mode
This commit is contained in:
1 parent
e77badb444
commit
edc3fb4219
6 files changed
+151
-87
No files matched your search
@@ -24,7 +24,7 @@ export function DesktopSidebar() {
|
||||
const navigate = useNavigate()
|
||||
const { updateParams } = useUrlParams()
|
||||
const [collapsed, toggle] = useSidebarCollapsed()
|
||||
const { openSection, toggleSection } = useSidebarSections(['sessions', 'menu'] as const, 'sessions')
|
||||
const { isSectionOpen, toggleSection } = useSidebarSections(['sessions', 'menu'] as const)
|
||||
const [repoSwitcherOpen, setRepoSwitcherOpen] = useState(false)
|
||||
const { isAuthenticated, isLoading, logout } = useAuth()
|
||||
|
||||
@@ -118,7 +118,7 @@ export function DesktopSidebar() {
|
||||
<>
|
||||
<SidebarCollapsibleSection
|
||||
label="Sessions"
|
||||
collapsed={openSection !== 'sessions'}
|
||||
collapsed={!isSectionOpen('sessions')}
|
||||
onToggle={() => toggleSection('sessions')}
|
||||
className="border-t border-border"
|
||||
>
|
||||
@@ -127,7 +127,7 @@ export function DesktopSidebar() {
|
||||
|
||||
<SidebarCollapsibleSection
|
||||
label="Menu"
|
||||
collapsed={openSection !== 'menu'}
|
||||
collapsed={!isSectionOpen('menu')}
|
||||
onToggle={() => toggleSection('menu')}
|
||||
className="flex-1 min-h-fit border-t border-border"
|
||||
contentClassName="overflow-y-auto"
|
||||
|
||||
Reference in new issue
Block a user