Commit graph

11518 commits

Author SHA1 Message Date
llama
fab2b06987 Remove unfinished polygon when undoing and redoing in IO mode (#3759)
* make removeUnfinishedPolygon return whether a polygon was removed

* treat removing an unfinished polygon as a discrete undo step

* has to be handled when redoing as well, but not as a discrete step
2025-01-25 10:08:47 +03:00
llama
8eb5d6a070 Allow reopening the add cards window (#3756)
* allow reopening the add cards window

* deck needs to be changed after notetype
since changing notetype potentially changes deck
2025-01-25 09:54:10 +03:00
kelciour
b21a22957f Cleanup avplayer on profile close (#3754) 2025-01-25 09:44:15 +03:00
Damien Elmes
dec3b12306 Update translations 2025-01-24 22:42:07 +11:00
Damien Elmes
14cd760edc Ankiweb ID -> Email
https://forums.ankiweb.net/t/harmonization-email-and-ankiweb-id-strings/54817
2025-01-24 22:41:23 +11:00
Damien Elmes
28271cb693 Fix invalid reschedule revlog entries
https://forums.ankiweb.net/t/statistics-messed-up-after-fsrs-reschedule/54622

Caused by syncing the revlogs in a normal sync to a client that doesn't
understand them yet - they end up using the default for RevlogReviewKind
instead, which is 0.
2025-01-24 19:06:50 +11:00
Damien Elmes
9e0e0b066c Use only newer vite version
https://github.com/ankitects/anki/pull/3765
2025-01-24 18:36:38 +11:00
Damien Elmes
c3a15aff03 Ensure sveltekit gets built before congrats page
Fixes race condition in build
2025-01-24 18:32:19 +11:00
Damien Elmes
76d7726ca8 Add a separate route for card info in the sidebar
The move to Sveltekit broke the 'card info during review' add-on and
its descendants. This didn't get noticed in 24.11 due to the old
card-info.js file still being shipped.

I considered adding back the card-info.js generation, but it ended up
being simpler to move parts of the add-on into a separate page instead.
This is a stop-gap solution - in the future I'd like to get us to a
point where such component compositions can be done by add-ons,
and don't need to be done as part of Anki's build process.

Related: #3187
2025-01-24 18:08:11 +11:00
Damien Elmes
82663ffa92 Restore the missing external congrats page 2025-01-24 16:21:36 +11:00
Damien Elmes
20dca717de Log Anki version at startup
Useful for confirming running version when debugging startup problems
2025-01-24 14:33:34 +11:00
Damien Elmes
0e0ca1da2f Bump vite for latest CVE 2025-01-24 14:07:01 +11:00
Damien Elmes
02eb8caa7c Mention how about is not intended to mirror CONTRIBUTORS
https://github.com/ankitects/anki/pull/3750
https://github.com/ankitects/anki/pull/3575
2025-01-24 14:07:01 +11:00
Damien Elmes
2f2e8f7a70 Ensure pyoxidizer rebuilt on arch change
Fixes broken builds when switching between ARM and AMD on a Mac.
2025-01-24 12:50:00 +11:00
Damien Elmes
be766b5aa6 Add camera to entitlements
https://forums.ankiweb.net/t/are-there-any-plans-to-allow-the-use-of-the-webcam-in-anki-for-mac/53851
2025-01-24 12:47:20 +11:00
user1823
1ec1d3649d Increase font size in debug console (#3743) 2025-01-20 06:47:33 +03:00
Gregory
7e9b53f992 Update about.py (#3738)
add contributor
2025-01-18 17:19:09 +11:00
llama
21382a1170 Revert Editor.set_note's signature change with an alternative approach for #3730 (#3736)
* remove orig_note_id param

* add and use Note.orig_note_id instead

* add and use Editor.orig_note_id instead
2025-01-18 17:14:09 +11:00
Jarrett Ye
bf1c498d3a Update to FSRS-rs v2.0.2 (L2 regularization) (#3737) 2025-01-18 16:43:53 +11:00
Ross Brown
c20326d2f1 Fix True Retention table clipping on overflow (#3735) 2025-01-18 16:00:13 +11:00
llama
0dd4158968 Add support for copied image files when adding IO notes (#3733)
* unhardcode allowed_suffixes

* support pasting urls from clipboard when adding io notes
2025-01-18 15:59:36 +11:00
Jarrett Ye
4ae5714778 Feat/add future projection to forgetting curve with today marker (#3732)
* Feat/Add future projection to forgetting curve with today marker

* format

* remove the vertical line
2025-01-18 15:54:53 +11:00
Luca Auer
9e4563aef1 Prevent stale frames from being drawn / always ensure up-to-date contents in webview (#3668)
* Prevent stale frames being drawn.

At key points where external changes enter the webview, stale images might get rendered. This ensures that a frame showing current state is always shown.

* Only stage single redraw

* Remove potentially superfluous calls to `self.update()`

* Remove potentially superfluous calls to `self.update()`.

I lost this one during some git troubles.

* Revert unrelated change

The function is supposed to take a boolean telling it whether or not the loading succeeded, which it doesn't as is. However, this is unrelated and works either way so I also reverted it again.

* chore: code cleanup

* cleanup: Remove redundant check for presence of callback

A callback will be used either way for this call, so it can be simplified. The check happens inside the handler.

* Add comment explaining why this change is necessary, referencing the relevant PR.

* Clarify comment to answer the why, not the what.

One can see what is being done, why is probably more important.
2025-01-18 15:54:20 +11:00
Damien Elmes
a660f942fd Update translations 2025-01-17 16:03:17 +11:00
Damien Elmes
13be7db35c Bump version 2025-01-17 16:03:17 +11:00
Damien Elmes
f8604e949b Unify AMD and ARM Docker images
+ Initial groundwork for AMD64 builds on ARM/Rosetta. Not currently
viable due to bugs in either Linux or Rosetta which results in a
Sveltekit build hanging indefinitely.
2025-01-17 16:03:17 +11:00
llama
bace5b67df Fix "Create copy" for IO notes (#3730)
* expose get_image_occlusion_fields

* fix create copy for io

* revert current impl

* passthru original note id when creating copy

* add IOCloningMode

* fix create copy for io
2025-01-17 16:03:00 +11:00
Abdo
a74b904434 Fix issue in regex for underscored CSS imports (#3728)
* Use lazy quantifier in UNDERSCORED_CSS_IMPORTS regex

* Add test
2025-01-17 15:48:58 +11:00
user1823
5bb4a04f6c Don't treat manually scheduled cards with no reps as new cards (#3727)
Complements the change in https://github.com/ankitects/anki/pull/3639, ensuring that scheduler and rescheduling produce the same results.
2025-01-17 15:48:41 +11:00
Lukas Sommer
c60f04dd66 Comments for translators (#3729) 2025-01-17 06:11:07 +03:00
user1823
f95a5f281d Clear memory states during bulk action if item is None (#3717)
* Clear memory states during bulk action if item is None

Prevents issues like https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/10 and https://github.com/ankitects/anki/issues/3634

* Fix entries not being removed if ignore_before_date after the last grade

* Fix test failure

* Also clear memory states when rescheduling using FSRS helper add-on if item is None
2025-01-15 20:49:15 +11:00
Luc Mcgrady
e55e2378f3 "Copy template as markdown" button. (#3719)
* Added: Copy template info button

* Consistent with Ankidroid

* Fix: Missing newline

* Renamed variables

* ./check

* Fix: Remove ``` from templates

* Stylistic changes

* ./check
2025-01-15 20:29:35 +11:00
Damien Elmes
835bf9769b Increase allowed nesting level
Making it configurable would be complicated, so this just restores
the limit to close to the protobuf limit we were butting up against
for now.

Related: #3637
2025-01-13 16:03:27 +11:00
Damien Elmes
83241b0337 Remove stale comment 2025-01-13 15:56:33 +11:00
Abdo
d63563c9f0 Switch back to Prettier for Svelte formatting
Closes #3649
Closes #3713
2025-01-13 15:53:55 +11:00
Damien Elmes
a2671e3ee4 Remove run-lin/win
Since these are local to my setup, I'm better off using a shell
alias and not cluttering the repo.
2025-01-13 15:51:44 +11:00
Damien Elmes
a38c17e81e Minor tweaks to tools/ 2025-01-13 15:51:44 +11:00
llama
d4fed5b175 Use platform-native button layout in dialogs and messageboxes (#3725)
* set button-layout prop in stylesheet

* fix lint

* check for and use non-default layout on linux before falling back
2025-01-13 14:24:21 +11:00
Abdo
9375cb4b19 Fix flaky tests (#3724) 2025-01-13 13:56:52 +11:00
llama
9c4601280f Fix newer notes incorrectly being skipped when importing successive exports (#3693)
* add Note::set_modified_with_mtime

* add struct for Collection::update_note_inner_without_cards's args

* refactor Collection::update_note_inner_without_cards to use the arg struct

* add Collection::update_note_inner_without_cards_using_mtime

* use incoming note's mtime when updating notes during import
2025-01-13 13:42:44 +11:00
llama
2a90682488 fix csv columns breaking when not contiguous (#3690) 2025-01-13 13:42:31 +11:00
wackbyte
89833189a3 Reduce use of type casting (#3723) 2025-01-12 20:05:05 +11:00
wackbyte
e29d73f86b Unpin svelte and update sveltekit-svg (#3722)
Warnings from enums were fixed in https://github.com/sveltejs/svelte/pull/14192
2025-01-12 18:06:54 +11:00
Yuki
49abb2cfee Refactoring and comments (#3721) 2025-01-12 15:46:20 +11:00
Ross Brown
9d5b2805e2 Fix "Note Types" dialog moving down each time it is opened (#3718) 2025-01-12 15:33:37 +11:00
Damien Elmes
e60fc9cf24 glibc notes apply to AMD64 too 2025-01-12 15:07:12 +11:00
Damien Elmes
01d5e25080 Add camera usage description
https://forums.ankiweb.net/t/are-there-any-plans-to-allow-the-use-of-the-webcam-in-anki-for-mac/53851/10
2025-01-12 13:00:04 +11:00
Damien Elmes
268dc2e030 Remove unused proto import 2025-01-12 12:58:17 +11:00
Damien Elmes
fcf5bba831 Start installing PyQt6 into the Linux ARM64 venv by default
Now that an ARM wheel is on PyPI, we no longer need to rely on a
system PyQt to build on ARM. The install is skipped when PYTHONPATH
is set, so older distros with glibc <2.39 can continue to use the
system packages instead.
2025-01-10 22:26:30 +11:00
Damien Elmes
78a385b346 Improve error when n2/ninja missing 2025-01-10 22:26:30 +11:00