mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #59365 from nextcloud/fix/default-values
fix(files_external): properly set default values for backend options
This commit is contained in:
commit
28724fe496
5 changed files with 13 additions and 4 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
2
dist/files_external-settings.mjs
vendored
2
dist/files_external-settings.mjs
vendored
File diff suppressed because one or more lines are too long
2
dist/files_external-settings.mjs.map
vendored
2
dist/files_external-settings.mjs.map
vendored
File diff suppressed because one or more lines are too long
2
dist/types-DFCYS_Od.chunk.mjs.map
vendored
2
dist/types-DFCYS_Od.chunk.mjs.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue