diff --git a/src-ui/src/app/components/admin/config/config.component.ts b/src-ui/src/app/components/admin/config/config.component.ts index 0e3f432e2..db09d1500 100644 --- a/src-ui/src/app/components/admin/config/config.component.ts +++ b/src-ui/src/app/components/admin/config/config.component.ts @@ -69,6 +69,7 @@ export class ConfigComponent public configForm = new FormGroup({}) public errors = {} + public externallyConfiguredVariables = new Set() get optionCategories(): string[] { return Object.values(ConfigCategory) @@ -152,6 +153,9 @@ export class ConfigComponent } private initialize(config: PaperlessConfig) { + this.externallyConfiguredVariables = new Set( + config.externally_configured_variables ?? [] + ) if (!this.store) { this.store = new BehaviorSubject(config) @@ -227,6 +231,10 @@ export class ConfigComponent return this.configForm.get(key).value != null } + public isExternallyConfigured(configKey: string): boolean { + return this.externallyConfiguredVariables.has(configKey) + } + public resetOption(key: string) { this.configForm.get(key).setValue(null) } diff --git a/src-ui/src/app/data/paperless-config.ts b/src-ui/src/app/data/paperless-config.ts index 92af2cec5..690d7aa4e 100644 --- a/src-ui/src/app/data/paperless-config.ts +++ b/src-ui/src/app/data/paperless-config.ts @@ -422,6 +422,7 @@ export const PaperlessConfigOptions: ConfigOption[] = [ ] export interface PaperlessConfig extends ObjectWithId { + externally_configured_variables: string[] output_type: OutputTypeConfig pages: number language: string