mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(files): improve delete display name when trashbin is disabled
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
6559c2075e
commit
d9eb29c525
3 changed files with 17 additions and 17 deletions
|
|
@ -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
vendored
4
dist/files-init.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-init.js.map
vendored
2
dist/files-init.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue