forked from mystiq/hydrogen-web
Extract variable
This commit is contained in:
parent
efb1a67470
commit
9e79b632a8
1 changed files with 8 additions and 2 deletions
|
@ -158,12 +158,18 @@ export class SettingsView extends TemplateView {
|
|||
}
|
||||
optionTags.push( t.option({ value: details.id ?? "", selected: isSelected} , name));
|
||||
}
|
||||
const select = t.select({ onChange: (e) => vm.changeThemeOption(e.target.value) }, optionTags);
|
||||
const select = t.select({
|
||||
onChange: (e) => {
|
||||
const themeId = e.target.value;
|
||||
vm.changeThemeOption(themeId)
|
||||
}
|
||||
}, optionTags);
|
||||
const radioButtons = t.form({
|
||||
className: { hidden: () => select.options[select.selectedIndex].value !== "" },
|
||||
onChange: (e) => {
|
||||
const selectedThemeName = select.options[select.selectedIndex].text;
|
||||
const themeId = vm.themeMapping[selectedThemeName][e.target.value].id;
|
||||
const colorScheme = e.target.value;
|
||||
const themeId = vm.themeMapping[selectedThemeName][colorScheme].id;
|
||||
vm.changeThemeOption(themeId);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue