mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
fixing video settings saving
This commit is contained in:
parent
fcc2e3c537
commit
854bedc968
@ -198,13 +198,15 @@ export abstract class SettingsComponent<T extends { [key: string]: any }, S exte
|
|||||||
const add = (obj: any, to: any): void => {
|
const add = (obj: any, to: any): void => {
|
||||||
for (const key of Object.keys(obj)) {
|
for (const key of Object.keys(obj)) {
|
||||||
to[key] = {};
|
to[key] = {};
|
||||||
if (obj[key].isConfigType) {
|
if (obj[key].isConfigType || (typeof obj[key] === 'object' && typeof obj[key].value === 'undefined')) {
|
||||||
return add(obj[key], to[key]);
|
add(obj[key], to[key]);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
to[key] = obj[key].value;
|
to[key] = obj[key].value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
add(this.states, ret);
|
add(this.states, ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
{{Name}}
|
{{Name}}
|
||||||
<ng-container *ngIf="changed">*</ng-container>
|
|
||||||
<div class="switch-wrapper">
|
<div class="switch-wrapper">
|
||||||
<bSwitch
|
<bSwitch
|
||||||
class="switch"
|
class="switch"
|
||||||
|
Loading…
Reference in New Issue
Block a user