Skip to content

Commit 2e6c332

Browse files
committed
fix: hide copy link action in trashbin
1 parent 0daa5f2 commit 2e6c332

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/web-pkg/src/composables/actions/files/useFileActionsCopyPermanentLink.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import { FileAction } from '../types'
44
import { useClipboard } from '../../clipboard'
55
import { useMessages } from '../../piniaStores'
66
import { isPublicSpaceResource } from '@ownclouders/web-client'
7+
import { useRouter } from '../../router'
8+
import { isLocationTrashActive } from '../../../router'
79

810
export const useFileActionsCopyPermanentLink = () => {
11+
const router = useRouter()
912
const { showMessage, showErrorMessage } = useMessages()
1013
const { $gettext } = useGettext()
1114
const { copyToClipboard } = useClipboard()
@@ -37,6 +40,9 @@ export const useFileActionsCopyPermanentLink = () => {
3740
if (isPublicSpaceResource(space)) {
3841
return false
3942
}
43+
if (isLocationTrashActive(router, 'files-trash-generic')) {
44+
return false
45+
}
4046
return resources.length === 1
4147
},
4248
class: 'oc-files-actions-copy-permanent-link-trigger'

0 commit comments

Comments
 (0)