aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2024-11-11 13:16:35 +0100
committerRichard Steinmetz <richard@steinmetz.cloud>2024-11-19 12:01:40 +0100
commit67003e8b0fb9e96edc9b13093feb6bb7a10853f1 (patch)
treeba1aae22cc165240cc1e07243b4437e5aa7ff2e3 /apps
parenta69e55fa502214673e661d3100fb2aee8fe6265d (diff)
downloadnextcloud-server-67003e8b0fb9e96edc9b13093feb6bb7a10853f1.tar.gz
nextcloud-server-67003e8b0fb9e96edc9b13093feb6bb7a10853f1.zip
fix(files): improve delete display name when trashbin is disabledbackport/49199/stable28
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/actions/deleteUtils.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/files/src/actions/deleteUtils.ts b/apps/files/src/actions/deleteUtils.ts
index b781be0ff16..ef395bae5b7 100644
--- a/apps/files/src/actions/deleteUtils.ts
+++ b/apps/files/src/actions/deleteUtils.ts
@@ -43,20 +43,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.
*/
@@ -79,6 +65,20 @@ 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 we're only selecting files, use proper wording
*/
if (isAllFiles(nodes)) {