Commit graph

2923 commits

Author SHA1 Message Date
Damien Elmes
4c97b3f820 case insensitive contributor compare
https://github.com/ankitects/anki/pull/428
2020-01-24 17:27:43 +10:00
Damien Elmes
405c21eda8 support min/max add-on versions in download and ankiaddon manifest 2020-01-24 17:25:52 +10:00
Damien Elmes
6bbab6e9f9 move strip_av_refs() into anki.sound 2020-01-24 15:48:40 +10:00
Damien Elmes
8cfb4d47ab more changes to the template code
- _renderQA() has moved to template.py:render_card()
- dropped QAData in favour of a properly typed dict
- render_card() returns a TemplateRenderOutput struct instead of a dict
- card_did_render now takes that output as the first arg, and can
mutate it
- TemplateRenderContext now stores the original card, so it can return
a card even in the add screen case

The old mungeFields and mungeQA hook have been removed as part of this
change. mungeQA can be replaced with the card_did_render hook.
In the mungeFields case, please switch to using field_filter instead.
2020-01-24 13:44:13 +10:00
Damien Elmes
766155665b renderQA() wasn't used in the codebase 2020-01-24 11:09:38 +10:00
Damien Elmes
46c6a7f7e4 extract and flag AV tags as part of the render process
We can now show replay buttons for the audio contained in {{FrontSide}}
without having to play it again when the answer is shown.

The template code now always defers FrontSide rendering, as it wasn't
a big saving, and meant the logic had to be implemented twice.
2020-01-24 11:06:11 +10:00
Damien Elmes
e61759bf35 fix night mode tooltips 2020-01-24 07:55:14 +10:00
Damien Elmes
54d8a04e8e night mode scrollbars in webviews 2020-01-24 07:41:39 +10:00
Damien Elmes
2603b4037d fix link colour 2020-01-24 07:17:24 +10:00
Damien Elmes
70e96521d6 fix filtered deck colour 2020-01-24 07:17:20 +10:00
Damien Elmes
f80bcf15ca fix mpv failing to load 2020-01-24 07:06:59 +10:00
Damien Elmes
1dc673a068 fix white background in day mode 2020-01-23 18:36:42 +10:00
Damien Elmes
58cbca9a8c inject legacy funcs referencing aqt in GUI load 2020-01-23 18:20:19 +10:00
Damien Elmes
00a0c539a3 fix lint 2020-01-23 18:12:57 +10:00
Damien Elmes
a9749bbcb1 fix inconsistently sized buttons and add platform classes 2020-01-23 18:05:55 +10:00
Damien Elmes
5855c465c0 better dupe color 2020-01-23 18:01:29 +10:00
Damien Elmes
6c0e2ff57a update reqs test to reflect new behaviour 2020-01-23 17:32:17 +10:00
Damien Elmes
15286fe420 add back the readme badge 2020-01-23 17:27:07 +10:00
Damien Elmes
78a8229577 don't wait as long for player to stop 2020-01-23 17:27:07 +10:00
Damien Elmes
43cfcaca3d iconFromRef() compat 2020-01-23 17:27:07 +10:00
Damien Elmes
faaecdb2c7 look through negated conditionals instead of just ignoring them
https://anki.tenderapp.com/discussions/ankidesktop/38220-bug-in-2119-regarding-computation-of-req
2020-01-23 17:27:07 +10:00
Damien Elmes
6e984b3cc3 fix audio displaying console window on Windows 2020-01-23 17:27:07 +10:00
Damien Elmes
6c50b09ff0 fix white flash on webview load 2020-01-23 17:27:07 +10:00
Damien Elmes
35435a130e basic night mode support
Forces the Fusion theme when running night mode, so we don't need
to work around platform themes that don't respond to the defined
palette.

Feedback/suggestions on the chosen colours welcome - _vars.scss is the
file to change if you want to experiment with adjustments.
2020-01-23 17:27:07 +10:00
Damien Elmes
1fa162c6b5 move css files to scss 2020-01-23 17:27:07 +10:00
Damien Elmes
bc3d8bb7ec Merge pull request #425 from yhoiseth/msgfmt-command-not-found
Prevent "msgfmt: command not found" error
2020-01-23 17:23:21 +10:00
Damien Elmes
bafebe9d70 Merge pull request #426 from yhoiseth/remote-server-run-types
RemoteServer._run type hints
2020-01-23 17:22:58 +10:00
Yngve Høiseth
288f5e718c Add missing contributor 2020-01-22 23:34:14 +01:00
Yngve Høiseth
4f5537f358 Type hint RemoteServer._run 2020-01-22 23:33:37 +01:00
Yngve Høiseth
20aa8bb991 Add missing contributor 2020-01-22 23:10:27 +01:00
Yngve Høiseth
8966c17e76 Prevent "msgfmt: command not found" error 2020-01-22 22:53:06 +01:00
Damien Elmes
e3940b4e4f handle spaces in voices, add platform prefix 2020-01-22 17:50:08 +10:00
Damien Elmes
f987310a50 move ignore statements for python 3.7
sigh :-(

https://github.com/python/mypy/issues/3251#issuecomment-490298556
2020-01-22 16:54:18 +10:00
Damien Elmes
7fefe7ec43 fix pylib checks failing when aqt unavailable 2020-01-22 16:11:40 +10:00
Damien Elmes
214871c7a4 make pylint happy 2020-01-22 15:37:58 +10:00
Damien Elmes
712779886a add a hook for when playback begins 2020-01-22 14:41:32 +10:00
Damien Elmes
42c04817c7 make .command() behave the same way for mplayer and mpv 2020-01-22 14:11:25 +10:00
Damien Elmes
bfc0ac1c0f simplify taskman, and add .run_on_main() 2020-01-22 14:09:51 +10:00
Damien Elmes
cd4d4b8adb add pause and seek forward/back shortcuts to review screen 2020-01-22 12:50:33 +10:00
Damien Elmes
4f9c9e1770 add a webview_did_receive_js_message hook 2020-01-22 11:06:12 +10:00
Damien Elmes
5aae3e2e39 add optional result_callback arg to pycmd() definition 2020-01-22 10:28:45 +10:00
Damien Elmes
c1021bc046 include card ordinal in clayout 2020-01-22 10:28:10 +10:00
Damien Elmes
837ac57ab2 add option in prefs to hide replay audio buttons 2020-01-21 21:00:17 +10:00
Damien Elmes
2b9a74fe5c mypy fixes 2020-01-21 20:42:06 +10:00
Damien Elmes
52a41d9a8e formatting fixes 2020-01-21 20:39:25 +10:00
Damien Elmes
27b14aea3e add a helper for caching generated files 2020-01-21 20:35:23 +10:00
Damien Elmes
5b7699563f when matching voices, need to check language matches too 2020-01-21 20:35:00 +10:00
Damien Elmes
0df9837a66 fix mpv args
https://anki.tenderapp.com/discussions/ankidesktop/38186-mpvprocesserror-unable-to-start-process
2020-01-21 19:29:50 +10:00
Damien Elmes
e326236f7c compare only on rank, as voices may be subclassed 2020-01-21 18:33:14 +10:00
Damien Elmes
8ddb49eb76 add Windows TTS support 2020-01-21 17:34:47 +10:00