Commit graph

6387 commits

Author SHA1 Message Date
Damien Elmes
637ac4c6dd nest NoteWithEmptyCards 2021-02-08 19:11:16 +10:00
Damien Elmes
6121ee364d add small amount of padding to sidebar
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/3
2021-02-08 19:01:54 +10:00
Damien Elmes
4e6c551241 remove some unused preference strings 2021-02-08 18:49:13 +10:00
Damien Elmes
bd9b921bcb fix media check not updating progress 2021-02-08 16:46:57 +10:00
Damien Elmes
ac5845569e Media check suffered from the same text box slowdown as the importing screen 2021-02-08 16:42:21 +10:00
Damien Elmes
b96db893ec nest progress messages and remove Python wrapper class
The progress messages are only really intended to be consumed by Anki.
If consumption by add-ons was expected, we'd be better off keeping the
wrapper, as the API for oneofs in Python is quite awkward to use.
2021-02-08 16:40:27 +10:00
Damien Elmes
b09667a737 remember last input for 'set due'; add string config; nest config types 2021-02-08 14:10:05 +10:00
Damien Elmes
e12872b4b3 fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
Damien Elmes
5527d9b4d1 add (unused) reschedule option back to avoid breaking fastbar 2021-02-08 09:51:40 +10:00
Damien Elmes
5e4ff2ff82 Rework reschedule tool
The old rescheduling dialog's two options have been split into two
separate menu items, "Forget", and "Set Due Date"

For cards that are not review cards, "Set Due Date" behaves like the
old reschedule option, changing the cards into a review card, and
and setting both the interval and due date to the provided number of
days.

When "Set Due Date" is applied to a review card, it no longer resets
the card's interval. Instead, it looks at how much the provided number
of days will change the original interval, and adjusts the interval by
that amount, so that cards that are answered earlier receive a smaller
next interval, and cards that are answered after a longer delay receive
a bonus.

For example, imagine a card was answered on day 5, and given an interval
of 10 days, so it has a due date of day 15.

- if on day 10 the due date is changed to day 12 (today+2), the card
is being scheduled 3 days earlier than it was supposed to be, so the
interval will be adjusted to 7 days.
- and if on day 10 the due date is changed to day 20, the interval will
be changed from 10 days to 15 days.

There is no separate option to reset the interval of a review card, but
it can be accomplished by forgetting the card(s), and then setting the
desired due date.

Other notes:

- Added the action to the review screen as well.
- Set the shortcut to Ctrl+Shift+D, and changed the existing Delete
Tags shortcut to Ctrl+Alt+Shift+A.
2021-02-07 21:57:51 +10:00
Damien Elmes
126e4ffe46 update duplicate-string and copy 'set due date' in from AnkiMobile 2021-02-07 13:56:11 +10:00
Damien Elmes
fbc341ecff bump version
2.1.40 is another bugfix release; a 2.1.41 beta is expected to follow
within a few days
2021-02-07 13:56:11 +10:00
Damien Elmes
f15036c3dc update translations 2021-02-06 21:51:44 +10:00
Damien Elmes
759e646f5d fix backup not being taken before full download 2021-02-06 19:01:48 +10:00
Damien Elmes
23ed8578a5 add opus to supported audio list and sort 2021-02-06 15:11:24 +10:00
Damien Elmes
2f2a327e60 handle remote links in ts pages
Required to avoid loading remote links embedded in deck descriptions
in the webview
2021-02-06 15:03:21 +10:00
Damien Elmes
2edd992020 render deck description with markdown; strip images
To support images on that screen, we'll first need to adjust the base url
for each platform, or rewrite the local image URLs, as otherwise they
are resolved to _anki/pages/...
2021-02-06 15:02:40 +10:00
Damien Elmes
3cae1b4cac sanitize deck description in decks screen on backend
Looks like ammonia only adds about 800k to the release binary
2021-02-06 13:42:38 +10:00
Damien Elmes
33e532166a Revert "sanitize deck description HTML with html-sanitize"
This reverts commit cd37a9ae83.
2021-02-06 13:25:40 +10:00
Damien Elmes
cd37a9ae83 sanitize deck description HTML with html-sanitize
Committing for reference; will roll back afterwards.

