Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(files): Use SVG as FilePicker buttons to bring back icons #41715

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Loading