Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Dolgov 9f70bb010a fix blank screen on load if custom theme is enabled 2019-12-15 13:35:09 +03:00
Andrew Dolgov 07f4878d59 workaround for a race condition between dojo.parse() and tt-rss loading proper day/night css on startup because of firefox async CSS loader 2019-12-15 11:57:26 +03:00
JustAMacUser b4dd03ba2a Wrap AppBase.setupNightModeDetection() in try/catch because Safari doesn't support matchMedia change events. 2019-12-13 13:39:52 -05:00
Andrew Dolgov 0237dee980 implement automatic night mode detection using MQL
add separate light.css to force light theme
remove manual night mode toggle and related code
2019-12-12 20:09:43 +03:00
Michael Kuhn e74f7bde22 Refactor hotkeys to use keypress instead of keydown
keydown returns the "raw" key in event.which. Depending on the keyboard
layout, this may not be what is wanted. For example, on a German
keyboard, Shift+7 has to be pressed to get a slash. However, event.which
will be 55, which corresponds to "7". In the keypress event, however,
event.which will be 47, which corresponds to "/".

Sadly, several important keys (such as escape and the arrow keys) do not
trigger a keypress event. Therefore, they have to be handled using a
keydown event.

This change refactors the hotkey support to make use of keypress events
whenever possible. This will make hotkeys work regardless of the user's
keyboard layout. Escape and arrow keys are still handled via keydown
events.

There should be only one change in behavior: I could not make Ctrl+/
work and therefore rebound the help dialog to "?".
2019-03-11 12:01:27 +01:00
Andrew Dolgov 957c44d177 rework git update checking to be initiated by frontend, outside of runtime info output 2018-12-16 19:05:37 +03:00
Andrew Dolgov 54ce930b8d delay counters request on promise completion a bit 2018-12-16 12:41:27 +03:00
Andrew Dolgov d3885c5883 App.toggleNightMode: add some fadein/fadeout 2018-12-13 10:20:05 +03:00
Andrew Dolgov d53cdaf815 requestCounters: remove cooldown 2018-12-12 20:06:44 +03:00
Andrew Dolgov 7a98105960 remove old fatalError(), move everything to App.Error
update exception dialog css
2018-12-11 13:18:38 +03:00
Andrew Dolgov 071ca5aa96 Error.report: use JS template strings 2018-12-11 12:45:05 +03:00
Andrew Dolgov 7e5c999146 show alert if recent_log_events > 0 2018-12-10 10:53:11 +03:00
Andrew Dolgov 1c8593c1fa add hotkey (a N) to toggle night.css 2018-12-09 21:17:50 +03:00
Andrew Dolgov a1c595687e fix previous to not crash in prefs 2018-12-09 16:09:51 +03:00
Andrew Dolgov 5e007e0090 headlines-spacer: only set 100% height if auto catchup is enabled 2018-12-09 16:02:20 +03:00
Andrew Dolgov 0b8cbc9156 remove some bitmaps and rework stuff using it to use iconfont instead 2018-12-06 15:22:52 +03:00
Andrew Dolgov 0ea0b606be rework net-alert to use iconfont, move it to toolbar start 2018-12-06 12:30:11 +03:00
Andrew Dolgov 71fc6d45bd refactor error reporting to AppBase; keep exception_error() for now as a shim 2018-12-03 13:38:13 +03:00
wn_ b83ed6c7c4 Fix reference to `PluginHost`.
A `const` doesn't create a property on `window`.
2018-12-02 15:06:28 -06:00
Andrew Dolgov 5ead558e43 move Utils to AppBase where it belongs 2018-12-02 22:08:18 +03:00
Andrew Dolgov ac8361e6f6 add AppBase as a shared ancestor for main and prefs app objects
remove event.observe stuff from startup, unneeded
2018-12-02 21:52:50 +03:00