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