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 => {
|
||||
for (const key of Object.keys(obj)) {
|
||||
to[key] = {};
|
||||
if (obj[key].isConfigType) {
|
||||
return add(obj[key], to[key]);
|
||||
if (obj[key].isConfigType || (typeof obj[key] === 'object' && typeof obj[key].value === 'undefined')) {
|
||||
add(obj[key], to[key]);
|
||||
continue;
|
||||
}
|
||||
to[key] = obj[key].value;
|
||||
}
|
||||
};
|
||||
add(this.states, ret);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{Name}}
|
||||
<ng-container *ngIf="changed">*</ng-container>
|
||||
<div class="switch-wrapper">
|
||||
<bSwitch
|
||||
class="switch"
|
||||
|
Loading…
Reference in New Issue
Block a user