forked from bpatrik/pigallery2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bpatrik#832 from bpatrik/feature/extension-settings
Feature/extension settings bpatrik#784
- Loading branch information
Showing
19 changed files
with
274 additions
and
143 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/common/config/private/MessagingConfig.ts → ...fig/private/subconfigs/MessagingConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/common/config/private/subconfigs/ServerExtensionsConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* eslint-disable @typescript-eslint/no-inferrable-types */ | ||
import {ConfigProperty, SubConfigClass} from 'typeconfig/common'; | ||
import {ClientExtensionsConfig, ConfigPriority, TAGS} from '../../public/ClientConfig'; | ||
import {GenericConfigType} from 'typeconfig/src/GenericConfigType'; | ||
|
||
@SubConfigClass<TAGS>({softReadonly: true}) | ||
export class ServerExtensionsEntryConfig { | ||
|
||
constructor(path: string = '') { | ||
this.path = path; | ||
} | ||
|
||
@ConfigProperty({ | ||
tags: { | ||
name: $localize`Enabled`, | ||
priority: ConfigPriority.advanced, | ||
}, | ||
}) | ||
enabled: boolean = true; | ||
|
||
@ConfigProperty({ | ||
readonly: true, | ||
tags: { | ||
name: $localize`Extension folder`, | ||
priority: ConfigPriority.underTheHood, | ||
}, | ||
description: $localize`Folder where the app stores all extensions. Individual extensions live in their own sub-folders.`, | ||
}) | ||
path: string = ''; | ||
|
||
@ConfigProperty({ | ||
type: GenericConfigType, | ||
tags: { | ||
name: $localize`Config`, | ||
priority: ConfigPriority.advanced | ||
} | ||
}) | ||
configs: GenericConfigType; | ||
} | ||
|
||
@SubConfigClass<TAGS>({softReadonly: true}) | ||
export class ServerExtensionsConfig extends ClientExtensionsConfig { | ||
|
||
@ConfigProperty({ | ||
tags: { | ||
name: $localize`Extension folder`, | ||
priority: ConfigPriority.underTheHood, | ||
dockerSensitive: true | ||
}, | ||
description: $localize`Folder where the app stores all extensions. Individual extensions live in their own sub-folders.`, | ||
}) | ||
folder: string = 'extensions'; | ||
|
||
|
||
@ConfigProperty({ | ||
arrayType: ServerExtensionsEntryConfig, | ||
tags: { | ||
name: $localize`Installed extensions`, | ||
priority: ConfigPriority.advanced | ||
} | ||
}) | ||
extensions: ServerExtensionsEntryConfig[] = []; | ||
|
||
|
||
@ConfigProperty({ | ||
tags: { | ||
name: $localize`Clean up unused tables`, | ||
priority: ConfigPriority.underTheHood, | ||
}, | ||
description: $localize`Automatically removes all tables from the DB that are not used anymore.`, | ||
}) | ||
cleanUpUnusedTables: boolean = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.