Skip to content

Commit

Permalink
fix(files): Use SVG as FilePicker icons instead of Vue components
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and AndyScherzinger committed Nov 24, 2023
1 parent a89e93d commit 74cab6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
Expand All @@ -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)
}
},
Expand Down

0 comments on commit 74cab6a

Please sign in to comment.