Commit Graph

11 Commits (46846fcfd0b7a4a3ec7001f820e9e5be1b8ef7e4)

Author SHA1 Message Date
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