Michael Telatynski
b77c2df2be
Fix theme being overridden to light even after login is completed
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-21 14:40:42 +00:00
David Baker
a3ef0aa6e8
Honour the isLogin flag in theme.js
...
Horrendous hack to fix the fact that if 'match system theme' was
set, the isLogin flag in the controller would do nothing because
theme.js would have decided to use the system theme before even
asking what the theme setting was.
2020-02-01 12:09:41 +00:00
Travis Ralston
37ec7e6f7e
Ensure the settings page accurately represents theme choices
...
Fixes https://github.com/vector-im/riot-web/issues/11518
This also fixes a bug where the the theme logic can incorrectly get stuck in the light theme - the ThemeController was overriding *all* values, not just supposed themes. Null values aren't overridden so that the various theme logic bits don't assume the user has chosen the light theme explicitly.
2019-11-28 13:40:28 -07:00
Travis Ralston
d50d8877e0
Appease the linter
2019-11-26 09:56:04 -07:00
Travis Ralston
4cec7c41b1
Fix override behaviour of system vs defined themes
...
Fixes https://github.com/vector-im/riot-web/issues/11509
2019-11-26 09:52:35 -07:00
David Baker
fd5a5e13ee
Make addEventListener conditional
...
Safari doesn't support addEventListener
2019-11-22 12:59:51 +00:00
David Baker
04641a0f87
Merge pull request #3638 from matrix-org/dbkr/dedup_theming_code
...
Remove getBaseTheme
2019-11-21 09:44:37 +00:00
David Baker
e36f4375b0
Bugfix & clearer setting name
2019-11-20 16:12:14 +00:00
David Baker
b69cee0c67
Remove getBaseTheme
...
This was only used by vector/index.js, in the code removed by
https://github.com/vector-im/riot-web/pull/11445
React SDK does a very similar thing in setTheme but also gets the
rest of the custom theme name.
Requires https://github.com/vector-im/riot-web/pull/11445
2019-11-20 15:45:32 +00:00
David Baker
518130c912
add bug link
2019-11-20 15:37:48 +00:00
David Baker
a744415221
Add hack to work around mystery settings bug
2019-11-20 15:34:32 +00:00
David Baker
5a700b518a
Get theme automatically from system setting
...
Uses CSS `prefers-color-scheme` to get the user's preferred colour
scheme. Also bundles up some theme logic into its own class.
2019-11-20 13:41:06 +00:00
Travis Ralston
56ad164c69
Add a function to get the "base" theme for a theme
...
Useful for trying to load the right assets first.
See https://github.com/vector-im/riot-web/pull/11381
2019-11-13 14:01:07 -07:00
Bruno Windels
27ca73bf63
add copyright headers
2019-10-02 11:06:31 +02:00
Bruno Windels
fc6a68cd1d
add support for dark theme
2019-10-01 17:00:29 +02:00
Bruno Windels
558f8daeeb
support custom themes from setting
...
also move theme setting code from MatrixChat to own file.
2019-10-01 15:21:22 +02:00