mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 06:24:30 +00:00
feat(webui): add simplified mobile-friendly layout for file and share lists (#356)
* feat(webui): add simplified mobile-friendly layout for file and share lists * refactor(webui): switch mobile file list layout to 1-column grid * feat(webui): show foldertree by default in child sidebar and add close button * feat(webui): add collapsible section headers and fix folder card full-width on mobile * feat(webui): improve mobile breadcrumb bar with middle truncation and dual ellipsis * fix(webui): unify breadcrumb DOM structure across desktop and mobile * fix(webui): remove unused breadcrumbs variable in BreadcrumbNav * fix(webui): complete and confirm file uploads on mobile and handle errors properly * fix(webui): remove active scale animation on mobile FAB to stabilize dropdown menu anchor * refactor(webui): use PresignedUrl type from dtos for uploadFiles and eliminate any cast * fix(webui): scope folder card max width to desktop with responsive md:max-w-[340px]
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import { DualSidebar, DualSidebarItem } from '@/ui/components/dual-sidebar'
|
||||
import { FolderTree } from '@/ui/components/folder-tree'
|
||||
import { NotificationList } from '@/ui/components/notification-list'
|
||||
import { TopNav } from '@/ui/components/top-nav'
|
||||
import {
|
||||
@@ -15,6 +16,7 @@ import { m } from '@/ui/paraglide/messages.js'
|
||||
import { getLocale, setLocale } from '@/ui/paraglide/runtime.js'
|
||||
import { useAuthStore } from '@/ui/stores/auth'
|
||||
import { useTeamContextStore } from '@/ui/stores/team-context'
|
||||
import { useTopNavStore } from '@/ui/stores/top-nav'
|
||||
import { useUploadStore } from '@/ui/stores/upload'
|
||||
import { useUserMetadataStore } from '@/ui/stores/user-metadata'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
@@ -47,6 +49,7 @@ function RootComponent() {
|
||||
const pathname = useRouterState({ select: (s) => s.location.pathname })
|
||||
const navigate = useNavigate()
|
||||
const { teamId: storedTeamId, setTeamId } = useTeamContextStore()
|
||||
const { projectState } = useTopNavStore()
|
||||
|
||||
const showSidebar = user && (pathname.startsWith('/teams/') || pathname.startsWith('/projects/'))
|
||||
|
||||
@@ -90,7 +93,25 @@ function RootComponent() {
|
||||
return (
|
||||
<div className="flex h-screen w-full bg-background overflow-hidden">
|
||||
<Toaster />
|
||||
<DualSidebar>
|
||||
<DualSidebar
|
||||
hideMobileButton={true}
|
||||
defaultMobileContent={
|
||||
projectState?.projectId
|
||||
? {
|
||||
label: m.folder_tree_assets(),
|
||||
children: (
|
||||
<FolderTree
|
||||
teamId={projectState.teamId}
|
||||
projectId={projectState.projectId}
|
||||
projectName={projectState.projectName}
|
||||
rootFolderId={projectState.rootFolderId || ''}
|
||||
ancestorFolders={projectState.ancestorFolders}
|
||||
/>
|
||||
),
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<DualSidebarItem
|
||||
icon={<HomeIcon />}
|
||||
label={m.home()}
|
||||
|
||||
Reference in New Issue
Block a user