Damien Elmes
91ac32484a
pip/ -> python/
2021-10-18 19:50:40 +10:00
Damien Elmes
973eef5676
enable eslint on aqt/data/web/js
2021-10-18 19:39:45 +10:00
Damien Elmes
3d14a01a84
use ts_project for aqt/data/web/js
...
We're now ts_project only, and are less likely to run into issues
with future rules_nodejs updates.
2021-10-18 19:39:45 +10:00
RumovZ
ff9dd841ca
Use null for unset cardId
2021-10-18 09:11:00 +02:00
RumovZ
8fb055d72e
Default to includeRevlog = true
2021-10-18 09:04:49 +02:00
RumovZ
d0859fa665
Format
2021-10-18 09:01:25 +02:00
RumovZ
73dc7e90f8
Use language that mypy understands
2021-10-18 09:01:25 +02:00
RumovZ
424a50dcdc
Improve clarity in card info code a tiny little bit
2021-10-18 09:01:25 +02:00
RumovZ
c780203ad4
Keep Card Info Dialog open even if no card is set
2021-10-18 09:01:24 +02:00
RumovZ
847bf3fe12
Move update logic into CardInfo.svelte
2021-10-18 09:01:24 +02:00
RumovZ
7570a0757e
Make window titles more user-friendly
2021-10-18 09:01:23 +02:00
RumovZ
e328715e00
Add utility func for setting window icon
2021-10-18 09:01:23 +02:00
RumovZ
3b5f4413f8
Use updating card infos in browser and reviewer
2021-10-18 09:01:23 +02:00
RumovZ
5fae48b612
Add update handler for Card Info Dialog
2021-10-18 09:01:22 +02:00
RumovZ
cb0adbd355
Make Card Info Dialog non-modal
2021-10-18 09:01:22 +02:00
Damien Elmes
57ee53d41e
get PyQt working directly with ./run on macOS
...
It's no longer necessary to copy everything into bazel-copy, and you
can safely remove that folder.
2021-10-16 18:07:29 +10:00
Damien Elmes
405c5b87c0
avoid pulling qt5 in unless requested
2021-10-16 16:54:34 +10:00
Damien Elmes
8fc77ff294
build all the UI files in one go
...
On macOS, the overhead of importing PyQt for each file far exceeds
any gains we get from incremental recompilation.
2021-10-16 09:20:20 +10:00
Damien Elmes
3f51bd3cff
use string replacements to generate Qt5 forms
...
They are mostly compatible, and this means a Qt5 install is not required
as part of the build process.
2021-10-16 08:59:09 +10:00
Damien Elmes
484de62e72
download wheels using rules_python
2021-10-15 16:02:26 +10:00
Damien Elmes
11b2f74882
update rules_python
2021-10-15 15:07:31 +10:00
Damien Elmes
cabdd125b6
use separate header state for each Qt version
...
https://forums.ankiweb.net/t/new-toolkit-and-packaging-test-windows/14081/15
2021-10-15 13:15:38 +10:00
Damien Elmes
dac8e547a8
drop PyAudio support
...
I do not recall anyone reporting that it worked better than the Qt
implementation for them, and the lack of recent wheels on PyPI is a pain.
We can always add it back in the future if enough people come out of
the woodwork to report they were using it.
2021-10-15 13:15:16 +10:00
Damien Elmes
a7768ed05d
qt recording support for qt6
...
+ fix inefficient bytes concatenation
2021-10-15 12:57:19 +10:00
Damien Elmes
5587bebc16
hide the video driver selection in qt6
2021-10-15 12:57:19 +10:00
Damien Elmes
8dbf6f74f8
fix placeholder text color on win/lin
2021-10-15 12:57:19 +10:00
Damien Elmes
6b4b13f58e
fix incorrect web background color being picked up in qt6+win/lin
2021-10-15 12:57:19 +10:00
Damien Elmes
08dabf0a92
update wheel definitions to require Python 3.9; make PyQt optional
...
While we do require PyQt, it's not possible to declare that we require
either 5 or 6, and so we need to mark it as optional. Instead, we
provide optional dependencies, so the user can e.g. 'pip install aqt[qt6]'
2021-10-15 12:57:19 +10:00
Damien Elmes
3907fa12d2
add run-qt5 script to run with 5.x
2021-10-15 12:57:19 +10:00
Damien Elmes
631c345ef0
switch to new-style PyQt scoped enums and Qt6
...
The enum changes should work on PyQt 5.x, and are required in PyQt 6.x.
They are not supported by the PyQt5 typings however, so we need to run
our tests with PyQt6.
2021-10-15 12:57:19 +10:00
Damien Elmes
7dc33ad4fe
generate pyqt6 forms
2021-10-15 12:57:19 +10:00
Damien Elmes
fab95b190d
miscellaneous pyqt6 compat fixes
...
- add a few gates for qt5-specific behaviour
- prepare for some changes to the typings in qt6
- map pickled Qt5 ByteArrays to Qt6 when running Qt6
2021-10-15 12:57:19 +10:00
Damien Elmes
42dcf2e57d
move QtAudioInputRecorder into separate PyQt5-only file
...
New API required for PyQt6.
2021-10-15 10:47:53 +10:00
Damien Elmes
32cf761e7b
expose pyqt6 packages - not yet used
2021-10-15 10:47:53 +10:00
Damien Elmes
b711d63aff
avoid importing directly from PyQt5 where possible
2021-10-15 10:47:53 +10:00
Damien Elmes
440464c0a4
add ready-research to about screen
2021-10-14 21:02:44 +10:00
evandrocoan
061f854b82
Increased max visible items from clayout_top.ui ( #1425 )
...
10 is too small for big decks.
2021-10-14 19:36:04 +10:00
Damien Elmes
276d8cc5a5
pass sole arg to cardStats as a dictionary
...
Easier to extend in the future, or (de)serialize in a strongly-typed
language.
2021-10-14 19:28:51 +10:00
RumovZ
ea9fc3730e
Switch CardInfoDialog to ts page ( #1414 )
...
* Only collect card stats on the backend ...
... instead of rendering an HTML string using askama.
* Add ts page Card Info
* Update test for new `col.card_stats()`
* Remove obsolete CardStats code
* Use new ts page in `CardInfoDialog`
* Align start and end instead of left and right
Curiously, `text-align: start` does not work for `th` tags if assigned
via classes.
* Adopt ts refactorings after rebase
#1405 and #1409
* Clean up `ts/card-info/BUILD.bazel`
* Port card info logic from Rust to TS
* Move repeated field to the top
https://github.com/ankitects/anki/pull/1414#discussion_r725402730
* Convert pseudo classes to interfaces
* CardInfoPage -> CardInfo
* Make revlog in card info optional
* Add legacy support for old card stats
* Check for undefined instead of falsy
* Make Revlog separate component
* drop askama dependency (dae)
* Fix nightmode for legacy card stats
2021-10-14 19:22:47 +10:00
zhangsn
1301c3b653
add new hook: add_cards_did_change_deck ( #1420 )
...
* add new hook which will be executed after the user selects a new different deck when adding cards.
* Update qt/aqt/deckchooser.py
2021-10-12 17:55:21 +10:00
Damien Elmes
eacf9d4445
fix error in webview __del__ on shutdown
2021-10-12 17:07:07 +10:00
Damien Elmes
11264fdd10
remove unused locale_dir
2021-10-12 16:27:57 +10:00
Damien Elmes
63b658e276
provide root_path to flask
...
Flask tries to look up root_path using __file__, which may not be
available. It's used for static file hosting and templates, neither
of which we use.
2021-10-12 16:27:57 +10:00
Damien Elmes
280daee4d3
remove unused moduleDir
2021-10-12 16:27:57 +10:00
Damien Elmes
abecbadb71
change setHtml() to serve content via media server
...
- fixes https://forums.ankiweb.net/t/deck-list-is-blank/2241/2
- fixes the security warnings on Qt 6, by ensuring our pages and
resources are coming from the same origin
2021-10-12 16:27:03 +10:00
Damien Elmes
f0a049eb83
refactor mediasrv request processing
...
_redirectWebExports was doing more than it was originally intended for,
and it was difficult to follow.
2021-10-12 16:22:09 +10:00
Damien Elmes
98a161cec6
add qtmajor qualification to version checks; update outdated min ver
2021-10-12 16:20:33 +10:00
Damien Elmes
5028ddedbe
update a deprecated API call in clayout
2021-10-12 16:20:12 +10:00
Damien Elmes
b193a4dd4a
remove old unused build_ui.sh
2021-10-12 16:19:27 +10:00
Damien Elmes
94eb2178c0
stop migrating from old folder locations
...
Closes #1390
2021-10-12 16:18:31 +10:00