mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
fix(webui): sidebar selection styling, kanban active state, pointer cursors, and owner dashboard (#344)
* fix(webui): update sidebar selection styling, kanban active state, and pointer cursors * feat(webui): move dashboard to left sidebar and prevent mount animation * fix(e2e): update create-project test to click Home button in sidebar
This commit is contained in:
@@ -3,6 +3,7 @@ import { DualSidebar, DualSidebarItem } from '@/ui/components/dual-sidebar'
|
||||
import { NotificationList } from '@/ui/components/notification-list'
|
||||
import { TopNav } from '@/ui/components/top-nav'
|
||||
import {
|
||||
DashboardFillIcon,
|
||||
HomeIcon,
|
||||
KanbanFillIcon,
|
||||
NotificationFillIcon,
|
||||
@@ -83,13 +84,16 @@ function RootComponent() {
|
||||
</span>
|
||||
) : null
|
||||
|
||||
const isKanbanActive = pathname.includes('/kanban')
|
||||
const isDashboardActive = pathname.includes('/dashboard')
|
||||
|
||||
return (
|
||||
<div className="flex h-screen w-full bg-background overflow-hidden">
|
||||
<Toaster />
|
||||
<DualSidebar>
|
||||
<DualSidebarItem
|
||||
icon={<HomeIcon />}
|
||||
label={m.dashboard()}
|
||||
label={m.home()}
|
||||
onItemClick={() => {
|
||||
if (storedTeamId) {
|
||||
navigate({
|
||||
@@ -116,6 +120,7 @@ function RootComponent() {
|
||||
<DualSidebarItem
|
||||
icon={<KanbanFillIcon />}
|
||||
label={m.kanban()}
|
||||
active={isKanbanActive}
|
||||
onItemClick={() => {
|
||||
if (storedTeamId) {
|
||||
navigate({
|
||||
@@ -125,6 +130,21 @@ function RootComponent() {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{me?.role?.toLowerCase() === 'owner' && (
|
||||
<DualSidebarItem
|
||||
icon={<DashboardFillIcon />}
|
||||
label={m.dashboard()}
|
||||
active={isDashboardActive}
|
||||
onItemClick={() => {
|
||||
if (storedTeamId) {
|
||||
navigate({
|
||||
to: '/teams/$teamId/dashboard',
|
||||
params: { teamId: storedTeamId },
|
||||
})
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</DualSidebar>
|
||||
<div className="flex flex-col flex-1 md:pl-16 overflow-hidden relative">
|
||||
<TopNav />
|
||||
|
||||
Reference in New Issue
Block a user