mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 04:14:30 +00:00
feat(collection): implement saved search results as collections
This commit is contained in:
@@ -6,6 +6,7 @@ import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { SearchCondition, SearchSort } from '@/dtos/search'
|
||||
import type { CreateUploadTaskRequest } from '@/dtos/upload'
|
||||
import type { ShareLinkInfo } from '@/dtos/share'
|
||||
import type { CollectionInfo } from '@/dtos/collection'
|
||||
import { useFieldStore } from '@/ui/stores/fields'
|
||||
import { useUploadStore } from '@/ui/stores/upload'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
@@ -70,6 +71,9 @@ interface FileBrowserProps {
|
||||
isPublic?: boolean
|
||||
onRemoveFromShare?: (items: AssetInfo[]) => void
|
||||
fieldVisibility?: Record<string, boolean>
|
||||
collection?: CollectionInfo
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
onUpdateCollection?: (updates: { name?: string; filter?: any }) => void
|
||||
}
|
||||
|
||||
type FileWithId = {
|
||||
@@ -110,6 +114,8 @@ export function FileBrowser({
|
||||
isPublic,
|
||||
onRemoveFromShare,
|
||||
fieldVisibility,
|
||||
collection,
|
||||
onUpdateCollection,
|
||||
}: FileBrowserProps) {
|
||||
const [contextMenuItem, setContextMenuItem] = useState<AssetInfo | null>(null)
|
||||
const [moveCopyMode, setMoveCopyMode] = useState<'move' | 'copy' | null>(null)
|
||||
@@ -745,6 +751,8 @@ export function FileBrowser({
|
||||
sort={sort}
|
||||
onSortChange={onSortChange}
|
||||
isRecentlyDeleted={isRecentlyDeleted}
|
||||
collection={collection}
|
||||
onUpdateCollection={onUpdateCollection}
|
||||
/>
|
||||
)}
|
||||
{displayStyle === 'list' ? (
|
||||
|
||||
Reference in New Issue
Block a user