Commit graph

11018 commits

Author SHA1 Message Date
Abdo
52a6fe9458 Fix IO text size in review screen (#2986)
* Store relative font size

* Handle multi-line text

Thanks to @glutanimate
2024-04-17 20:45:40 +10:00
Damien Elmes
7255663585 Ensure runner gets rebuilt in Mac CI 2024-04-17 20:23:50 +10:00
Jarrett Ye
816c3e11ce Return current weights if fsrs items is zero & handle error in evaluation and optimal retention (#3141)
* return current weights if fsrs_items is zero

* handle error of evaluation if items.is_empty()

* TODO: handle error of optimal retention

* Revert "TODO: handle error of optimal retention"

This reverts commit 80a5b3803e.

* Revert "handle error of evaluation if items.is_empty()"

This reverts commit 7f0a5570e7.
2024-04-17 20:18:00 +10:00
Damien Elmes
bb61376f67 alertOnError should default to true
Regressed in svelte-kit port
2024-04-17 20:13:37 +10:00
Damien Elmes
d27771d4f2 Update translations 2024-04-13 15:02:54 +07:00
Damien Elmes
13f3574ca2 Bump version 2024-04-13 15:02:46 +07:00
Loudwig
bf809d5e1f Feature Show Reminder before answer (#3064) (#3119)
* Feature Question Action Show Reminder (#3064)

Added a option in the deck config that allow the user to choose in
Autoupdate mode between showing a reminder or revealing the card.
Also added my name to the contributors

* Update ftl/core/deck-config.ftl
2024-04-13 08:39:50 +01:00
Abdo
bdb973fc12 Improve typing of custom fabric.Object properties (#3134)
* Ensure increasing ordinals of new masks

* Add fabric.d.ts

* Revert "Ensure increasing ordinals of new masks"

This reverts commit dedfeec9ad.
2024-04-13 08:36:08 +01:00
Wu Yi-Wei
1260f30268 Add Margins on the Buttons on the About Page (#3137)
* Add Margins on the Buttons on the About Page

* Fix contributors

* Fix format
2024-04-12 05:21:26 +01:00
Damien Elmes
ce6864beb5 Update idna for security issue 2024-04-12 11:17:29 +07:00
user1823
0909c8439f Optimum → Minimum retention (#3133)
This was missed in https://github.com/ankitects/anki/pull/3129.
2024-04-11 14:49:45 +01:00
dependabot[bot]
bda7a7d661 Bump vite from 5.0.12 to 5.0.13 (#3132)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.0.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 08:54:10 +01:00
Damien Elmes
16ce169a00 Update translations 2024-04-11 14:09:34 +07:00
Damien Elmes
9826651afd Fix casing of 'historical retention' 2024-04-11 14:09:16 +07:00
Mani
e79db99a76 fix select all and change ordinal in edit mode in io (#3109)
* fix select all and change ordinal in edit mode in io

* make ordinal undefined for all shapes in group/ungroup

* fix group shapes and some ui fixes

* Don't add node_modules/* to dprint deps

* use minimum ordinal when shape merged, use max ordinal++ when ungrouped, in add mode no ordinal preset so NaN

* use state for ungroup shape

* maintain existing ordinal in editing mode

* fix order of ordinal in ungroup shape

* refactor: remove for loop, use forEach
2024-04-11 08:08:07 +01:00
Antoine Q
8837f4b13f Update deck-config.ftl to clarify what optimal retention means (#3129)
* Update deck-config.ftl to clarify what optimal retention means

Renaming “Optimal retention” to “Minimum recommended retention"

* Update deck-config.ftl 

Removing "Predicted" in deck-config-predicted-optimal-retention

* Update deck-config.ftl

Updating keys

* Update ftl/core/deck-config.ftl

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-04-10 10:29:30 +01:00
Abdo
bc3d627aa4 Fix IO text masks being grouped (#3128) 2024-04-10 08:36:00 +01:00
Abdo
d43be8ffa8 Fix IO mask position slightly off in edit mode (#3121) 2024-04-08 16:40:22 +01:00
Escape0707
a87848b508 Ignore exception raised by pip_system_certs not found (#3114)
This dependency usually doesn't benefit Linux distros with requests library configured to use system certificate already. And is not packaged by most distros. Making it optional will make most Linux users' installation much easier.
2024-04-05 13:12:06 +01:00
Jarrett Ye
82efc59fbf Update to FSRS-rs v0.6.1 (#3106)
* update to FSRS-rs 0.6.0

* update to crates.io version

* format

* update to FSRS-rs v0.6.01

* ./ninja fix:minilints

* update python backend code
2024-04-05 13:04:50 +01:00
Damien Elmes
e69cf3261c Fix latest RUSTSEC warning 2024-04-05 18:35:28 +07:00
Damien Elmes
56824a9428 Another attempt at fixing rounding issue with optimal retention
Also use the previously-added translation.
2024-04-05 18:22:45 +07:00
Damien Elmes
75d6419099 Update instructions for Debian 12 2024-04-04 16:34:57 +07:00
Damien Elmes
28750f0d9b Update translations 2024-04-04 15:36:31 +07:00
Damien Elmes
b2b072e40d Forgot->Reset 2024-04-04 15:36:19 +07:00
Antoine Q
1e8a0cdd83 Update about.py (#3112)
Update about.py to add my name.
2024-04-03 10:22:40 +01:00
Damien Elmes
0763d59cba Ensure ankihelper is rebuilt on arch change
https://forums.ankiweb.net/t/24-04-breaks-dark-mode-on-mac/43048
2024-04-03 15:07:50 +07:00
Damien Elmes
aa248b5540 Mention missing libraries 2024-04-03 14:41:28 +07:00
Damien Elmes
f30a170aee Possible fix for crash on first sync
https://forums.ankiweb.net/t/desktop-app-closes-itself-after-i-try-to-log-in/43132
2024-04-03 14:11:34 +07:00
jthulhu
a9ad6e7c65 Corrected minor non-idiomatic snippet of code (#3108)
* Corrected minor non-idiomaticity.

* Added to CONTRIBUTORS.
2024-04-01 11:34:23 +01:00
Damien Elmes
2f654fc859 Fix arm64 node checksum 2024-04-01 17:17:44 +07:00
Mani
3c8416d9f5 highlight io shapes in answer side (#3098) 2024-03-31 10:14:11 +01:00
Abdo
54ec87b75e Fix some cloze handling regressions (#3086)
* Place cursor inside empty clozes

* Remove empty <li> after being added
2024-03-31 10:01:17 +01:00
Damien Elmes
d11f9318f8 Revert "Revert "Preserve HTML formatting inside clozes (#3038)""
This reverts commit 04428dea85.

Trying again now that 24.04 is out.
2024-03-31 15:55:30 +07:00
Damien Elmes
8a63bea056 Switch to SvelteKit (#3077)
* Update to latest Node LTS

* Add sveltekit

* Split tslib into separate @generated and @tslib components

SvelteKit's path aliases don't support multiple locations, so our old
approach of using @tslib to refer to both ts/lib and out/ts/lib will no
longer work. Instead, all generated sources and their includes are
placed in a separate out/ts/generated folder, and imported via @generated
instead. This also allows us to generate .ts files, instead of needing
to output separate .d.ts and .js files.

* Switch package.json to module type

* Avoid usage of baseUrl

Incompatible with SvelteKit

* Move sass into ts; use relative links

SvelteKit's default sass support doesn't allow overriding loadPaths

* jest->vitest, graphs example working with yarn dev

* most pages working in dev mode

* Some fixes after rebasing

* Fix/silence some svelte-check errors

* Get image-occlusion working with Fabric types

* Post-rebase lock changes

* Editor is now checked

* SvelteKit build integrated into ninja

* Use the new SvelteKit entrypoint for pages like congrats/deck options/etc

* Run eslint once for ts/**; fix some tests

* Fix a bunch of issues introduced when rebasing over latest main

* Run eslint fix

* Fix remaining eslint+pylint issues; tests now all pass

* Fix some issues with a clean build

* Latest bufbuild no longer requires @__PURE__ hack

* Add a few missed dependencies

* Add yarn.bat to fix Windows build

* Fix pages failing to show when ANKI_API_PORT not defined

* Fix svelte-check and vitest on Windows

* Set node path in ./yarn

* Move svelte-kit output to ts/.svelte-kit

Sadly, I couldn't figure out a way to store it in out/ if out/ is
a symlink, as it breaks module resolution when SvelteKit is run.

* Allow HMR inside Anki

* Skip SvelteKit build when HMR is defined

* Fix some post-rebase issues

I should have done a normal merge instead.
2024-03-31 09:16:31 +01:00
Damien Elmes
5b33a95801 Update translations 2024-03-31 13:57:06 +07:00
Antoine Q
6080fd2d47 Improve timer interval display (#3096) (#3100)
* Improve update interval of timer display

Timer calculation frequency increased and aligned with new card apparition.

* Update CONTRIBUTORS

* Update timer interval to 0.333 sec

* Restore timer to 1 sec

- Restoring timer to 1sec value as it is not necessary to increase the frequency.

- Adding a time update directy after new card is displayed so that the timer display immediatly restarts to 0.
2024-03-31 07:49:16 +01:00
kelciour
a9c44967ea Fix mpv loadfile syntax change (#3105) 2024-03-31 07:46:59 +01:00
snowtimeglass
ea6f4f70f9 Use "importing-added" string in importing detail table (#3104)
Supplement to the task of commit 8777aa7 (Clone "added" string for importing)
2024-03-31 07:33:31 +01:00
Jarrett Ye
63d7d92fb4 rename sm2 retention to historical retention (#3101)
* rename sm2 retention to historical retention

* ninja format

* keep sm2_retention in DeckConfSchema11

* update wording

* Update schema11.rs
2024-03-29 09:34:26 +00:00
Damien Elmes
831b220bfa Fix incorrect search results after preset used
https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/129
2024-03-29 13:19:15 +07:00
Damien Elmes
890909e9ae Update translations 2024-03-28 16:02:47 +07:00
Damien Elmes
8362ad5345 Update optimal retention tooltip, and add a few extra translations 2024-03-28 16:02:05 +07:00
Damien Elmes
82679e0014 Possible workaround for toolbar height issue
https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/125
2024-03-28 15:37:49 +07:00
ijqq
4c8513e626 Replace deprecated method chrono::NaiveDateTime::timestamp_millis (#3097)
* Replace deprecated method `chrono::NaiveDateTime::timestamp_millis`

* Update CONTRIBUTORS
2024-03-28 08:30:02 +00:00
antecrescent
a2df71b634 Refactor offline build process and add offline generation of Sphinx docs (#3082)
* Simplify the offline build

The two environment variables OFFLINE_BUILD and NO_VENV jointly provide
the ability to build Anki fully offline. This commit boils them down
into just one, namely OFFLINE_BUILD.

The rationale being that first, OFFLINE_BUILD implies the use of
a custom non-networked Python environment.
Second, building Anki with a custom Python environment in a networked
setting is a use case, that we currently do not support.
Developers in need of such a solution may want to give containerized
development environments a try. Users could also look into building
Anki fully offline instead.

* Add documentation for offline builds.

* Add support for offline generation of Sphinx documentation.

Control installation of Sphinx dependencies via the network through the
OFFLINE_BUILD environment variable.

* Add documentation for offline generation of Sphinx documentation.
2024-03-27 13:51:09 +00:00
laalsaas
079f218213 sync-server: add option to store hashed passwords (#3083) 2024-03-26 07:39:57 +00:00
Damien Elmes
04428dea85 Revert "Preserve HTML formatting inside clozes (#3038)"
This reverts commit d6857f4ccd.

Rolling this back for now, as it may cause regressions. We can give it
another try at the start of the next beta-testing period.
2024-03-25 16:47:54 +07:00
Damien Elmes
bfbd030ba6 Update translations 2024-03-25 16:44:52 +07:00
Damien Elmes
bfd90d53e5 Fix spurious warning when comparing optimal and desired retention 2024-03-25 16:44:07 +07:00