mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #45982 from nextcloud/artonge/update/disable_copy_button_on_readonly_folders
fix(files): Disable buttons in copy/move dialog for non writable folders
This commit is contained in:
commit
acb95d5c0f
5 changed files with 8 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ import type { MoveCopyResult } from './moveOrCopyActionUtils'
|
|||
import { isAxiosError } from '@nextcloud/axios'
|
||||
import { FilePickerClosed, getFilePickerBuilder, showError } from '@nextcloud/dialogs'
|
||||
import { emit } from '@nextcloud/event-bus'
|
||||
import { FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind, getUniqueName } from '@nextcloud/files'
|
||||
import { FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind, getUniqueName, Permission } from '@nextcloud/files'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { openConflictPicker, hasConflict } from '@nextcloud/upload'
|
||||
import { basename, join } from 'path'
|
||||
|
|
@ -200,6 +200,7 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes:
|
|||
label: target ? t('files', 'Copy to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Copy'),
|
||||
type: 'primary',
|
||||
icon: CopyIconSvg,
|
||||
disabled: selection.some((node) => (node.permissions & Permission.CREATE) === 0),
|
||||
async callback(destination: Node[]) {
|
||||
resolve({
|
||||
destination: destination[0] as Folder,
|
||||
|
|
|
|||
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
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue