Commit Graph

3241 Commits

Author SHA1 Message Date
Abdo
91335b834f
Clear editor's internal copied text on cut/copy (#2866) 2023-12-04 15:04:49 +10:00
Abdo
843c0417b0
Fix auto advance state not being restored after focus change in some (#2860)
cases
2023-12-04 14:54:25 +10:00
Abdo
abd8759d50
Prefer image pastes over HTML in the editor (#2856) 2023-12-01 15:23:07 +10:00
Abdo
dc3bd3efde
Replace css_browser_selector with our own implementation (#2854)
* Replace css_browser_selector

* Add classes to root element instead of body

* Export addBrowserClasses() in reviewer_extras for mobile clients (dae)

* Avoid setting .mac on iOS devices (dae)
2023-11-30 10:57:33 +10:00
gustavosmendes1
1bca45176a
Added contributors and edit about (#2855) 2023-11-30 10:15:05 +10:00
Damien Elmes
063b6f60fd Rework error dialog
- Hide traceback
- Include full add-on info in 'copy debug info' button, like about
screen
- Link to troubleshooting page
- Use non-modal pop-up in the common case, to avoid potential conflicts
with other modals.

Closes #2830
2023-11-29 10:25:32 +10:00
Damien Elmes
452e012c71 Add option to calculate all weights at once 2023-11-27 11:24:31 +10:00
Abdo
e88dfb68a5
Load MathJax's text-chtml-full component in reviewer/previewer (#2836)
* Load MathJax's text-chtml-full in review screens

* Remove no longer needed MathJax extensions
2023-11-20 16:50:55 +10:00
Akash Reddy
9fd25a87ec
Fix switching of add & history buttons when selecting IO notetype (#2833)
* Fix switching of add & history buttons when selecting IO notetype

* Update CONTRIBUTORS
2023-11-20 16:36:25 +10:00
Damien Elmes
a5cd3f32f4 Fix broken bundling on Windows 11
When Windows notices "install" in the filename it triggers a UAC elevation,
causing 'cargo run' to fail.
2023-11-20 12:01:34 +10:00
Hikaru Y
8de5cf9690
Fix misalignment of IO masks in Qt5 when image is vertically long (#2829)
* Revert "Fix I/O not showing in Qt5"

This reverts commit c478689e5a.

* Fix misalignment of IO masks in Qt5 when image is vertically long

Also, as in Qt6, constrain the IO image to fit in the viewport.
2023-11-16 10:30:54 +10:00
Damien Elmes
0754a50b5b Automatically disable sandbox on Qt5 PyPi/packaged builds 2023-11-16 10:28:58 +10:00
Damien Elmes
07909a54e2 Add ability for pages created by add-ons to opt in to API 2023-11-14 15:55:09 +10:00
Damien Elmes
9cd4f04677 Bump Apple Silicon build to macOS 12+
Latest Xcode has broken macOS 11 on ARM, and I can't find a workaround

https://forums.ankiweb.net/t/can-t-open-anki-after-download/36938/14
2023-11-14 11:19:11 +10:00
Damien Elmes
f2fba6f9e8 Don't restrict answer key shortcuts
Qt seems to handle invalid input gracefully, and the previous approach
prevented things like umlauts or keys with modifiers.

https://forums.ankiweb.net/t/bug-cannot-set-answer-key-to-german-umlaut/37091
2023-11-13 16:09:32 +10:00
Damien Elmes
c478689e5a Fix I/O not showing in Qt5
Images still gets stretched, because Qt5 doesn't support the aspect-ratio
CSS property, but it's better than nothing.

https://forums.ankiweb.net/t/possible-occulusion-issue-on-ver-23-10-and-the-solution/36894
2023-11-13 15:31:50 +10:00
RumovZ
f200d6248e
Allow im-/exporting with or without deck configs (#2804)
* Allow im-/exporting with or without deck configs

Closes #2777.

* Enable webengine remote debugging in launch.json

* Reset deck limits and counts based on scheduling

Also:
- Fix `deck.common` not being reset.
- Apply all logic only depending on the source collection in the
gathering stage.
- Skip checking for scheduling and only act based on whether the call
wants scheduling. Preservation of filtered decks also depends on all
original decks being included.
- Fix check_ids() not covering revlog.

* Fix importing legacy filtered decks w/o scheduling

* Disable 'include deck options' by default, and fix tab order (dae)

* deck options > deck presets (dae)
2023-11-13 13:54:41 +10:00
Abdo
ae7b14bf40
Add auto-advance options to deck preset (#2765)
* Move stop-timer-on-answer strings to correct section

* Add auto-advance options to deck preset

* Implement answer actions

* Fix error when last card is answered before timeout

* Fix deserialization of answerAction

* Add answerAction to reserved key list

* Fix inverted boolean

* Add option to wait for audio to finish

* Add auto-advance toggle

* Add shortcut

* Disable auto-advance when main window state changes

* Start auto-advance timer after option is toggled

* Disable auto-advance when main window loses focus

* Use existing translations

* Add Answer Hard and Show Reminder
2023-11-13 10:41:51 +10:00
Kieran Black
46890fbbaa
fix: refresh model list when legacy addon adds notetype (#2825)
* refresh model list when legacy addon adds notetype

When legacy addons add note types, they automatically add the note type to the collection models. When this was detected, the dialog box presenting the list of models was not being updated due to an early return in the code. This commit adds a list refresh along this path of execution to ensure the gui is updated with the newly added model.

* add trailing space to name in CONTRIBUTORS
2023-11-13 10:36:21 +10:00
Damien Elmes
f73eb01047 More tweaks to API security
- Allow custom study methods in reviewer to prevent errors
- Ensure we 'fail closed' if referer header has been removed
- Ensure we ignore opaque POST requests from other origins

Thanks again to Daniel for the feedback.
2023-11-09 20:43:23 +10:00
Damien Elmes
2241d2fd9d Fix Anki closing before 'clock is off' message appears
Also fix it showing HTML code instead of formatted text
2023-11-08 12:01:31 +10:00
Damien Elmes
8ec97ddbde Prevent legacy pages apart from the editor from accessing our API
Thanks to Daniel for the suggestion.
2023-11-08 10:59:52 +10:00
Damien Elmes
780ebac3aa Add ability to tag legacy pages with a context
Will allow us to identify which of our screens requests are coming in
through, until we can migrate them to separate entrypoints.
2023-11-08 10:59:15 +10:00
Damien Elmes
454ca6ce2c Ensure webpages in browser can't access local webserver
Thanks to Daniel for the report.
2023-11-08 10:59:15 +10:00
Damien Elmes
6ebe726670 Avoid shadowing import 2023-11-08 09:20:56 +10:00
Damien Elmes
0b8b168df1 Add confirmation for upload 2023-11-07 11:11:07 +10:00
Gustaf-C
e071fb471b
Allow creation of empty filtered decks (#2788)
* Add new button to UI

* Add bool to allow creating empty filtered in back end

* Implement logic into front end for passing on bool

* Hide option on old decks

* Show option again if any settings are changed

* Revert "Show option again if any settings are changed"

This reverts commit 094acd9c65936823fa206594da5c1f3e4eb09248.

* Revert "Hide option on old decks"

This reverts commit d20a9a240b4fd85d080e8cc52d94318416ca753f.

* Update string

* Update ftl/core/decks.ftl

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2023-11-05 12:23:14 +10:00
Damien Elmes
e7436a2b23 Fix add-ons screen showing 'requires Anki >= 2.1.231000' 2023-11-05 11:16:09 +10:00
Damien Elmes
ab3a37ff71 Fix 'creating backup' showing for longer than necessary 2023-11-03 22:18:30 +10:00
Damien Elmes
726a59118f Split sidebar review string
https://forums.ankiweb.net/t/im-trying-to-improve-the-translation-but-i-cant-find-it-in-one-place-please-help-me/35335/19
2023-11-03 21:25:10 +10:00
Damien Elmes
ea84ca9300 Split 'due' translation in deck browser 2023-11-02 21:15:02 +10:00
Damien Elmes
f5fb0fd9e6 Fix syncserver failing to run in macOS packaged build
Closes #2794
2023-11-02 20:43:00 +10:00
Damien Elmes
b4c9e54347 Jemalloc no longer seems to fail in cross-compile builds 2023-11-02 19:56:08 +10:00
Abdo
252b4e7f00
Fix error on 'Previous Card Info' when deleting a note (#2790) 2023-11-01 07:46:24 +10:00
Aristotelis
fe41b4a136
Move IO webview internals to editor (#2784) 2023-10-29 06:50:15 +10:00
Aristotelis
20813eeb32
Always set an AnkiWebViewKind (#2782) 2023-10-28 13:18:21 +10:00
Damien Elmes
5a07ef06e4 Add 'copy debug info' button to add-on startup screen 2023-10-28 11:59:54 +10:00
Damien Elmes
96aab939aa Fix 'learn' showing twice in deck browser 2023-10-26 13:15:00 +10:00
Damien Elmes
7428ecadc3 Apply same ctrl+numpad enter fix that the add screen has
Likely regression in the switch to a main window
2023-10-26 11:57:37 +10:00
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
bbe9dc5186 Split translation of learn in the deck list
Closes #2708
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
virinci
6e5edd94e0
Fix Linux install script CWD check (#2775) 2023-10-26 11:22:56 +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
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
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
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
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