Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ const props = defineProps<{
watch(() => props.configuration, () => {
for (const key in props.configuration) {
if (!(key in modelValue.value)) {
modelValue.value[key] = props.configuration[key]?.type === ConfigurationType.Boolean
modelValue.value[key] = props.configuration[key]?.defaultValue ?? (props.configuration[key]?.type === ConfigurationType.Boolean
? false
: ''
)
}
}
}, { immediate: true })
Expand Down
8 changes: 8 additions & 0 deletions apps/files_external/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const ConfigurationType = Object.freeze({

export const ConfigurationFlag = Object.freeze({
None: 0,
/**
* Indicates that the configuration option is optional and can be left empty ("not required")
*/
Optional: 1,
UserProvided: 2,
Hidden: 4,
Expand Down Expand Up @@ -94,6 +97,11 @@ export interface IConfigurationOption {
* Optional tooltip for the configuration option
*/
tooltip?: string

/**
* Default value for the configuration option.
*/
defaultValue?: string | boolean
}

export interface IAuthMechanism {
Expand Down
Loading