Anki/pylib/anki
RumovZ 3672b0fe73
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
..
_backend Switch CardInfoDialog to ts page (#1414) 2021-10-14 19:22:47 +10:00
importing run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
scheduler run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
syncserver run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
__init__.py move proto files into separate py_library in same namespace 2021-07-11 14:51:25 +10:00
_legacy.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
backend_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
browser.py Fix invalid 'noteCards' browser column being used (#1422) 2021-10-12 17:04:20 +10:00
BUILD.bazel bump minimum Python to 3.9 2021-10-04 15:05:15 +10:00
buildinfo.py use importlib for buildinfo.txt 2021-10-12 16:27:57 +10:00
card_rendering_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
cards.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
cards_pb2.pyi split out cards and collection 2021-07-10 19:52:31 +10:00
collection.py Switch CardInfoDialog to ts page (#1414) 2021-10-14 19:22:47 +10:00
collection_pb2.pyi split out cards and collection 2021-07-10 19:52:31 +10:00
config.py configs.proto plural workaround no longer necessary 2021-07-11 19:35:18 +10:00
config_pb2.pyi configs.proto plural workaround no longer necessary 2021-07-11 19:35:18 +10:00
consts.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
db.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
dbproxy.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
deckconfig_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
decks.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
decks_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
errors.py simplify errors 2021-04-03 16:06:46 +10:00
exporting.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
find.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
generic_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
hooks.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
hooks_gen.py symlink generated .py/.pyi into tree to fix Python code completion 2020-12-16 11:36:42 +10:00
httpclient.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
i18n_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
lang.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
latex.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
links_pb2.pyi fix broken links_pb2.pyi link 2021-10-01 22:52:15 +10:00
media.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
media_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
models.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
notes.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
notes_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
notetypes_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
py.typed mark anki and aqt modules as having typing info 2020-01-13 13:03:37 +10:00
rsbackend.py fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
scheduler_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
search_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
sound.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
stats.py Switch CardInfoDialog to ts page (#1414) 2021-10-14 19:22:47 +10:00
stats_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
statsbg.py tweaking the folder names again 2020-01-03 07:48:38 +10:00
stdmodels.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
storage.py storage->collection 2020-05-20 17:58:28 +10:00
sync.py split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
sync_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
tags.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
tags_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
template.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
types.py add missing copyright headers to *.py 2021-04-13 18:45:35 +10:00
utils.py Stop using deprecated distro.linux_distribution() (#1421) 2021-10-12 17:00:47 +10:00
wheel_description.txt move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00