Add an override for the theme
So we can force the light theme on unthemeable pages like the login & complete security page. Fixes https://github.com/vector-im/riot-web/issues/12149 Fixes https://github.com/vector-im/riot-web/issues/12157
This commit is contained in:
parent
630507304a
commit
2d9b111680
2 changed files with 19 additions and 0 deletions
|
@ -53,6 +53,7 @@ import createRoom from "../../createRoom";
|
|||
import KeyRequestHandler from '../../KeyRequestHandler';
|
||||
import { _t, getCurrentLanguage } from '../../languageHandler';
|
||||
import SettingsStore, {SettingLevel} from "../../settings/SettingsStore";
|
||||
import ThemeController from "../../settings/controllers/ThemeController";
|
||||
import { startAnyRegistrationFlow } from "../../Registration.js";
|
||||
import { messageForSyncError } from '../../utils/ErrorUtils';
|
||||
import ResizeNotifier from "../../utils/ResizeNotifier";
|
||||
|
@ -506,6 +507,8 @@ export default createReactClass({
|
|||
view: VIEWS.LOGIN,
|
||||
});
|
||||
this.notifyNewScreen('login');
|
||||
ThemeController.setIsLogin(true);
|
||||
this._themeWatcher.recheck();
|
||||
break;
|
||||
case 'start_post_registration':
|
||||
this.setState({
|
||||
|
@ -760,6 +763,8 @@ export default createReactClass({
|
|||
}
|
||||
|
||||
this.setStateForNewView(newState);
|
||||
ThemeController.setIsLogin(true);
|
||||
this._themeWatcher.recheck();
|
||||
this.notifyNewScreen('register');
|
||||
},
|
||||
|
||||
|
@ -910,6 +915,8 @@ export default createReactClass({
|
|||
view: VIEWS.WELCOME,
|
||||
});
|
||||
this.notifyNewScreen('welcome');
|
||||
ThemeController.setIsLogin(true);
|
||||
this._themeWatcher.recheck();
|
||||
},
|
||||
|
||||
_viewHome: function() {
|
||||
|
@ -919,6 +926,8 @@ export default createReactClass({
|
|||
});
|
||||
this._setPage(PageTypes.HomePage);
|
||||
this.notifyNewScreen('home');
|
||||
ThemeController.setIsLogin(false);
|
||||
this._themeWatcher.recheck();
|
||||
},
|
||||
|
||||
_viewUser: function(userId, subAction) {
|
||||
|
@ -1231,6 +1240,8 @@ export default createReactClass({
|
|||
});
|
||||
this.subTitleStatus = '';
|
||||
this._setPageSubtitle();
|
||||
ThemeController.setIsLogin(true);
|
||||
this._themeWatcher.recheck();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue