{
constructor(props: Props) {
super(props);
this.state = {
debugChecked: isDebugEnabled(),
selectedTheme:
window.localStorage.getItem('theme') ?? defaultTheme.cssClass,
};
}
onDebugChange = (event: Event) => {
const checked = (event.target as HTMLInputElement).checked;
window.localStorage.setItem('debug', checked.toString());
};
onThemeChange = (event: Event) => {
const theme = getThemeByCssClass((event.target as HTMLSelectElement).value);
setTheme(theme);
this.setState({selectedTheme: theme.cssClass});
};
render() {
document.title = 'Settings';
const {selectedTheme} = this.state;
const themeOptions = themes.map(
(theme) => html``,
);
return html`
<${SharedFooter} page="settings" />
`;
}
}