Commit graph

11543 commits

Author SHA1 Message Date
Damien Elmes
0653dae86c 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
9c0911891d
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
3acca96ed8
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
c35237c94d
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
d153ce9241
Comments for translators (#3729) 2025-01-17 06:11:07 +03:00
user1823
5ef2328ea4
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
146a0b2dcf
"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
39e293b27d 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
9a5c21739c Remove stale comment 2025-01-13 15:56:33 +11:00
Abdo
2c1a4895ba Switch back to Prettier for Svelte formatting
Closes #3649
Closes #3713
2025-01-13 15:53:55 +11:00
Damien Elmes
178a3faaf7 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
3b4ada175d Minor tweaks to tools/ 2025-01-13 15:51:44 +11:00
llama
38821372dd
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
e98a597b4d
Fix flaky tests (#3724) 2025-01-13 13:56:52 +11:00
llama
2a1448bc45
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
afd7fca4cb
fix csv columns breaking when not contiguous (#3690) 2025-01-13 13:42:31 +11:00
wackbyte
b6afddd181
Reduce use of type casting (#3723) 2025-01-12 20:05:05 +11:00
wackbyte
493320fb33
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
db30685b9a
Refactoring and comments (#3721) 2025-01-12 15:46:20 +11:00
Ross Brown
d0a4fbb7aa
Fix "Note Types" dialog moving down each time it is opened (#3718) 2025-01-12 15:33:37 +11:00
Damien Elmes
2a85c6a2c0 glibc notes apply to AMD64 too 2025-01-12 15:07:12 +11:00
Damien Elmes
a83df635f7 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
1b5b6850bf Remove unused proto import 2025-01-12 12:58:17 +11:00
Damien Elmes
6966da14c2 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
256822bbb1 Improve error when n2/ninja missing 2025-01-10 22:26:30 +11:00
Damien Elmes
3bdf61e2fd Improve error when git not installed 2025-01-10 22:26:30 +11:00
Omar Kohl
b189820218
Ensure data is stored in a volume in anki-sync-server Docker image (#3674)
Otherwise data would be lost by default when removing (or re-creating) a
container.

It would be possible to expose the default directory (e.g.
/home/anki/.syncserver) but it would be different for the two Dockerfiles and
less convenient for users of the Docker container to specify such a long path
when naming their volumes.

Setting the permissions is necessary since anki will be running with 'anki'
user permissions inside the container.
2025-01-10 21:42:55 +11:00
Yuki
9460911d90
Fix menubar in fullscreen (#3710)
* Fix/menubar in fullscreen

* CONTRIBUTORS file

* Fix/menubar in fullscreen

* CONTRIBUTORS file

* Fix and add Type hints
2025-01-10 20:18:32 +11:00
kelciour
53be365678
Fix mpv loadfile syntax change 2 (#3711)
* Revert "Fix mpv loadfile syntax change (#3105)"

This reverts commit 111f3bd138.

* Fix mpv loadfile syntax change 2
2025-01-10 19:16:08 +11:00
Damien Elmes
4c34a2d133 Fix Windows bundling
Missed in the Qt6.8 changes
2025-01-10 18:10:36 +11:00
Damien Elmes
1fb1cbbf85 Update translations 2025-01-09 23:40:00 +11:00
Damien Elmes
708a8a5830 More CVE dep updates 2025-01-09 23:38:51 +11:00
llama
ef94bf1cb0
Add support for html comments to template syntax (#3662)
* add support for comments to templates

* add tests

* add support for comments to CardLayout

* fix lints

* revert current impl

* extract parsing logic from legacy_text_token

* add support for comments to templates

* add tests

* refactor take_until_handlebar_start_or

* remove redundant rest

* Require full subclause match when locating next token (dae)

* Rework legacy template handling (dae)

The handlebar parser is now an instance method of a TemplateMode
enum, allowing us to avoid duplicate code for the legacy code path,
and the necessity to box up the iterator.

This does result in a change in behaviour: when the user has specified
the alternate syntax, the standard syntax will no longer be accepted.

* Remove stale comment (dae)
2025-01-09 23:35:48 +11:00
llama
b6d7bb190d
Fix IO editor always starting in "hide all, guess one" mode (#3709)
* update backend

* set hideAllGuessOne in mask editor instead
2025-01-09 23:14:02 +11:00
Jarrett Ye
c4ad27a2db
Feat/support new cards ignore review limit in simulator (#3707)
* Feat/support new cards ignore review limit in simulator

* ./ninja fix:minilints & ./ninja format

* use published crate

* make newCardsIgnoreReviewLimit reactive

* format

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-01-09 22:49:13 +11:00
llama
f0e67c4cd3
Fix image field not being saved if a mask is created too quickly (#3706)
* commit image field immediately in setupMaskEditor

* use saveFieldNow instead
2025-01-09 22:29:34 +11:00
David Elizalde
1bdd7f706f
Issue 2563 - remove mhchem (#3705)
* Issue 2563 - remove mhchem

* Update CONTRIBUTORS
2025-01-09 22:24:39 +11:00
Luc Mcgrady
59391e96fb
Added colour to simulator tooltip (#3692)
* Added colour to simulator tooltip

* ./check
2025-01-09 21:44:54 +11:00
llama
9499473caa
Fix EasyDays not applying defaults correctly in deck options (#3691)
* fix EasyDays not applying defaults correctly

* remove the svelte-ignore that's no longer needed
2025-01-09 21:32:16 +11:00
Luc Mcgrady
16514727ff
Simulator legend tooltip (#3676)
* Added: Tooltip to simulator legend

* Added: Memorised tooltip

* Add: Per day text

* Added: Group name to tooltip
2025-01-09 20:33:10 +11:00
Damien Elmes
5d150c74a4
Qt 6.8.1 (#3633)
* Qt 6.8.1

Bumps minimum glibc to 2.35, and minimum macOS to 12

* Drop generation of Qt5 packaged build

Closes #3615

* Include qt6 requirements in aqt wheel; drop extra deps

* Fix aqt wheels growing over time
2025-01-09 20:07:12 +11:00
Jarrett Ye
39bf29e1a6
Fix/last date of existing card should not be positive in simulation (#3667)
* Fix/last date of existing card should not be positive in simulation

* update fsrs-rs to v1.4.9

* ./ninja fix:minilints
2025-01-08 23:05:37 +11:00
Jake Probst
aaf8b4dddb
Easy days: revisited (#3661)
* new easy days algorithm

* take easy day percent totals in account when determining reduced scheduling

* Use variant method to avoid repeated mapping to a constant (dae)

It was probably not worth the time I took to change this ^_^;
2025-01-08 21:56:27 +11:00
Jarrett Ye
58bcab2484
Sort FSRSItems by RevlogId for training (#3660)
* Sort FSRSItems by RevlogId for training

* update fsrs-rs v1.5.0
2025-01-08 21:32:00 +11:00
Arthur Milchior
d7fc98d4d8
Deck options without bridge (#3571)
* NF: Modify CONTRIBUTORS

Just so that I stop getting the warning

* NF: Create `deckOptionsReady`

* NF: rename _close to require_close

The method will have to be used outside of this class, so can't be private

* NF: simplify slightly some code

* NF: remove bridge command from deck options

* Remove unused import

* Remove superfluous comment with a typo
2025-01-08 21:30:30 +11:00
llama
769f302ea8
Fix "discard changes" appearing on deck options (#3689)
* patch original config after a preset is selected for the first time

* update comment
2025-01-07 17:41:52 +03:00
llama
d01d83e2c6
convert floats to single-precision before comparing in isModified (#3686) 2025-01-07 17:13:43 +03:00
Luc Mcgrady
f057ee465d
Prevent simulate button spam (#3670) 2025-01-07 16:58:22 +03:00
Ben Nguyen
d89e6f3bdd
IO: Prevent text masks from flipping (#3672)
* Lock scaling flip when creating new text mask

* Lock scaling flip on existing text masks
2025-01-07 15:43:28 +03:00
llama
4ee6dacaa3
fix card info failing to load with qt5 (#3681) 2025-01-07 15:39:51 +03:00