Browse Source

Merge pull request #49199 from nextcloud/fix/files/delete-display-no-trashbin

pull/49372/head
John Molakvoæ 11 months ago
committed by GitHub
parent
commit
bb2e8e01c3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 28
      apps/files/src/actions/deleteUtils.ts
  2. 4
      dist/files-init.js
  3. 2
      dist/files-init.js.map

28
apps/files/src/actions/deleteUtils.ts

@ -42,20 +42,6 @@ export const isAllFolders = (nodes: Node[]) => {
}
export const displayName = (nodes: Node[], view: View) => {
/**
* If we're in the trashbin, we can only delete permanently
*/
if (view.id === 'trashbin' || !isTrashbinEnabled()) {
return t('files', 'Delete permanently')
}
/**
* If we're in the sharing view, we can only unshare
*/
if (isMixedUnshareAndDelete(nodes)) {
return t('files', 'Delete and unshare')
}
/**
* If those nodes are all the root node of a
* share, we can only unshare them.
@ -78,6 +64,20 @@ export const displayName = (nodes: Node[], view: View) => {
return t('files', 'Disconnect storages')
}
/**
* If we're in the trashbin, we can only delete permanently
*/
if (view.id === 'trashbin' || !isTrashbinEnabled()) {
return t('files', 'Delete permanently')
}
/**
* If we're in the sharing view, we can only unshare
*/
if (isMixedUnshareAndDelete(nodes)) {
return t('files', 'Delete and unshare')
}
/**
* If we're only selecting files, use proper wording
*/

4
dist/files-init.js
File diff suppressed because it is too large
View File

2
dist/files-init.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save