Merge pull request #41715 from nextcloud/backport/41707/stable28

[stable28] fix(files): Use SVG as FilePicker buttons to bring back icons
This commit is contained in:
Andy Scherzinger 2023-11-24 18:00:43 +01:00 committed by GitHub
commit 9b752d977f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -35,9 +35,8 @@ import { translate as t } from '@nextcloud/l10n'
import axios from '@nextcloud/axios'
import Vue from 'vue'
import CopyIcon from 'vue-material-design-icons/FileMultiple.vue'
import CopyIconSvg from '@mdi/svg/svg/folder-multiple.svg?raw'
import FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw'
import MoveIcon from 'vue-material-design-icons/FolderMove.vue'
import { MoveCopyAction, canCopy, canMove, getQueue } from './moveOrCopyActionUtils'
import logger from '../logger'
@ -170,7 +169,7 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', node:
buttons.push({
label: target ? t('files', 'Copy to {target}', { target }) : t('files', 'Copy'),
type: 'primary',
icon: CopyIcon,
icon: CopyIconSvg,
async callback(destination: Node[]) {
try {
await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.COPY)
@ -186,12 +185,13 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', node:
buttons.push({
label: target ? t('files', 'Move to {target}', { target }) : t('files', 'Move'),
type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',
icon: MoveIcon,
icon: FolderMoveSvg,
async callback(destination: Node[]) {
try {
await handleCopyMoveNodeTo(node, destination[0], MoveCopyAction.MOVE)
resolve(true)
} catch (error) {
console.warn('got error', error)
reject(error)
}
},

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long