Commit graph

9452 commits

Author SHA1 Message Date
RumovZ
bf5254e882 Merge remote-tracking branch 'upstream/HEAD' into apkg 2022-04-20 20:52:02 +02:00
RumovZ
63ad6624a6 Return note log when importing apkg 2022-04-20 20:48:22 +02:00
RumovZ
6b85b5900f Expose apkg export/import on backend 2022-04-20 16:01:34 +02:00
Damien Elmes
ef51bcefd6 Bump bazel version
Closes #1808
2022-04-20 21:53:59 +10:00
Damien Elmes
031fc625fd Update Mac build to Qt 6.3 2022-04-20 21:33:31 +10:00
Damien Elmes
30d55aa553 Only require ANKI_WAYLAND if frozen
Accidentally changed `and` to `or` while testing 7115caab13.
2022-04-20 19:41:41 +10:00
Damien Elmes
0b03919f45 Upgrade to Qt 6.3
Fixes #1753
Fixes #1770
2022-04-20 19:12:10 +10:00
Damien Elmes
ff9aed91de Update translations 2022-04-20 19:12:10 +10:00
Damien Elmes
da0cbfec32 Add workaround for unwanted CF_HTML header when pasting on Windows
Fixes #1751 for now; hopefully we can roll this change back once 6.3.1
is out in 3-4 weeks.
2022-04-20 17:23:11 +10:00
Damien Elmes
3031219a34 Add workaround to ensure internal pastes flagged on Windows/Qt6
Fixes #1793
2022-04-20 17:05:24 +10:00
Damien Elmes
dbcbff1fb1 Bump version 2022-04-20 16:40:49 +10:00
Damien Elmes
7115caab13 Default to X11 on Qt6 builds as well
Qt6 no longer appears to require QT_QPA_PLATFORM to be set.

