mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 14:04:50 +00:00
feat(project): add recent viewed files section to project folder tree (#348)
* feat(project): add recent viewed files section to project folder tree * feat(webui): disable toolbar buttons and context menu in recents page * test(core): optimize recents cap test execution time * feat(webui): show hint text in recents page top toolbar * feat(webui): rename recents section to Recently Viewed * refactor(core): consolidate recents methods into AssetService * fix(api): forward pagination parameters in folder children endpoint (#349) * fix(project-recents): scope views and disable recents mutations * fix(api): allow recent views in demo mode * fix(api): limit demo recent view exception to post
This commit is contained in:
@@ -41,6 +41,7 @@ interface FileBrowserContextMenuProps {
|
||||
folders: AssetInfo[]
|
||||
files: AssetInfo[]
|
||||
isRecentlyDeleted?: boolean
|
||||
isRecents?: boolean
|
||||
onOpenAgentsMd?: (item: AssetInfo | null) => void
|
||||
isShareView?: boolean
|
||||
onRemoveFromShare?: (items: AssetInfo[]) => void
|
||||
@@ -67,6 +68,7 @@ export function FileBrowserContextMenu({
|
||||
folders,
|
||||
files,
|
||||
isRecentlyDeleted,
|
||||
isRecents,
|
||||
onOpenAgentsMd,
|
||||
isShareView,
|
||||
onRemoveFromShare,
|
||||
@@ -112,6 +114,10 @@ export function FileBrowserContextMenu({
|
||||
onRestore(itemsToRestore)
|
||||
}
|
||||
|
||||
if (isRecents) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (isShareView) {
|
||||
if (!item) return null
|
||||
return (
|
||||
@@ -152,7 +158,7 @@ export function FileBrowserContextMenu({
|
||||
}
|
||||
|
||||
if (!item) {
|
||||
if (!canEdit) return null
|
||||
if (!canEdit || isRecents) return null
|
||||
// Right-click on empty area
|
||||
return (
|
||||
<ContextMenuContent
|
||||
|
||||
Reference in New Issue
Block a user