Commit Graph

10132 Commits

Author SHA1 Message Date
Damien Elmes
113239748b Update flask for security update
CVE-2023-30861

It doesn't look like it affects us.
2023-05-02 14:43:04 +10:00
Damien Elmes
11b4b61c16 Fix CFBundleExecutable
https://forums.ankiweb.net/t/macos-version-of-anki-including-parent-dir-with-cfbundleexecutable-value/29900
2023-05-02 14:20:55 +10:00
Damien Elmes
ac7b63e81b Mention that checkout path should not include spaces 2023-05-01 15:39:03 +10:00
Damien Elmes
26c6044dfc Bump version 2023-05-01 12:26:37 +10:00
Damien Elmes
77dd1dc1d7 Update translations 2023-05-01 11:47:30 +10:00
Damien Elmes
2e1c3fa335 Avoid firing click event in floatables when user drags the mouse
Alternative approach at fixing #2484
2023-05-01 11:44:24 +10:00
Damien Elmes
bd79a063ca Revert "Prevent MathJax editor from closing unexpectedly when selecting text (#2484)"
This broke mouse selection of dropdowns, as code that set closeOnInsideClick never
got a click signal as the floating area is closed before the click fires.

https://forums.ankiweb.net/t/anki-2-1-62-beta-release-candidate/29302/21

