mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 02:27:38 +00:00
feat(share): default right sidebar to collapsed on public share list page and expanded on detail page
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/ui/components/ui/dropdown-menu'
|
||||
import {
|
||||
DockToLeft,
|
||||
@@ -18,9 +16,11 @@ import {
|
||||
DockToRight,
|
||||
DockToRightFilled,
|
||||
} from '@/ui/components/ui/icons'
|
||||
import { Link, useNavigate } from '@tanstack/react-router'
|
||||
import { ChevronDown, LayoutGrid, List, History, Check, FileIcon } from 'lucide-react'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { Link, useNavigate } from '@tanstack/react-router'
|
||||
import { Check, ChevronDown, FileIcon, History, LayoutGrid, List } from 'lucide-react'
|
||||
|
||||
interface BreadcrumbNavProps {
|
||||
teamId: string
|
||||
@@ -240,7 +240,7 @@ export function BreadcrumbNav({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{(!fileId || isPublic) && (
|
||||
{!fileId && (
|
||||
<div className="flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background p-1">
|
||||
{/* Left Sidebar Toggle */}
|
||||
{!isPublic && onLeftSidebarToggle && (
|
||||
|
||||
@@ -90,7 +90,7 @@ export function PublicShareManager({
|
||||
|
||||
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())
|
||||
const [rightSidebarWidth, setRightSidebarWidth] = useState(360)
|
||||
const [isRightSidebarCollapsed, setIsRightSidebarCollapsed] = useState(false)
|
||||
const [isRightSidebarCollapsed, setIsRightSidebarCollapsed] = useState(() => !initialFileId)
|
||||
const videoRef = useRef<Player | null>(null)
|
||||
const [annotations, setAnnotations] = useState<Annotation[]>([])
|
||||
const [currentTime, setCurrentTime] = useState(0)
|
||||
|
||||
Reference in New Issue
Block a user