Commit Graph

11119 Commits

Author SHA1 Message Date
Abdo
0a706c5dd9
Ignore errors in do_window_cleanup to fix shutdown issue (#3142)
* Ignore errors in do_window_cleanup to fix shutdown issue

* Only catch RuntimeError
2024-04-17 20:50:41 +10:00
Abdo
351aa96dfc
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
1a868bcaaf Ensure runner gets rebuilt in Mac CI 2024-04-17 20:23:50 +10:00
Jarrett Ye
d1b2ab5983
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 80a5b3803ef4b8270d13aabb9a832291b55d4847.

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

This reverts commit 7f0a5570e74ba5236fc02942550b4e00046b71bc.
2024-04-17 20:18:00 +10:00
Damien Elmes
e66adcca38 alertOnError should default to true
Regressed in svelte-kit port
2024-04-17 20:13:37 +10:00
Damien Elmes
a1fa865bb2 Update translations 2024-04-13 15:02:54 +07:00
Damien Elmes
39d191edd7 Bump version 2024-04-13 15:02:46 +07:00
Loudwig
d8f2782c26
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
e486d6b513
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 dedfeec9adabe4867d54a68e99b270bb93337334.
2024-04-13 08:36:08 +01:00
Wu Yi-Wei
31439e325d
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
761780397b Update idna for security issue 2024-04-12 11:17:29 +07:00
user1823
0334f4ff77
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]
25345b91e1
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
d0c4b938cb Update translations 2024-04-11 14:09:34 +07:00
Damien Elmes
1780c89d78 Fix casing of 'historical retention' 2024-04-11 14:09:16 +07:00
Mani
477f932f35
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
da4551e351
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
29bdc47482
Fix IO text masks being grouped (#3128) 2024-04-10 08:36:00 +01:00
Abdo
642f29cf5e
Fix IO mask position slightly off in edit mode (#3121) 2024-04-08 16:40:22 +01:00
Escape0707
97efd49cd8
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
10d567f937
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
00ba69b5fe Fix latest RUSTSEC warning 2024-04-05 18:35:28 +07:00
Damien Elmes
3033b54890 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
690866b090 Update instructions for Debian 12 2024-04-04 16:34:57 +07:00
Damien Elmes
0b3b6bb7f2 Update translations 2024-04-04 15:36:31 +07:00
Damien Elmes
20aff51df8 Forgot->Reset 2024-04-04 15:36:19 +07:00
Antoine Q
068f14378e
Update about.py (#3112)
Update about.py to add my name.
2024-04-03 10:22:40 +01:00
Damien Elmes
bdc9be2bbb 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
022a95db25 Mention missing libraries 2024-04-03 14:41:28 +07:00
Damien Elmes
a5154635dc 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
3cd8c5700b
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
7121cb5132 Fix arm64 node checksum 2024-04-01 17:17:44 +07:00
Mani
038a0189d0
highlight io shapes in answer side (#3098) 2024-03-31 10:14:11 +01:00
Abdo
31e2dc1409
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
9c733848b8 Revert "Revert "Preserve HTML formatting inside clozes (#3038)""
This reverts commit e911b4b69a.

Trying again now that 24.04 is out.
2024-03-31 15:55:30 +07:00
Damien Elmes
9f55cf26fc
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
429bc9e14c Update translations 2024-03-31 13:57:06 +07:00
Antoine Q
32c129656e
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
111f3bd138
Fix mpv loadfile syntax change (#3105) 2024-03-31 07:46:59 +01:00
snowtimeglass
ddccfb805f
Use "importing-added" string in importing detail table (#3104)
Supplement to the task of commit 184ad80 (Clone "added" string for importing)
2024-03-31 07:33:31 +01:00
Jarrett Ye
15506328e9
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
c1877f9df6 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
99524848b1 Update translations 2024-03-28 16:02:47 +07:00
Damien Elmes
6e1ae5231b Update optimal retention tooltip, and add a few extra translations 2024-03-28 16:02:05 +07:00
Damien Elmes
67062da924 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
22559929f9
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
58ce29f461
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
798d9df4de
sync-server: add option to store hashed passwords (#3083) 2024-03-26 07:39:57 +00:00
Damien Elmes
e911b4b69a Revert "Preserve HTML formatting inside clozes (#3038)"
This reverts commit 58b2475f42.

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
5062cb37c7 Update translations 2024-03-25 16:44:52 +07:00