This reverts commit e35a938368.
2023-05-01 11:17:09 +10:00
Damien Elmes
fd509efc31 Update translations 2023-04-28 11:58:27 +10:00
Hikaru Y
e35a938368
Prevent MathJax editor from closing unexpectedly when selecting text (#2484)
* Prevent MathJax editor from closing unexpectedly when selecting text

* Revert "Prevent MathJax editor from closing unexpectedly when selecting text"

This reverts commit b43d33a6de36d0af38933c6dae8bdd635294effd.

* Prevent floating/overlay element from closing when selecting text

Apply suggestions from code review.

Use a 'mousedown' event instead of a 'click' event so that releasing
the mouse button at the end of a text selection operation when the
pointer is outside a floating/overlay element does not close it.

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2023-04-28 11:39:50 +10:00
Damien Elmes
894b7862e3
Improve import messaging when notetype has changed (#2483)
* Fix file extension not being appended on export

Regressed in #2427

* Improve import messaging when notetype has changed

- If the local notes are up to date, we don't need to warn about the
changed notetype, as no updates are required.
- Make it clearer that a changed notetype only affects updates.

Will update the docs as well.
2023-04-28 11:39:18 +10:00
Ren Tatsumoto
57d6e99262
Add a hook that allows to edit a note before it is added. (#2481)
* add note_will_be_added hook

* attempt to fix Tests.buildkite/linux/entrypoint

* attempt to fix Tests.buildkite/linux/entrypoint

* apply patch
2023-04-27 15:34:33 +10:00
Damien Elmes
13890ffade Bump pyqt6-sip version 2023-04-27 11:43:01 +10:00
Damien Elmes
103be366c9 Add new pyqt6.5 checksums
Because the version number was not changed, this was breaking new installs.

https://www.riverbankcomputing.com/pipermail/pyqt/2023-April/045257.html
2023-04-26 22:07:59 +10:00
Damien Elmes
54678bff63 Tweak unit test to reduce likelihood of flake under heavy load
https://buildkite.com/ankitects/anki-ci/builds/5698#0187bd42-c032-4078-909d-035a57892e0e
2023-04-26 21:38:04 +10:00
Damien Elmes
d4675e4ee9 Fix a few more cases where missing profile keys would lead to an error 2023-04-26 21:10:24 +10:00
Damien Elmes
d88be5b856 Use correct default values for missing keys 2023-04-26 19:11:48 +10:00
Damien Elmes
e6f970e969 Tolerate missing keys in profile DB
https://forums.ankiweb.net/t/crash-with-error-keyerror-mainwindowstate/29689
2023-04-26 19:07:59 +10:00
Damien Elmes
c12689160f Support scheduled Rust cache clearing 2023-04-26 17:19:00 +10:00
Damien Elmes
282b051c46 Cleanup tmp files after CI run 2023-04-26 17:11:24 +10:00
Damien Elmes
fd2f81df1a Update translations 2023-04-26 16:09:10 +10:00
Damien Elmes
5abdc3e285 Clarify warning in notetype reset 2023-04-26 16:08:48 +10:00
Mani
47a9db8221
fix image height issues in iOS safari (#2480)
* use i18n message when not showing image

* fix height for iOS

* some ui styling

* fix polygon draw in panzoom

* more ui styling and fixes
2023-04-26 16:01:04 +10:00
Hikaru Y
9123821131
Refactor plain/rich text input toggling code; fix focus loss (#2479)
* Refactor plain/rich text input toggling code; fix focus loss

Fix:
- Issue where field loses focus when plain/rich text input is closed

Refactoring:
- Call refocus() inside the reactive statement in
  Plain/RichTextInput.svelte to eliminate the need for polling
  with requestAnimationFrame
- Introduce 'Flag' class
- Move 'on:toggle' handlers from inline to functions defined in
  the <script> section for better readability

* Improve code clarity based on feedback from code review

- Rename method and add comment to it
- Add 'private' access modifier to property
2023-04-22 16:08:25 +10:00
Damien Elmes
7c225fb5cd V -> ValueType
https://github.com/ankitects/anki/pull/2472#issuecomment-1513507162
2023-04-19 16:43:23 +10:00
Damien Elmes
1ff27b4ab7 Bump h2 version
https://github.com/hyperium/h2/issues/674
2023-04-19 15:31:13 +10:00
Damien Elmes
f6486da233
Various tweaks to I/O code (#2478)
* Allow user to select I/O notetype instead of enforcing a specific name

* Display a clearer error when I/O note is missing an image

Opening the card layout screen from "manage notetypes" was showing an
error about the Anki version being too old.

Replacement error is not currently translatable.

* Preserve existing notetype when adding I/O notetype

* Add a 'from clipboard' string

The intention is to use this in the future to allow an image occlusion
to be created from an image on the clipboard.

* Tweak I/O init

- Use union type instead of multiple nullable values
- Pass the notetype id in to initialization

* Fix image insertion in I/O note

- The regex expected double quotes, and we were using single ones
- Image tags don't need to be closed

* Use more consistent naming in image_occlusion.proto

* Tweaks to default I/O notetype

- Show the header on the front side as well (I presume this is what
users expect; if not am happy to revert)
- Don't show comments on card (again, I presume users expect to use
this field to add notes that aren't displayed during review, as they
can use back extra for that)

* Fix sticky footer missing background

Caused by earlier CSS refactoring
2023-04-19 15:30:18 +10:00
Damien Elmes
ed334fa45d Allow cloze/image occlusion notetypes to be restored to defaults 2023-04-19 15:04:18 +10:00
Damien Elmes
55f4ccdcbe Update translations 2023-04-18 14:12:07 +10:00
Damien Elmes
dd13e78eca
Add ability to restore a notetype to its original configuration (#2472)
* Store the original stock notetype kind in the notetype

Will allow us to provide a command to restore a notetype to its default
settings/templates.

* Add a new action to restore a notetype to its original state
2023-04-18 14:07:51 +10:00
RumovZ
e361bb9514
Add emojis for graphs in hourly breakdown tooltip (#2464) 2023-04-17 16:16:10 +10:00
Damien Elmes
8abcb77d95 Revert Windows build to Qt 6.4; update to 6.4.3
Multiple users have reported that 6.5 is behaving sluggishly

https://forums.ankiweb.net/t/anki-2-1-62-beta/29302/9
2023-04-14 12:05:34 +10:00
dependabot[bot]
a3e09f421b
Bump h2 from 0.3.16 to 0.3.17 (#2471)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-14 08:26:19 +10:00
Damien Elmes
8f460b2ba9 Use original deck name if card is in filtered deck
https://forums.ankiweb.net/t/inconsistent-read-deck-name-and-seed-from-ctx-will-recognize-the-filtered-deck-as-the-deck-name/29327
2023-04-13 14:46:47 +10:00
Damien Elmes
bf05fae91e Update to the latest TypeScript version
Required a svelte-preprocess upgrade for compatibility.
2023-04-12 16:42:28 +10:00
Damien Elmes
57d2e6bd5e Remove some dead code and an invalid import from types.ts 2023-04-12 16:36:15 +10:00
Damien Elmes
e20e7f7af1 Update to the latest wheel package; make code work with it 2023-04-12 16:17:00 +10:00
Damien Elmes
7caa807f1d Upgrade to Qt 6.5 on Mac
This bumps the minimum required macOS version to 11 for Qt6.

Closes #2263
2023-04-12 16:12:41 +10:00
Damien Elmes
e40acd45a6 Add helper script for Intel cross compile on ARM Mac 2023-04-12 15:48:31 +10:00
Hikaru Y
b5fa47e307
Fix MathJax editor sometimes not properly sized / getting cut off (#2467)
* Fix MathJax editor sometimes not properly sized

Also fix an issue where when 'Reduce motion' is enabled, a popover
appears momentarily out of position and then shifts to the correct
position.

* Fix MathJax editor sometimes getting cut off

* Change max-width of MathJax editor
2023-04-12 09:43:57 +10:00
Damien Elmes
6fe9728b80 Bring chrono minimum back down for AnkiDroid
Accidentally bumped in recent deps update
2023-04-12 08:45:51 +10:00
Damien Elmes
0466e220f3 Move ascii_percent_encoding into a separate repo
This makes it easier to update independently, and means we don't need
to exclude it from formatting/tests.
2023-04-12 08:45:23 +10:00
Damien Elmes
781ff16683 Update from yanked crossbeam-channel 2023-04-12 08:29:26 +10:00
Damien Elmes
dc8c4438d7 Update iana-time-zone and windows crates, as windows 0.47 yanked 2023-04-12 08:25:53 +10:00
Damien Elmes
f0d430623c Update to Rumo's latest linkchecker code
cf838122a4 (r107719275)
2023-04-12 07:25:39 +10:00
Damien Elmes
b1ed4ade9d Upgrade to Qt 6.5 on Windows/Linux 2023-04-11 16:57:34 +10:00
Damien Elmes
5f542b895d Update spin-rs for bug fix
https://github.com/advisories/GHSA-2qv5-7mw5-j3cg
2023-04-11 16:23:32 +10:00
Damien Elmes
d9624819e9 Add a fully-random review order
https://forums.ankiweb.net/t/bug-the-random-option-in-the-review-sort-order-setting-is-not-truly-random/29199
2023-04-11 16:16:45 +10:00
Damien Elmes
1c73aeb433 Update translations 2023-04-11 16:16:45 +10:00
Damien Elmes
a14cdaf5e3 Update translations 2023-04-03 12:50:56 +10:00
Damien Elmes
c307b4e8b8 Clarify some translation terms 2023-04-03 12:50:35 +10:00