Commit graph

9531 commits

Author SHA1 Message Date
Damien Elmes
055b404165 Add legacy arg to ExportAnkiPackage
Currently not exposed on the frontend
2022-04-26 21:30:47 +10:00
Damien Elmes
ede9698aea Handle zstd-compressed apkg 2022-04-26 21:30:28 +10:00
RumovZ
766396809d Open transaction in insert_data()
Was slowing down exporting by several orders of magnitude.
2022-04-25 09:50:37 +02:00
RumovZ
98d87fd36a Expose new apkg and colpkg exporting 2022-04-25 08:32:38 +02:00
RumovZ
c237d4c969 Add QueryOpWithBackendProgress
Also support backend exporting progress.
2022-04-25 08:32:17 +02:00
RumovZ
4137b1e6e6 Fix exception printing for QueryOp as well 2022-04-25 08:31:15 +02:00
RumovZ
266362b917 Return number of notes imported from apkg 2022-04-25 08:29:01 +02:00
RumovZ
e4d36e71f3 Make apkg exporting on backend abortable 2022-04-25 08:28:26 +02:00
RumovZ
e6dbe5b7f8 Fix all_checksums() for media import
Entries of deleted files are nulled, not removed.
2022-04-25 08:24:11 +02:00
Damien Elmes
a989e50838 Update translations 2022-04-25 14:35:35 +10:00
Damien Elmes
f60de39015 Fix due graph showing wrong date for review cards with resched off
Since we are using the original due date instead of the current one,
the learning check needs to be based on the card type, not its current
queue.

https://forums.ankiweb.net/t/anki-2-1-51-release-candidate/18942/22
2022-04-25 14:14:08 +10:00
Henrik Giesel
b8eabfd622
Remove onInput call in input handler (#1819)
This was implemented by me to prevent seemingly empty fields,
which however still contain some HTML (e.g. <div></div>) and
thus will trigger in the templates.
However it only worked in very limited cases, maybe we could
solve this better by indicating whether a field has content somehow.
2022-04-25 13:56:05 +10:00
Henrik Giesel
2be1f4c56d
Instead of transforming to {\lt}, transform to &lt; (#1818)
* Instead of transforming to {\lt}, transform to &lt;

- In Mathjax editor
- This way you can also use Mathjax convenience shortcuts like <=> in
  chemistry mode: \ce{<=>}

* Remove unused translateEntitiesToMathjax() (dae)

https://github.com/ankitects/anki/pull/1818#discussion_r857238310
2022-04-25 13:42:54 +10:00
RumovZ
c316996a23 Conditionally enable new importing in GUI 2022-04-22 21:25:18 +02:00
RumovZ
8c1a4d0cdd Update progress when checking incoming media too 2022-04-22 21:22:56 +02:00
RumovZ
6eb8aa0987 Add note ids to log and strip HTML 2022-04-22 19:01:17 +02:00
RumovZ
50c8267c15 Add ClosedCollectionOp 2022-04-22 16:54:02 +02:00
RumovZ
2491b966b5 Fix wrong Interrupted Exception being checked 2022-04-22 16:48:59 +02:00
RumovZ
2acad4504e Add CollectionOpWithBackendProgress 2022-04-22 09:32:56 +02:00
RumovZ
4837e52fe9 Merge branch 'main' into apkg 2022-04-22 08:39:10 +02:00
Damien Elmes
ee70006ec4 Reset zoom on page transition
https://forums.ankiweb.net/t/2-1-50-zooming-in-while-reviewing-results-in-an-unusably-huge-deck-list/19283
2022-04-22 15:45:50 +10:00
RumovZ
aea7eb667e
Fix progress of chained operations (#1817)
* Fix progress of chained operations

Especially aborting colpkg import.

* Notify about missing progress dialog
2022-04-22 14:47:17 +10:00
Matthias Metelka
2b739d76b2
Align list items to start (#1816) 2022-04-22 14:18:11 +10:00
Matthias Metelka
770fabd51b
Remove unnecessary night mode rule for typeans (#1815)
which caused https://forums.ankiweb.net/t/shaddow-below-cloze-type-area-in-night-mode/19287/2
2022-04-22 14:17:43 +10:00
Damien Elmes
280c06425d Increase compression on zstd packages 2022-04-22 13:52:24 +10:00
RumovZ
592e7e240c Fix archived collection name on apkg import 2022-04-21 09:03:10 +02:00
Damien Elmes
e6d990a44e Fix cwd changing on export
No longer required after #1656
2022-04-21 16:50:05 +10:00
Abdo
6ea75df292
Fix pasting of local links to unsupported types that contain spaces (#1813)
This change causes local links to unsupported formats like PDF to be
handled by _processUrls() instead of _processText, converting them to
correct hyperlinks in case they contain spaces.
2022-04-21 14:10:53 +10:00
Damien Elmes
6f764aeda4 Fix custom browser font not being honored
https://forums.ankiweb.net/t/on-anki-2-1-50-browser-table-font-override-is-not-respected/19259
2022-04-21 13:28:22 +10:00
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