Commit graph

281 commits

Author SHA1 Message Date
Elias
03928110ba
Merge 9a72ab514c into 3890e12c9e 2025-09-17 15:23:46 +08:00
Emil Hamrin
7e8a1076c1
Updated Dockerfile to use Ninja build system (#4321)
* Updated Dockerfile to support ninja build

* Install python using uv

* Bumped python version

* Add disclaimer (dae)
2025-09-17 14:02:09 +10:00
Elias
9a72ab514c
Add name to CONTRIBUTORS 2025-09-16 07:34:42 +02:00
maxr777
5280cb2f1c
Enable nc: to only search in a specific field (#4276) (#4312)
* Enable nc: to only search in a specific field

* Add FieldSearchMode enum to replace boolean fields

* Avoid magic numbers in enum

* Use standard naming so Prost can remove redundant text

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-09-04 11:52:08 +10:00
洩氏诹诹子
157da4c7a7
Fix mirror configuration not working during launcher download (#4280)
Use environment variable instead of configuration file
2025-09-02 14:58:34 +10:00
Lee Doughty
65ea013270
Update microphone icon to respect dark mode (#4297) 2025-09-01 17:56:48 +10:00
€šm̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰�Ř§Ů Â£╟©舐æØ¢£ðsÞ¥¿—
e3d0a30443
Fix ninja BuildAction name sanitization (#4291)
rust commit 8296ad0 changes the output of std::any::type_name to include
regions such as lifetime and generic arguments, which results in invalid
Ninja rule names being generated, such as `CargoBuild<_>`.
2025-09-01 15:08:29 +10:00
Lee Doughty
2fee6f959b
Replace deprecated $app/stores with $app/state in SvelteKit frontend (#4282)
* Migrate frontend from /stores to /state

* Update CONTRIBUTORS
2025-08-26 21:28:49 +03:00
Siyuan Yan
a3b3b0850d
Hi res microhpone icon for the recording dialog (#4262)
* Replace media-record.png with SVG icon

- Added SVG version of the microphone icon (from Font Awesome Free v7.0.0)
- Updated sound.py to use QIcon for proper SVG support
- Icon now displays at 60x60 pixels

* Remove obsolete media-record.png icon

The PNG icon has been replaced with an SVG version

* Update CONTRIBUTORS

* Replace icon with AnkiMobile's record icon

CC-BY requires attribution, and we don't currently have a way to describe
those attributions in a way the mobile clients can also include automatically.
For now, I've switched it to an icon I authored myself to avoid the issue.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-08-20 02:31:31 +10:00
Thomas Rixen
a77ffbf4a5
Statistics "Reviews" graph, make the color of "New" and "Learning" cards consistent with the color of card count (#4245)
* Statistics Reviews graph, make the color of New and Learning cards consistent with the color of card count

* removing bleu warning

* contributors
2025-08-06 18:07:10 +10:00
Bradley Szoke
58a8aa7353
fix: set cursor to pointer when on range (#4197)
* set cursor to pointer when on range

* chore: white space removal

* chore: update contributors file
2025-07-13 22:29:23 +03:00
jcznk
4604bc7567
Add margin to QPushButton to prevent clipping (#4201)
* Update CONTRIBUTORS

* Add margin to QPushButton to prevent clipping
2025-07-13 22:21:31 +03:00
Kevin Nakamura
f927aa5788
Statically link MSVC runtime, removing the need to install the redistributable (#4166)
* Statically link MSVC runtime, removing the need to install the redistributable.

* CONTRIBUTORS I've already contributed and added my email, but the last commit got mangled.
2025-07-05 15:03:14 +03:00
Kevin Nakamura
fc6447a938
Launcher: Run uv python install before running uv sync (#4162)
* Launcher: Run `uv python install` before running `uv sync`

* Less copy/paste.

* Minor readability improvements

* Make sure we check file presence before attempting to read

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-07-04 23:35:50 +07:00
David Allison
5f73725a64
Remove newline: 'Restore to default confirmation' (#4128) 2025-06-27 16:50:06 +07:00
Sunong2008
ccc9d9027a
Delay retention workload info display after FSRS optimization alerts (#4066)
* Update FsrsOptions.svelte

* Update CONTRIBUTORS

* Make it full width too, so it doesn't resize when transitioning past 90

* Make sure the Warning appears after the alert

* Update FsrsOptions.svelte

* Update FsrsOptions.svelte

* Update FsrsOptions.svelte
2025-06-11 13:01:47 +07:00
sorata
e5d34fbb18
Update default styles (#4060)
* add margin for hr

* add line height to default styles

* update my email

* change margin to 1em
2025-06-08 11:24:46 +07:00
Marvin Kopf
7a8b4a193f
offload mpv callback registration to background thread to avoid UI blocking (#4038)
Instantiating `MPV(MPVBase)` triggers multiple synchronous `command()` calls to the mpv process during callback registration. These calls block the main thread and degrade startup performance. This change defers registration via `taskman.run_in_background`.
2025-05-30 13:05:06 +07:00
Emmanuel Ferdman
8a61a5470c
Resolve Python regex library warnings (#4012)
* Resolve Python regex library warnings

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* Add CONTRIBUTORS

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-05-19 13:29:54 +10:00
spiritualfather
63fd1ffbff
upgrade esbuild versions (#4011)
* upgrade esbuild versions

* Update license file
2025-05-19 13:25:05 +10:00
Adnane Taghi
f96c8c2ac8 Make URL schemes dialog more ergonomic (#4002)
(originally merged into a PR branch)

* Make URL schemes dialog more ergonomic

* add name to contributors list

* Title Case

* Tweak build instructions so Cursor picks them up

* Use a warning icon for the URL scheme pop-up

* Default to cancelling
2025-05-15 16:17:33 +10:00
Kolby Moroz Liebl
6427ff3db5
Fix dockerimage, by bumping rust version (#3993) 2025-05-15 16:09:27 +10:00
llama
573f59fab1
Allow rotating IO masks (#3987)
* Revert "Disable rotation globally"

This reverts commit 22736238c1.

* alt. impl for hiding rotation marker when selecting/ungrouping

* (de)serialise angles

* rotate masks in reviewer

* update bounds checking

* floats.ts -> lib.ts

* add convenience fns

* store mask angles (deg) in steps of 10000

* update CONTRIBUTORS
2025-05-10 16:21:33 +10:00
Yaoliang Chen
1f95d030bb
feat(scheduler): add from_queue flag to CardAnswer (#3976)
Co-authored-by: Yaoliang <yaoliang.ch@gmail.com>
2025-05-03 12:21:48 +03:00
Matt Brubeck
ef37952ba0
Remove dead code in reviews_for_fsrs (#3958)
* Clarify logic in reviews_for_fsrs

Prior to this change, the second check of `first_of_last_learn_entries`
was dead code because the first check would always break out of the loop
before it could succeed.  Re-order the code for clarity and add a
comment to explain the logic.

* Update CONTRIBUTORS
2025-04-30 21:28:30 +10:00
JL710
62bad44eed
add toggle for browser sidebar (#3953)
* add toggle for browser sidebar

* Update CONTRIBUTORS
2025-04-27 18:22:56 +10:00
Jonathan Schoreels
863fe3cd50
Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend (#3945)
* Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend

* Allow None for SearchContext.properties

* Adding myself in CONTRIBUTORS

* Rename SearchContext.properties to SearchContext.addon_metadata

* Revert "Adding myself in CONTRIBUTORS"

This reverts commit a993577279.

* Reapply "Adding myself in CONTRIBUTORS"

This reverts commit f3ce51c83d.
2025-04-25 18:40:24 +10:00
(x⋅ln(7))⁻¹
369dec9319
Add an option to disable middle click to paste on Linux (#3904)
* Add checkbox

* Working in editor

* Toolbar webview

* Other webviews

* Even more webviews

* Move to profile settings

* Add to contributors [skip ci]

* Fix checks

* Fix checks

* Better?

* Remove unneded

* Remove checkbox and a few other things

* How the hell did that happen

* Undo FTL changes (dae)

* Remove superfluous config entry (dae)

* Add comment about profile keys (dae)
2025-04-15 19:51:00 +10:00
babofitos
066f5fd281
Fix: correct typo and adjust indentation in docstring (#3920)
* fix: correct typo and adjust indentation in docstring

Fixed a small typo in the webview_did_inject_style_into_page docstring and adjusted indentation for consistency.

* Update CONTRIBUTORS
2025-04-13 17:00:19 +10:00
RREEMMII
1fa99c97e4
Add a warning when there is a cloze in "back extra" and "text" is empty (#3912)
* Add a warning when there is a cloze in "back extra" and "text" is empty

Fix #3909

* Disallow non-blank first field card

* Fix Rust ninja check
2025-04-13 14:40:35 +10:00
ikkz
567cd9b9e3
style: add shadow to graph tooltip (#3891) 2025-03-29 05:08:59 +03:00
chel-ou
122980e06b
Add hooks for comparing answers (#3855)
* Add hooks associated to compare answer feature

* Update CONTRIBUTORS

* Add type pattern to compare answer related hooks
2025-03-15 12:12:01 +07:00
Val Enfys
d0ed54a768
Update my name in Anki's credits (#3852)
* Update my name in about.py

* Add name to CONTRIBUTORS
2025-03-14 17:00:48 +07:00
Evgeny Kulikov
339bf436d1
Prevent accidental dragging of audio playback buttons and hint links (#3844)
* Add myself to CONTRIBUTORS

* Set draggable="false" attribute on .replay-button

Because currently if a user drags slightly (even unintentionally) upon clicking a play button, play does not happen

* Prevent dragging hint links

Because if a user moves cursor a little after `mousedown`, action (expanding the hint) does not occur. Which might cause issues from accessibility standpoint
2025-03-14 16:47:03 +07:00
Thomas Graves
f5f22edb6a
Don't recalculate remaining steps, conditionally (#3849)
* Don't recalculate remaining steps, conditionally

Bug report reproduction steps:
Create a new profile so that everything is set to default.
Create a new card.
Click Good.
Open deck options and empty learning steps. Save.
No go back and put 1m 10m as LS.
Go back to the card and it should show 10m on the Good button.

Check if old_steps is empty and if it is just use remaining
steps for the new_remaining steps. Add test.

* Update contributers

* Format code

* Fix clippy error

* Use more idiomatic imports
2025-03-14 16:32:28 +07:00
Brayan Oliveira
94e90dbf85
Add title for some dialogs and avoid hardcoding the text of the discard changes dialog (#3846)
* feat: add title to rename dialog

* fix: localize hardcoded message

* feat: add title to create deck dialog

* refactor: formatting fixes

* add name to about screen

adding my name to contributors for the third time
2025-03-10 15:53:43 +07:00
Jakub Fidler
d8460d354a
fix: Task manager exception handling (#3839)
* Raise exception from closures in run_in_background using run_on_main

* Add author to CONTRIBUTORS file

* Undo taskman changes

* Raise exceptions from _on_closures_pending using singleShot
2025-03-10 14:17:50 +07:00
Brayan Oliveira
63c2a09ef6
feat: add title to some of the sync dialogs (#3838)
* refactor: accept window title in some dialog methods

* feat: match sync initial title with state

Sync iniates in the `Checked` state, so the initial title is changed to match it instead of using the generic `Anki` title

* feat: use `Sync` as the tile of login screen

Maybe a new string should be created for that.

* feat: Use `Sync` as title of the sync conflict dialog

Maybe a new string should be used for that

* refactor: fix formatting

* fix: alias in CONTRIBUTORS

Even in 2025, the script isn't smart enough to handle different casing or use just the GitHub ID
2025-03-03 15:03:28 +03:00
Lukas Sommer
96df6becfc
Comments for translators about sort order (#3831)
* Comments for translators about sort order

* Group combobox entries together. More comments.

* Touch CONTRIBUTORS
2025-02-26 10:32:06 +03:00
mumtazrifai
e373b0ed9b
Use default flag name when flag is renamed to empty string (#3826)
* Add function to restore the default name of a flag

* Call function to restore default flag name if flag renamed to empty string

* Update _load_flags to use the default_flag_names dict

* Add name to contributors file

* Add trailing comma to pass tests

* Update to follow python style guide

* Update about.py

* Revert "Update _load_flags to use the default_flag_names dict"

This reverts commit caa8fea94b.

* Use require_refresh() instead of storing default flag names
2025-02-21 16:38:04 +07:00
Danika-Dakika
6e7dcad542
Update Deck Options strings to clarify Timers (#3792)
* Update CONTRIBUTORS

added myself

* Update about.py

added myself

* Update scheduling.ftl

timers-related string changes

* Update deck-config.ftl

timers-related string changes

* Update help-page.ts

timers-related string changes
2025-02-06 15:17:30 +07:00
Mike Hardy
2ef46afb48
build: specify the canvas transitive node dependency build failure workaround in future-compatible way (#3752)
* fix: specify canvas npm optional dep ignore workaround more cleanly

this should allow it to work with yarn classic and yarn modern

* chore: add self to CONTRIBUTORS
2025-01-26 11:57:30 +11:00
GithubAnon0000
e32292585b
FIX lang selection resetting to en_US for some langs (#3744)
* FIX lang selection resetting to en_US for some langs

Fixes https://forums.ankiweb.net/t/anki-25-01-beta/54490/17?u=anon_0000.

# Issue
Set a hand full of certain languages in the preferences screen and see that the translations have been applied after reboot. The language selection in preferences wrongly shows en_US though, not the current active language. If you wanted to switch to `en_US` in this case, then you'd have to first switch to a working language (like de_DE) and then switch to en_US.

# Solution
`anki/qt/aqt/preferences.py` has the functions `setup_language()` and `current_lang_index()`. I noticed that it defaults to en_US, if the language is not in `compatMap` and it couldn’t return the index of the current language. No idea if this code is faulty but I headed over to `anki/pylib/anki/lang.py` afterwards.

Here, in `compatMap`, I added e.g. `"la": "la_LA"`. I knew the code since I could get it with `print("––– lang is ", lang)` in `preferences.py` (`current_lang_index()` retrieves `la` for latin).

After adding those code changes from my PR, the problem for those selected languages had gone away.

No idea if that's best practices though or if something else should be fixed instead.

* UPDATE CONTRIBUTORS adding myself to the list
2025-01-25 19:14:50 +11:00
Luca Auer
899cb89990
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
Lukas Sommer
d153ce9241
Comments for translators (#3729) 2025-01-17 06:11:07 +03: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
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
David Elizalde
1bdd7f706f
Issue 2563 - remove mhchem (#3705)
* Issue 2563 - remove mhchem

* Update CONTRIBUTORS
2025-01-09 22:24:39 +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
Niclas Heinz
936e10bd76
update docker deps and docker docs (#3671)
* docs(docker): Change suggested version numbre

* deps(docker): Bump rust to 1.83.0 and alpine to 3.21.0

* deps(docker): Bump rust to 1.83.0

* CONTRIBUTORS: Add my name
2025-01-04 17:58:54 +03:00