Skip to content

Commit 39a39a8

Browse files
authored
Merge pull request #1933 from nextcloud-libraries/fix/make-move-primary
fix(FilePicker): make move primary and copy secondary
2 parents 91391e0 + 60c932f commit 39a39a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/filepicker-builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ export class FilePickerBuilder<IsMultiSelect extends boolean> {
222222
callback: () => {},
223223
label: target ? t('Copy to {target}', { target }) : t('Copy'),
224224
icon: IconCopy,
225-
variant: 'primary',
225+
variant: type === FilePickerType.Copy ? 'primary' : 'secondary',
226226
})
227227
}
228-
if (type === FilePickerType.Move || type === FilePickerType.CopyMove) {
228+
if (type === FilePickerType.CopyMove || type === FilePickerType.Move) {
229229
buttons.push({
230230
callback: () => {},
231231
label: target ? t('Move to {target}', { target }) : t('Move'),
232232
icon: IconMove,
233-
variant: type === FilePickerType.Move ? 'primary' : 'secondary',
233+
variant: 'primary', // move is always primary - also on copy-move
234234
})
235235
}
236236
return buttons

0 commit comments

Comments
 (0)