mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-12 04:23:09 +02:00
fixing settings saving bug
This commit is contained in:
parent
854bedc968
commit
5908bed64f
6
package-lock.json
generated
6
package-lock.json
generated
@ -18721,9 +18721,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typeconfig": {
|
"typeconfig": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/typeconfig/-/typeconfig-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/typeconfig/-/typeconfig-2.0.7.tgz",
|
||||||
"integrity": "sha512-OnXPXSDaK1mzH6dJ1HB9Q70ruJYngEhemwL9Y8+nG5E40Je4MMODuEY+tfjMtIiFIN772DU5Q+NebulLZNDjpw==",
|
"integrity": "sha512-aShKfhwvPQFnMwBBFWsJhl1QQmDsdkx/vs7aKgxbGnLMW7W2djucEPGlUsmK3isMrTJAErmsr5CElacO/YFA6A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"optimist": "0.6.1"
|
"optimist": "0.6.1"
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
"sqlite3": "4.1.1",
|
"sqlite3": "4.1.1",
|
||||||
"ts-exif-parser": "0.1.4",
|
"ts-exif-parser": "0.1.4",
|
||||||
"ts-node-iptc": "1.0.11",
|
"ts-node-iptc": "1.0.11",
|
||||||
"typeconfig": "2.0.6",
|
"typeconfig": "2.0.7",
|
||||||
"typeorm": "0.2.21",
|
"typeorm": "0.2.21",
|
||||||
"winston": "2.4.4"
|
"winston": "2.4.4"
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@ import {ConfigProperty, IConfigClass} from 'typeconfig/common';
|
|||||||
saveIfNotExist: true,
|
saveIfNotExist: true,
|
||||||
attachDescription: true,
|
attachDescription: true,
|
||||||
enumsAsString: true,
|
enumsAsString: true,
|
||||||
|
softReadonly: true,
|
||||||
cli: {
|
cli: {
|
||||||
enable: {
|
enable: {
|
||||||
configPath: true,
|
configPath: true,
|
||||||
|
@ -6,7 +6,7 @@ import {WebConfigClass} from 'typeconfig/web';
|
|||||||
import {ConfigProperty, ConfigState} from 'typeconfig/common';
|
import {ConfigProperty, ConfigState} from 'typeconfig/common';
|
||||||
|
|
||||||
|
|
||||||
@WebConfigClass()
|
@WebConfigClass({softReadonly: true})
|
||||||
export class WebConfig {
|
export class WebConfig {
|
||||||
@ConfigState()
|
@ConfigState()
|
||||||
State: any;
|
State: any;
|
||||||
|
@ -99,7 +99,7 @@ export class SettingsEntryComponent implements ControlValueAccessor, Validator,
|
|||||||
(this.state.arrayType === 'string' || this.isNumberArray)) {
|
(this.state.arrayType === 'string' || this.isNumberArray)) {
|
||||||
value = value.replace(new RegExp(',', 'g'), ';');
|
value = value.replace(new RegExp(',', 'g'), ';');
|
||||||
value = value.replace(new RegExp(' ', 'g'), ';');
|
value = value.replace(new RegExp(' ', 'g'), ';');
|
||||||
this.state.value = value.split(';');
|
this.state.value = value.split(';').filter((v: string) => v !== '');
|
||||||
if (this.isNumberArray) {
|
if (this.isNumberArray) {
|
||||||
this.state.value = this.state.value.map((v: string) => parseFloat(v)).filter((v: number) => !isNaN(v));
|
this.state.value = this.state.value.map((v: string) => parseFloat(v)).filter((v: number) => !isNaN(v));
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,7 @@
|
|||||||
name="Exclude Folder List"
|
name="Exclude Folder List"
|
||||||
i18n-name
|
i18n-name
|
||||||
placeholder="/media/images/family/private;private;family/private"
|
placeholder="/media/images/family/private;private;family/private"
|
||||||
[ngModel]="states.excludeFolderList"
|
[ngModel]="states.excludeFolderList">
|
||||||
required="true">
|
|
||||||
<small class="form-text text-muted">
|
<small class="form-text text-muted">
|
||||||
<ng-container i18n>Folders to exclude from indexing</ng-container>
|
<ng-container i18n>Folders to exclude from indexing</ng-container>
|
||||||
<br/>
|
<br/>
|
||||||
@ -54,8 +53,7 @@
|
|||||||
name="Exclude File List"
|
name="Exclude File List"
|
||||||
i18n-name
|
i18n-name
|
||||||
placeholder=".ignore;.pg2ignore"
|
placeholder=".ignore;.pg2ignore"
|
||||||
[ngModel]="states.excludeFileList"
|
[ngModel]="states.excludeFileList">
|
||||||
required="true">
|
|
||||||
<small class="form-text text-muted">
|
<small class="form-text text-muted">
|
||||||
<ng-container i18n>Files that mark a folder to be excluded from indexing</ng-container>
|
<ng-container i18n>Files that mark a folder to be excluded from indexing</ng-container>
|
||||||
<br/>
|
<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user