mirror of https://github.com/vector-im/riot-web
Merge branch 'travis/room-list/user-menu/EL_theme' into 'element'
Make the theme switcher switch between Element themes See merge request new-vector/element/element-web/matrix-react-sdk!2pull/21833/head
commit
23d96fbe25
|
@ -98,7 +98,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||||
if (theme.startsWith("custom-")) {
|
if (theme.startsWith("custom-")) {
|
||||||
return getCustomTheme(theme.substring("custom-".length)).is_dark;
|
return getCustomTheme(theme.substring("custom-".length)).is_dark;
|
||||||
}
|
}
|
||||||
return theme === "dark";
|
return theme === "dark" || theme === "element-dark";
|
||||||
}
|
}
|
||||||
|
|
||||||
private onProfileUpdate = async () => {
|
private onProfileUpdate = async () => {
|
||||||
|
@ -152,7 +152,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||||
// Disable system theme matching if the user hits this button
|
// Disable system theme matching if the user hits this button
|
||||||
SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
|
SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
|
||||||
|
|
||||||
const newTheme = this.state.isDarkTheme ? "light" : "dark";
|
const newTheme = this.state.isDarkTheme ? "element" : "element-dark";
|
||||||
SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme); // set at same level as Appearance tab
|
SettingsStore.setValue("theme", null, SettingLevel.DEVICE, newTheme); // set at same level as Appearance tab
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue