Commit Graph

10756 Commits

Author SHA1 Message Date
Damien Elmes
a7b8cb87de Don't block collection when playing audio
https://forums.ankiweb.net/t/anki-23-10-release-candidate/35967/60
2023-10-26 11:46:02 +10:00
Damien Elmes
633d246306 Don't lock collection while generating TTS 2023-10-26 11:45:17 +10:00
Damien Elmes
415d757cd0 Update translations 2023-10-26 11:23:24 +10:00
Damien Elmes
bbe9dc5186 Split translation of learn in the deck list
Closes #2708
2023-10-26 11:23:24 +10:00
Damien Elmes
9362ef9620 Tweaks to import screen
- Tweak wording
- Move conflict handling options to a disclosure
2023-10-26 11:23:24 +10:00
Damien Elmes
ceb8a4ac20 Revert "Use scheduling flag instead of checking revlog when importing decks (#2730)"
This reverts commit e1e0f2e1bd.

The previous change breaks the assumption on this line:

                DeckKind::Filtered(_) => unreachable!(),

This will likely need a bigger refactor to handle this properly, and separate
out importing of deck configs from other scheduling data.
2023-10-26 11:23:24 +10:00
Damien Elmes
48dfe502f2 Bump werkzeug for CVE 2023-10-26 11:23:24 +10:00
Damien Elmes
865296254a Tweaks to add-on startup failure screen / update checks
- Add a Check for Updates button to the screen
- Make the update list screen non-modal, so that other modal pop-ups
at startup don't leave the user stuck
- When manually checking for updates, update Anki's last check time
2023-10-26 11:23:24 +10:00
Damien Elmes
9a027a8c48 Warn users about rescheduling 2023-10-26 11:23:24 +10:00
Damien Elmes
2781d47d21 Relax sm2 retention limits 2023-10-26 11:23:24 +10:00
virinci
6e5edd94e0
Fix Linux install script CWD check (#2775) 2023-10-26 11:22:56 +10:00
Damien Elmes
35be9a70da Add public method to determine if v3 is enabled 2023-10-25 11:41:05 +10:00
Damien Elmes
1c08a97fb2 Update fsrs and Rust deps 2023-10-25 10:22:36 +10:00
Damien Elmes
22736238c1 Disable rotation globally
As described on https://github.com/fabricjs/fabric.js/issues/6420#issuecomment-650747872

Fixes rotation marker appearing when selecting, and when ungrouping
2023-10-25 09:23:47 +10:00
Hikaru Y
252addf611
Fix shape selection malfunction after creating shapes in succession (#2773)
* Fix shape selection malfunction after creating shapes in succession

* Disable rotation when duplicating a shape
2023-10-25 09:02:44 +10:00
Abdo
0736cdb29c
Fix scaling of text objects (#2767)
* Fix scaling of text objects

* Do not transform scale factors
2023-10-25 08:47:54 +10:00
Damien Elmes
ecb12e44e1 Fix title case 2023-10-23 12:05:33 +10:00
Damien Elmes
ca4b442581 Update translations 2023-10-23 12:04:03 +10:00
Damien Elmes
aab81f9f9a Add tooltips for image occlusions
Closes #2768
2023-10-23 12:03:22 +10:00
Aristotelis
8e828f2955
Allow disabling occlusion mask border (#2764)
* Allow setting occlusion mask border to zero

* Switch to multi-line if statements

cf. 9740393d72

* Enforce if statement braces in dprint

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-23 11:43:37 +10:00
Abdo
14940a617b
Fix IO groups breaking upon editing (#2766)
* Fix IO groups breaking upon editing

* Emit change signal after group/ungroup
2023-10-23 09:43:31 +10:00
Damien Elmes
9740393d72 Enforce curly bracket usage for one-statement ifs 2023-10-23 09:19:49 +10:00
Hikaru Y
a53806e24a
Indicate current occlusion type in pop-up menu (#2760)
* Simplify handling of occlusion types in editor code

- Unify updateIONoteInEditMode(), setOcclusionFieldInner() and
setOcclusionField() into updateOcclusionsField()
- Don't use `includeInactive` property of Shape class in editor code
- Drop `isEditMode`

+
Update the occlusions field every time a mask or text is updated, not
only in editing mode but also in adding mode, so that IO cards can be
previewed correctly in the card layout screen

* Indicate current occlusion type in pop-up menu

https://forums.ankiweb.net/t/anki-23-10-beta-5-6/35677/46

* Fix a11y warnings in Toolbar.svelte

* Drop `occludeInactive` parameter from `MaskEditorAPI.getShapes()`
2023-10-23 09:12:56 +10:00
Damien Elmes
9bbc6c9405 Add image occlusion to stock notetypes 2023-10-22 11:00:39 +10:00
Aristotelis
26b2ac4ee3
Add ordinals to IO clozes (#2763)
Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-22 10:52:22 +10:00
Hikaru Y
f8edbcc686
Fix modified polygon not being saved when editing IO note (#2762) 2023-10-22 10:51:45 +10:00
Aristotelis
56f7d54900
Add APIs for IO mask editing (#2758)
* Add simple mask editor add-on API

* Signal completed mask editor image loading to Python

* Add API methods for querying mask editor state, fix formatting

* Use event forwarding to propagate image loaded event

Should fix mobile support by moving all bridgeCommand calls to `NoteEditor.svelte`

* Add shape classes to mask editor API

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-22 10:40:40 +10:00
kelciour
1954a28bcb
Change export notes' parent window in card browser (#2761) 2023-10-22 10:23:58 +10:00
Damien Elmes
f9de92ee09 Expose skip_undo_entry
https://forums.ankiweb.net/t/porting-tips-for-anki-23-10/35916/4
2023-10-22 10:21:27 +10:00
kelciour
59d89dd9f1
Make it possible to silent uninstall with WinGet (#2757) 2023-10-21 12:23:12 +10:00
Abdo
0ce9b3f0a1
Refresh reviewer as the day rolls over (#2756) 2023-10-21 12:18:01 +10:00
Damien Elmes
3bfd828503 Fix browser query not matching stats
- Round instead of floor when binning
- Account for rounding in search

https://forums.ankiweb.net/t/anki-23-10-release-candidate/35967/4
2023-10-21 12:00:43 +10:00
Damien Elmes
7942487593 "Notetype" -> "Note Type" in browser column
While we may want to update things in the other direction in the future
(https://github.com/ankitects/anki/pull/1456#issuecomment-951767922),
this is more consistent with the existing other strings

Closes #2754
2023-10-21 11:35:30 +10:00
Damien Elmes
80d807e08a Fix stability search query 2023-10-20 14:07:03 +10:00
Damien Elmes
3394ab02e7 Update translations 2023-10-20 13:01:32 +10:00
Damien Elmes
5098ecce24 Tweak some of the graph descriptions 2023-10-20 12:58:07 +10:00
Gustaf-C
4b6aadfe62
Tweak browser column labels to card type, note type (#2751)
* Tweak browser column labels to card type, note type

* Apply suggestions from code review
2023-10-20 12:46:09 +10:00
Damien Elmes
1b8f5496f9 Don't automatically disable add-ons
d7a0bc0d42 (commitcomment-130467314)

Also, make the pop-up non-modal so it can be left on screen as the user
navigates to the add-on screen.
2023-10-20 11:12:56 +10:00
Damien Elmes
7bc4c3b78f Don't hide FSRS help when option is disabled 2023-10-20 10:30:09 +10:00
Abdo
8e1105144a
Commit addition of IO shapes immediately (#2750) 2023-10-20 09:38:03 +10:00
Aristotelis
c828a2eb6f
Add APIs for IO card rendering (#2739)
* Refactor: Add index to shapes package

* Add shape draw callback API to setupImageCloze

* Expose IO drawing API, switch away from image cloze naming

We currently use "image occlusion" in most places, but some references to "image cloze" still remain. For consistency's sake and to make it easier to quickly find IO-related code, this commit replaces all remaining references to "image cloze", only maintaining those required for backwards compatibility with existing note types.

* Add cloze ordinal to shapes

* Do not mutate original shapes during (de)normalization

Mutating shapes would be a recipe for trouble when combined with IO API use by external consumers.

(makeNormal(makeAbsolute(makeNormal())) is not idempotent,
and keeping track of the original state would introduce
additional complexity with no discernible performance benefit
or otherwise.)

* Tweak IO API, allowing modifications to ShapeProperties

* Tweak drawShape parameters

* Switch method order

For consistency with previous implementation

* Run Rust formatters

* Simplify position (de)normalization

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-20 09:36:46 +10:00
Sam Waechter
0e24532439
Trim extra colons on conversion to NativeDeckName (#2748)
This fixes issue #2692. Leading/trailing colons are remove along with whitespace so " : : :foo:bar: : : " becomes "foo:bar"
2023-10-19 13:42:57 +10:00
Damien Elmes
d7a0bc0d42 Display all startup errors at once, and automatically disable add-ons
https://forums.ankiweb.net/t/anki-23-10-beta-5/35677/48
2023-10-19 13:40:39 +10:00
dependabot[bot]
2d176d8c35
Bump rustix from 0.38.14 to 0.38.19 (#2747)
* Bump rustix from 0.38.14 to 0.38.19

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.14 to 0.38.19.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.14...v0.38.19)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update licenses

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-19 09:44:51 +10:00
Abdo
bba67fdab4
Fix misleading warning when changing notetype from/to cloze (#2744) 2023-10-18 16:50:32 +10:00
dependabot[bot]
dfe0370a2a
Bump @babel/traverse from 7.22.5 to 7.23.2 (#2746)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 09:17:26 +10:00
Damien Elmes
39bf2f2160 Update to latest fsrs 2023-10-18 09:03:23 +10:00
Damien Elmes
197c486bc0 Bump urllib3 for CVE 2023-10-18 08:56:48 +10:00
Abdo
b23f17df27
Drop support for checkpoints (#2742)
* Drop support for checkpoints

* Deprecate .flush()

* Remove .begin/.commit

* Remove rollback() and deprecate save/autosave/reset()

There's no need to commit anymore, as the Rust code is handling
transactions for us.

* Add safer transact() method

This will ensure add-on authors can't accidentally leave a transaction
open, leading to data loss.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-17 12:43:34 +10:00
user1823
4c17a6964e
Rename Analyze to Evaluate in FSRS Deck Options (#2741)
* Update deck-config.ftl

* Update FsrsOptions.svelte

* Update CONTRIBUTORS
2023-10-17 09:53:24 +10:00