Skip to content
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
17 changes: 12 additions & 5 deletions lib/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ export enum DialogSeverity {
*/
export interface IDialogButton {
/** Label of the button */
label: string,
label: string

/** Callback on button click */
callback: () => void,
callback: () => void

/**
* Disabled state of the button
* @default false
*/
disabled?: boolean

/**
* Optional Icon for the button
Expand All @@ -30,15 +36,16 @@ export interface IDialogButton {

/**
* Button type
* @deprecated - use `variant` instead
* @see https://nextcloud-vue-components.netlify.app/#/Components/NcButton
*/
type?: 'primary' | 'secondary' | 'error' | 'warning' | 'success'

/**
* Disabled state of the button
* @default false
* Button type
* @see https://nextcloud-vue-components.netlify.app/#/Components/NcButton
*/
disabled?: boolean
variant?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/filepicker-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ export class FilePickerBuilder<IsMultiSelect extends boolean> {
buttons.push({
callback: () => {},
label: target ? t('Copy to {target}', { target }) : t('Copy'),
type: 'primary',
icon: IconCopy,
variant: type === FilePickerType.Copy ? 'primary' : 'secondary',
})
}
if (type === FilePickerType.Move || type === FilePickerType.CopyMove) {
if (type === FilePickerType.CopyMove || type === FilePickerType.Move) {
buttons.push({
callback: () => {},
label: target ? t('Move to {target}', { target }) : t('Move'),
type: type === FilePickerType.Move ? 'primary' : 'secondary',
icon: IconMove,
variant: 'primary', // move is always primary - also on copy-move
})
}
return buttons
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dist"
],
"peerDependencies": {
"@nextcloud/vue": "^8.23.1",
"@nextcloud/vue": "^8.24.0",
"vue": "^2.7.16"
},
"dependencies": {
Expand Down