Skip to content

Commit

Permalink
Merge pull request #49369 from nextcloud/backport/49199/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Nov 19, 2024
2 parents 0eb1a83 + b93bab4 commit 6c322e0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions apps/files/src/actions/deleteUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

0 comments on commit 6c322e0

Please sign in to comment.