https://forums.ankiweb.net/t/blury-interface-with-gnome-wayland-and-fractional-scaling/19196/4
2022-04-20 14:41:01 +10:00
Henrik Giesel
cf78a555c6
Add some component comment (#1779)
* Add a component comment for NoteEditor

* Move comments above component template

* EditorField -> EditingArea
2022-04-19 17:20:26 +10:00
Damien Elmes
adbe96ca00
Load page script after body created (#1802)
document.body must exist by the time the top level Svelte component
initializes.

https://forums.ankiweb.net/t/2-1-50-editor-wont-show-when-addons-load-many-js-files/19036
2022-04-19 17:16:56 +10:00
Damien Elmes
a7cb5e210e Close browser before full sync or colpkg import/export
Closes #1797
2022-04-19 17:10:34 +10:00
Damien Elmes
856d4763a9 Switch strong/em back to b/i
In the absence of strong arguments either way, and given the fact that
strong/em has broken a few (perhaps rare) use-cases, reverting seems
prudent. But happy to revisit this again in the future if someone has
a convincing argument for why we should be doing it differently.

Closes #1807
2022-04-19 16:28:44 +10:00
Henrik Giesel
6017214042
Fix resetting of formatting modes when pressing modifer or dead keys (#1811)
* Fix shift removing bold formatting

* Remove input handler on selection change

We listened to "non-input events" mostly to catch events that
change the selection (like Ctrl-a, or arrow keys) anyway
2022-04-19 16:08:32 +10:00
Luka Warren
0835129a00
Fix issue #1114 by scrolling the user to the top of the page (#1810)
* Scroll stats to top when exporting (#1114)

It's obviously a bit of a "hacky" solution, since it's slightly jarring for users to scroll down, click export, then find themselves all the way at the top again, but it's somewhat less confusing than wondering why your PDF is broken :-)

* Clarified comment in stats.py (#1114)

* Apply scrolling fix to new stats screen, not legacy stats (dae)

Also wait for JS callback before saving the PDF, as JS is executed
asynchronously.
2022-04-19 15:39:32 +10:00
RumovZ
16f8c980a6 Fix progress_fn type 2022-04-17 09:35:56 +02:00
RumovZ
e65b79ba63 Use fat pointer to avoid propogating generics 2022-04-16 22:14:01 +02:00
RumovZ
ed24fd13db Expand roundtrip apkg test 2022-04-16 19:19:44 +02:00
RumovZ
bb27eb3f08 Let import_apkg() take a progress func 2022-04-16 17:12:16 +02:00
RumovZ
a78d101c53 Test note importing 2022-04-16 12:31:42 +02:00
RumovZ
1e22432233 Fix deck importing edge cases
Test those edge cases, and add some global test helpers.
2022-04-15 19:07:52 +02:00
RumovZ
42f55fc30a Unconditionally import static media 2022-04-15 12:13:37 +02:00
RumovZ
7af0b08375 Fix parent deck gathering 2022-04-15 11:25:48 +02:00
Damien Elmes
72c7d64876 Fix compatibility with older macOS versions
https://forums.ankiweb.net/t/anki-2-1-50-qt5-wont-open/19091
2022-04-15 17:35:05 +10:00
RumovZ
f0cc027db6 Merge remote-tracking branch 'upstream/HEAD' into apkg 2022-04-15 08:57:07 +02:00
Damien Elmes
a9769813ba Add back support for custom mountpoint in card stats
The move to separate .html files broke our legacy card stats routine.

Related: d1d71ffdbb
2022-04-15 15:30:05 +10:00
Damien Elmes
24ab8ac423 Fix copying text to external apps when running on Gnome
Mutter seems to get confused if we mutate the keyboard in dataChanged().

Closes #1799
2022-04-15 12:09:56 +10:00
RumovZ
8ccadd96e6
Store last position when scheduling as review (#1800) 2022-04-14 18:53:58 +10:00
RumovZ
e29a5f779b
Fix selector index after programatic search (#1796) 2022-04-14 18:46:40 +10:00
RumovZ
4c79a1d969 Merge branch 'main' into apkg 2022-04-13 09:50:27 +02:00
Damien Elmes
29c48a60e0 Fix illegible calendar buttons in dark mode on Mac/Linux
https://forums.ankiweb.net/t/macos-apple-silicon-2-1-50-dark-mode-statistics-heatmap-buttons-dont-have-icons/18951

This button code is in need of a cleanup.
2022-04-13 13:53:45 +10:00
RumovZ
71e6292f8d Maybe upgrade scheduler of apkg 2022-04-11 09:10:08 +02:00
RumovZ
251bfc4920 Factor out media importing 2022-04-11 08:44:18 +02:00
RumovZ
fe878dcdc8 Factor out note importing 2022-04-11 08:28:10 +02:00
RumovZ
a7278836d4 Factor out card importing
Also handle missing parents .
2022-04-10 16:07:35 +02:00
RumovZ
a402879e72 Refactor card and revlog importing 2022-04-10 11:03:46 +02:00
RumovZ
8348240f80 Factor out card importing 2022-04-10 10:36:42 +02:00
RumovZ
e1899152be Fix importing cards/revlog
Card ids are manually uniquified.
2022-04-10 09:22:41 +02:00
Damien Elmes
51a0641bba Sort field change without field change should mark schema modified
Closes #1789
2022-04-10 08:52:55 +10:00
RumovZ
126a92c239 Handle card due dates and original due/did 2022-04-09 23:42:05 +02:00
RumovZ
a528106af0 Keep source ids of imported deck configs (or skip) 2022-04-09 15:52:23 +02:00
RumovZ
7798b78c7d Wrap apkg import in transaction 2022-04-09 15:35:16 +02:00
RumovZ
1ba5444d7d Make adding notetype with id undoable 2022-04-09 12:31:23 +02:00
RumovZ
2a15ba5404 Try to keep source ids of imported notes 2022-04-09 11:40:36 +02:00
RumovZ
5a76d2211a Keep source ids of imported revlog (or skip) 2022-04-09 10:17:28 +02:00
RumovZ
a0604a2e51 Keep source id of imported cards (or skip) 2022-04-09 09:49:36 +02:00
Damien Elmes
0b2a226dc8 Add mock stdout/stderr for console=False case on Windows
PyInstaller provided a NulWriter when running in GUI mode, but stdout/
stderr now default to None with PyOxidizer.

Fixes #1786
2022-04-09 16:48:32 +10:00