mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Merge branch 'revert-d13ade6f' into 'element'
Revert "Merge branch 'nadonomy/use-element-theme' into 'element'" See merge request new-vector/element/element-web/matrix-react-sdk!12
This commit is contained in:
commit
cad4029b1c
4 changed files with 8 additions and 8 deletions
|
@ -310,7 +310,7 @@ export const SETTINGS = {
|
|||
},
|
||||
"theme": {
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
default: "element",
|
||||
default: "light",
|
||||
controller: new ThemeController(),
|
||||
},
|
||||
"custom_themes": {
|
||||
|
|
|
@ -24,7 +24,7 @@ export default class ThemeController extends SettingController {
|
|||
getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) {
|
||||
if (!calculatedValue) return null; // Don't override null themes
|
||||
|
||||
if (ThemeController.isLogin) return 'element';
|
||||
if (ThemeController.isLogin) return 'light';
|
||||
|
||||
const themes = enumerateThemes();
|
||||
// Override in case some no longer supported theme is stored here
|
||||
|
|
|
@ -99,7 +99,7 @@ export default class ThemeWatcher {
|
|||
// controller that honours the same flag, although probablt better would be to
|
||||
// have the theme logic in one place rather than split between however many
|
||||
// different places.
|
||||
if (ThemeController.isLogin) return 'element';
|
||||
if (ThemeController.isLogin) return 'light';
|
||||
|
||||
// If the user has specifically enabled the system matching option (excluding default),
|
||||
// then use that over anything else. We pick the lowest possible level for the setting
|
||||
|
@ -108,8 +108,8 @@ export default class ThemeWatcher {
|
|||
SettingLevel.DEVICE, "use_system_theme", null, false, true);
|
||||
if (systemThemeExplicit) {
|
||||
console.log("returning explicit system theme");
|
||||
if (this.preferDark.matches) return 'element-dark';
|
||||
if (this.preferLight.matches) return 'element';
|
||||
if (this.preferDark.matches) return 'dark';
|
||||
if (this.preferLight.matches) return 'light';
|
||||
}
|
||||
|
||||
// If the user has specifically enabled the theme (without the system matching option being
|
||||
|
@ -125,8 +125,8 @@ export default class ThemeWatcher {
|
|||
// If the user hasn't really made a preference in either direction, assume the defaults of the
|
||||
// settings and use those.
|
||||
if (SettingsStore.getValue('use_system_theme')) {
|
||||
if (this.preferDark.matches) return 'element-dark';
|
||||
if (this.preferLight.matches) return 'element';
|
||||
if (this.preferDark.matches) return 'dark';
|
||||
if (this.preferLight.matches) return 'light';
|
||||
}
|
||||
console.log("returning theme value");
|
||||
return SettingsStore.getValue('theme');
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
|
||||
import {_t} from "./languageHandler";
|
||||
|
||||
export const DEFAULT_THEME = "element";
|
||||
export const DEFAULT_THEME = "light";
|
||||
import Tinter from "./Tinter";
|
||||
import SettingsStore from "./settings/SettingsStore";
|
||||
import ThemeWatcher from "./settings/watchers/ThemeWatcher";
|
||||
|
|
Loading…
Reference in a new issue