Commit graph

11493 commits

Author SHA1 Message Date
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
Damien Elmes
c51a4ecc3d Improve error when git not installed 2025-01-10 22:26:30 +11:00
Omar Kohl
e206aae2f6 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
4de93e7cee 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
d1bf47b801 Fix mpv loadfile syntax change 2 (#3711)
* Revert "Fix mpv loadfile syntax change (#3105)"

This reverts commit a9c44967ea.

* Fix mpv loadfile syntax change 2
2025-01-10 19:16:08 +11:00
Damien Elmes
8607501395 Fix Windows bundling
Missed in the Qt6.8 changes
2025-01-10 18:10:36 +11:00
Damien Elmes
06df5d14e7 Update translations 2025-01-09 23:40:00 +11:00
Damien Elmes
1a1e5ddd40 More CVE dep updates 2025-01-09 23:38:51 +11:00
llama
90cf7e2d3b 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
11813c113c 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
c30f10e425 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
188938d8f3 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
4be26a7dc9 Issue 2563 - remove mhchem (#3705)
* Issue 2563 - remove mhchem

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

* ./check
2025-01-09 21:44:54 +11:00
llama
67202c6501 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
b0881c89ff 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
31247262ce 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
f0c57c046b 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
bda043baed 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
f0330b1144 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
20bc03bdf5 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
6e122a5ba9 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
15a561f9e5 convert floats to single-precision before comparing in isModified (#3686) 2025-01-07 17:13:43 +03:00
Luc Mcgrady
0eeb70a7d5 Prevent simulate button spam (#3670) 2025-01-07 16:58:22 +03:00
Ben Nguyen
fff60ae140 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
ec501e42da fix card info failing to load with qt5 (#3681) 2025-01-07 15:39:51 +03:00