This adds approximately 150k to the bundled .js file in release mode.
html-sanitizer might be useful to replace our custom paste filtering
code in the future, but for now I'm not sure it's worth the extra
page load time over doing the filtering in Rust.
2021-02-06 13:25:34 +10:00
Damien Elmes
12d5bc217d show deck description on congrats screen 2021-02-06 13:20:06 +10:00
Damien Elmes
30c108fc91 Merge pull request #1006 from hgiesel/deadeditor
Remove some dead editor code
2021-02-06 09:02:35 +10:00
Damien Elmes
63ea689636 Restore "Merge pull request #1007 from hgiesel/sveltesass2""
This reverts commit 86b470071f and
points to a new rules_svelte commit.

It looks like we were getting away with not listing the dep on the
rules_svelte end - the failing build turned out to be because we need
to pass sass in to our local svelte_check invocation.
2021-02-06 08:39:36 +10:00
Damien Elmes
86b470071f Revert "Merge pull request #1007 from hgiesel/sveltesass2"
Roll back to investigate issues.

This reverts commit 58a58d94be, reversing
changes made to 31d06e8f39.
2021-02-06 08:20:10 +10:00
Damien Elmes
58a58d94be Merge pull request #1007 from hgiesel/sveltesass2
Use lang="scss" in CardCounts
2021-02-06 08:18:21 +10:00
Damien Elmes
31d06e8f39 update to Henrik's rules_svelte patch for sass support 2021-02-06 08:16:41 +10:00
Henrik Giesel
9449dabf9a Use lang="scss" in CardCounts 2021-02-05 14:52:25 +01:00
Henrik Giesel
c554d4ac28 Remove usage of window.event in onPaste 2021-02-05 13:42:49 +01:00
Henrik Giesel
e9f8ba14f9 Remove dead code kept for compatibility 2021-02-05 13:41:35 +01:00
Damien Elmes
3d4f8cac67 fix filter saving failing when savedFilters is not set 2021-02-05 22:38:44 +10:00
Damien Elmes
a8e8620182 use 'contains' instead of 'prefix' search in tag completer 2021-02-05 21:14:35 +10:00
Damien Elmes
6c3d107d30 Merge pull request #1004 from hgiesel/graphsfix
Update setFirstWeekday with new .on() type signature
2021-02-05 20:05:17 +10:00
Damien Elmes
40a4b29214 use top level defs for protobuf enum cases
While mypy can understand nested references like ConfigBool.Key.COLLAPSE_RECENT,
PyCharm doesn't understand the metaclass syntax, and shows the definitions
as invalid.
2021-02-05 19:26:13 +10:00
Damien Elmes
b44cc23b66 use constants for other color references
str_color/qcolor() doesn't appear to have been used by any add-ons
except one of mine, so changing the signature should be safe
2021-02-05 18:58:22 +10:00
Damien Elmes
b6e873b17b move remaining Filter button items into sidebar
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
34b0fd5a77 replace sidebar filter shortcut with existing Filter button shortcut 2021-02-05 14:32:56 +10:00
Henrik Giesel
77c18c856d Update setFirstWeekday with new .on() type signature 2021-02-04 14:25:51 +01:00
Damien Elmes
9589ce2d79 exclude Mac dylib from '...' 2021-02-04 20:41:08 +10:00
Damien Elmes
5d4e50c39e fix Qt translations in macOS packaged build 2021-02-04 20:28:25 +10:00
Damien Elmes
51ac1ea935 turn top bar dark when night mode enabled on macOS 2021-02-04 19:19:56 +10:00
Damien Elmes
2f9dea13ac fix broken card styling fix :-) 2021-02-03 22:32:55 +10:00
Damien Elmes
efb2ce77ed fix broken card styling 2021-02-03 22:22:12 +10:00
Damien Elmes
b87fc8e0fc pin proc_macro_nested due to Windows breakage 2021-02-03 21:17:11 +10:00
Damien Elmes
67accf7829 avoid wrapping card count text on small screens 2021-02-03 21:08:07 +10:00
Damien Elmes
fb3b1bdbb3 update translations 2021-02-03 20:44:20 +10:00
Damien Elmes
7962629375 minor wording tweak 2021-02-03 20:43:58 +10:00
Damien Elmes
9f14240b51 update JS deps 2021-02-03 20:38:41 +10:00
Damien Elmes
192c9a5418 update Rust deps 2021-02-03 20:29:48 +10:00
Damien Elmes
833763df2e contributing.md update 2021-02-03 16:06:34 +10:00
Damien Elmes
d1eedcffd1 Update issue templates 2021-02-03 15:31:17 +10:00