mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 15:14:10 +00:00
fix(webui): address various UI issues in signup, settings, and sidebar
This commit is contained in:
@@ -531,7 +531,7 @@ export function FolderTree({
|
|||||||
{!hideShares && (
|
{!hideShares && (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4',
|
'flex flex-col overflow-hidden transition-all duration-300 ease-in-out',
|
||||||
isSharesExpanded ? 'flex-1 min-h-0 h-full' : 'flex-none h-[44px] max-h-[44px]',
|
isSharesExpanded ? 'flex-1 min-h-0 h-full' : 'flex-none h-[44px] max-h-[44px]',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { TopNav } from '@/ui/components/top-nav'
|
|||||||
import { HomeIcon, NotificationFillIcon, UploadCloudIcon } from '@/ui/components/ui/icons'
|
import { HomeIcon, NotificationFillIcon, UploadCloudIcon } from '@/ui/components/ui/icons'
|
||||||
import { Toaster } from '@/ui/components/ui/sonner'
|
import { Toaster } from '@/ui/components/ui/sonner'
|
||||||
import { UploadTasks } from '@/ui/components/upload-tasks'
|
import { UploadTasks } from '@/ui/components/upload-tasks'
|
||||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
|
||||||
import { useAuthStore } from '@/ui/stores/auth'
|
import { useAuthStore } from '@/ui/stores/auth'
|
||||||
import { useTeamContextStore } from '@/ui/stores/team-context'
|
import { useTeamContextStore } from '@/ui/stores/team-context'
|
||||||
import { useUploadStore } from '@/ui/stores/upload'
|
import { useUploadStore } from '@/ui/stores/upload'
|
||||||
@@ -21,7 +20,6 @@ import { useEffect } from 'react'
|
|||||||
function RootComponent() {
|
function RootComponent() {
|
||||||
const user = useAuthStore((state) => state.user)
|
const user = useAuthStore((state) => state.user)
|
||||||
const { uploading } = useUploadStore()
|
const { uploading } = useUploadStore()
|
||||||
const { canEdit } = usePermissions()
|
|
||||||
const pathname = useRouterState({ select: (s) => s.location.pathname })
|
const pathname = useRouterState({ select: (s) => s.location.pathname })
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
@@ -90,19 +88,17 @@ function RootComponent() {
|
|||||||
<DualSidebarItem icon={<NotificationFillIcon />} label="Notifications" badge={badge}>
|
<DualSidebarItem icon={<NotificationFillIcon />} label="Notifications" badge={badge}>
|
||||||
<NotificationList />
|
<NotificationList />
|
||||||
</DualSidebarItem>
|
</DualSidebarItem>
|
||||||
{canEdit && (
|
<DualSidebarItem
|
||||||
<DualSidebarItem
|
icon={
|
||||||
icon={
|
<UploadCloudIcon
|
||||||
<UploadCloudIcon
|
uploading={uploading > 0}
|
||||||
uploading={uploading > 0}
|
className={uploading > 0 ? 'text-blue-500' : ''}
|
||||||
className={uploading > 0 ? 'text-blue-500' : ''}
|
/>
|
||||||
/>
|
}
|
||||||
}
|
label="Uploads"
|
||||||
label="Uploads"
|
>
|
||||||
>
|
<UploadTasks />
|
||||||
<UploadTasks />
|
</DualSidebarItem>
|
||||||
</DualSidebarItem>
|
|
||||||
)}
|
|
||||||
</DualSidebar>
|
</DualSidebar>
|
||||||
<div className="flex flex-col flex-1 md:pl-16 overflow-hidden relative">
|
<div className="flex flex-col flex-1 md:pl-16 overflow-hidden relative">
|
||||||
<TopNav />
|
<TopNav />
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ function SignupPage() {
|
|||||||
<span>👋</span>
|
<span>👋</span>
|
||||||
<span>
|
<span>
|
||||||
<strong>{inviteInfo.inviterName}</strong> invited you to join{' '}
|
<strong>{inviteInfo.inviterName}</strong> invited you to join{' '}
|
||||||
<strong>{inviteInfo.teamName || inviteInfo.projectName}</strong> as a{' '}
|
<strong>{inviteInfo.projectName || inviteInfo.teamName}</strong> as a{' '}
|
||||||
<strong>{inviteInfo.role}</strong>.
|
<strong>{inviteInfo.role}</strong>.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -233,21 +233,23 @@ function TeamSettingsPage() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
{me?.role === 'admin' && (
|
||||||
onClick={() => setActiveTab('transcode')}
|
<button
|
||||||
className={cn(
|
onClick={() => setActiveTab('transcode')}
|
||||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
className={cn(
|
||||||
activeTab === 'transcode'
|
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
activeTab === 'transcode'
|
||||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||||
)}
|
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||||
>
|
)}
|
||||||
<Film className="w-5 h-5" />
|
>
|
||||||
Media Processing
|
<Film className="w-5 h-5" />
|
||||||
{activeTab === 'transcode' && (
|
Media Processing
|
||||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
{activeTab === 'transcode' && (
|
||||||
)}
|
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||||
</button>
|
)}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab('notifications')}
|
onClick={() => setActiveTab('notifications')}
|
||||||
@@ -265,73 +267,77 @@ function TeamSettingsPage() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div className="mt-6 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border">
|
{me?.role === 'admin' && (
|
||||||
AI
|
<>
|
||||||
</div>
|
<div className="mt-6 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border">
|
||||||
|
AI
|
||||||
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab('providers')}
|
onClick={() => setActiveTab('providers')}
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||||
activeTab === 'providers'
|
activeTab === 'providers'
|
||||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Cpu className="w-5 h-5" />
|
<Cpu className="w-5 h-5" />
|
||||||
Providers
|
Providers
|
||||||
{activeTab === 'providers' && (
|
{activeTab === 'providers' && (
|
||||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab('skills')}
|
onClick={() => setActiveTab('skills')}
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||||
activeTab === 'skills'
|
activeTab === 'skills'
|
||||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Puzzle className="w-5 h-5" />
|
<Puzzle className="w-5 h-5" />
|
||||||
Skills
|
Skills
|
||||||
{activeTab === 'skills' && (
|
{activeTab === 'skills' && (
|
||||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab('agents')}
|
onClick={() => setActiveTab('agents')}
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||||
activeTab === 'agents'
|
activeTab === 'agents'
|
||||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Bot className="w-5 h-5" />
|
<Bot className="w-5 h-5" />
|
||||||
Agents
|
Agents
|
||||||
{activeTab === 'agents' && (
|
{activeTab === 'agents' && (
|
||||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab('sandbox')}
|
onClick={() => setActiveTab('sandbox')}
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||||
activeTab === 'sandbox'
|
activeTab === 'sandbox'
|
||||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Shield className="w-5 h-5" />
|
<Shield className="w-5 h-5" />
|
||||||
Agent Sandbox
|
Agent Sandbox
|
||||||
{activeTab === 'sandbox' && (
|
{activeTab === 'sandbox' && (
|
||||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user