]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): Use SVG as FilePicker icons instead of Vue components
authorFerdinand Thiessen <opensource@fthiessen.de>
Thu, 23 Nov 2023 20:22:45 +0000 (21:22 +0100)
committerAndy Scherzinger <info@andy-scherzinger.de>
Thu, 23 Nov 2023 23:49:31 +0000 (00:49 +0100)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files/src/actions/moveOrCopyAction.ts

index 07ffcfc052fc2c1c5b1bd5d87113775fece4eff1..17e9370e8d9c81abd618290215a7024b9f12e9c9 100644 (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)
                                                }
                                        },