add gameview navigation
This commit is contained in:
@@ -11,6 +11,7 @@ import { isBrowserPlayable } from '@/lib/browser-media'
|
||||
|
||||
interface Props {
|
||||
libraryId: string
|
||||
libraryName: string
|
||||
initialPath: string
|
||||
}
|
||||
|
||||
@@ -21,7 +22,7 @@ type ModalState =
|
||||
|
||||
type TagPanelState = { entry: FileEntry; itemKey: string } | null
|
||||
|
||||
export default function MixedView({ libraryId, initialPath }: Props) {
|
||||
export default function MixedView({ libraryId, libraryName, initialPath }: Props) {
|
||||
const [currentPath, setCurrentPath] = useState(initialPath)
|
||||
const [listing, setListing] = useState<DirectoryListing | null>(null)
|
||||
const [loading, setLoading] = useState(true)
|
||||
@@ -33,7 +34,9 @@ export default function MixedView({ libraryId, initialPath }: Props) {
|
||||
const [selectedTagIds, setSelectedTagIds] = useState<Set<string>>(new Set())
|
||||
const [assignments, setAssignments] = useState<Record<string, string[]>>({})
|
||||
const [filterRefreshKey, setFilterRefreshKey] = useState(0)
|
||||
const [showFilters, setShowFilters] = useState(true)
|
||||
const [showFilters, setShowFilters] = useState(
|
||||
() => typeof window !== 'undefined' && window.innerWidth >= 768
|
||||
)
|
||||
const [recursiveEntries, setRecursiveEntries] = useState<FileEntry[]>([])
|
||||
const [recursiveLoading, setRecursiveLoading] = useState(false)
|
||||
const [recursiveLoaded, setRecursiveLoaded] = useState(false)
|
||||
@@ -339,12 +342,20 @@ export default function MixedView({ libraryId, initialPath }: Props) {
|
||||
<div className="flex-1 min-w-0">
|
||||
{/* Breadcrumb */}
|
||||
<nav className="flex items-center gap-1 mb-6 flex-wrap text-sm">
|
||||
<a
|
||||
href="/"
|
||||
className="transition-colors"
|
||||
style={{ color: 'var(--text-secondary)' }}
|
||||
>
|
||||
Libraries
|
||||
</a>
|
||||
<span style={{ color: 'var(--border)' }}>/</span>
|
||||
<button
|
||||
onClick={() => loadPath('')}
|
||||
className="transition-colors"
|
||||
style={{ color: breadcrumbs.length === 0 ? 'var(--text-primary)' : 'var(--text-secondary)' }}
|
||||
>
|
||||
Root
|
||||
{libraryName}
|
||||
</button>
|
||||
{breadcrumbs.map((segment, i) => {
|
||||
const isLast = i === breadcrumbs.length - 1
|
||||
|
||||
Reference in New Issue
Block a user