Commit graph

949 commits

Author SHA1 Message Date
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
12d5bc217d show deck description on congrats screen 2021-02-06 13:20:06 +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
b87fc8e0fc pin proc_macro_nested due to Windows breakage 2021-02-03 21:17:11 +10:00
Damien Elmes
192c9a5418 update Rust deps 2021-02-03 20:29:48 +10:00
Damien Elmes
957e781484 add tag drag & drop support 2021-02-02 20:14:04 +10:00
Damien Elmes
c5704e6102 collapsed->expanded in other tag uses for consistency 2021-02-02 18:52:57 +10:00
Damien Elmes
e0a79b421b return tags as a string list directly; we don't need usn or collapse state 2021-02-02 18:52:57 +10:00
Damien Elmes
99d6247333 collapsed->expanded in TagTreeNode 2021-02-02 18:52:57 +10:00
Damien Elmes
ab1ecae0c3 decks start collapsed 2021-02-02 17:14:11 +10:00
Damien Elmes
b7435e5d92 tags start collapsed 2021-02-02 16:47:05 +10:00
Damien Elmes
9b468c81fd Merge pull request #959 from Arthur-Milchior/AGPL
NF: add AGPL licence missing in some file
2021-02-01 12:46:59 +10:00
Damien Elmes
06d0d22436 Update card_stats.html
Don't want the header accidentally getting copied about when users copy+paste their stats.
2021-02-01 12:46:29 +10:00
Arthur Milchior
6a1815fd56 NF: add AGPL licence missing in some file
I noticed it when I looked at some files now used in AnkiDroid, wanting to be sure we clearly indicate that we have
AGPLv3 code linked in the app
2021-01-31 21:50:21 +01:00
RumovZ
632ad14801 Remove protobuf filters whole_col and current_deck 2021-01-31 11:12:49 +01:00
Damien Elmes
e5f9e4c5e4 embed BuiltinSortKind 2021-01-31 18:56:16 +10:00
Damien Elmes
1b4106dbf0 embed kind enum in StockNoteType and remove prefix 2021-01-31 18:56:16 +10:00
Damien Elmes
9a697fd843 Merge branch 'more-backend-search' into main 2021-01-31 14:21:51 +10:00
Damien Elmes
5710e4bbd0 move drag/drop deck logic to backend 2021-01-31 13:46:31 +10:00
RumovZ
25393466dd Rename EaseKind to RatingKind 2021-01-30 19:03:50 +01:00
RumovZ
2539747115 Manually namespace enum variants in SearchTerm
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.

(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
RumovZ
0374e8f4fe Revert addition of pb.NoteIDs 2021-01-30 12:59:18 +01:00
Damien Elmes
190922666b move Rating up a level
More ergonomic, and will allow reuse if we expose prop:rated in
the future.
2021-01-30 11:54:39 +10:00
Damien Elmes
2f1bbd44d2 simplify nid/nids searches, and ditch helper function
- IdList could be re-used for a cids: search in the future if required.
- Embedding the message means it's easy to access from Python as
an attribute of SearchTerm.
2021-01-30 11:37:00 +10:00
Damien Elmes
f6f537e89f simplify Dupe message and ditch helper function
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Damien Elmes
b34d128560 rename FilterToSearchIn in backend to match frontend 2021-01-30 10:54:21 +10:00
Damien Elmes
dbe852431f use a separate enum for the is:* searches 2021-01-30 10:49:00 +10:00
Damien Elmes
e3f2b77c5b combine forgot_in_days and studied_today into a more general 'rated' 2021-01-30 10:26:23 +10:00
RumovZ
c7365abc9e Refactor search_string() and FilterToSearchIn
See #955.
2021-01-29 18:27:33 +01:00
Damien Elmes
cfc6620591 place each sidebar section under its own collapsible parent node
- Allows for group operations like "clear unused tags"
- Allows users to hide groups they're not interested in
2021-01-29 22:11:05 +10:00
Damien Elmes
34c53aafb4 add getter/setter for boolean config values 2021-01-29 21:03:19 +10:00
RumovZ
12c97442c9 Rename filters added_in etc. to added_in_days 2021-01-29 09:38:13 +01:00
Damien Elmes
7540917256 sort config keys 2021-01-29 16:31:29 +10:00
Damien Elmes
137679a1a1 remove unused set_all_config; expose .all_config(). 2021-01-29 16:30:42 +10:00
RumovZ
d3d34bd9b3 Add backend filter for field name 2021-01-28 19:48:01 +01:00
RumovZ
d403430846 Fix nid search test 2021-01-28 16:29:34 +01:00
RumovZ
82cfee17d0 Add nid filter on backend 2021-01-28 16:19:55 +01:00
RumovZ
e80217af6a Add forgot, due and added filters on backend 2021-01-28 11:11:32 +01:00
Damien Elmes
ae1491492f unbury on sync start
https://forums.ankiweb.net/t/unburying-works-differently-on-anki-desktop-ankiweb-and-ios-app/6909
2021-01-28 11:54:48 +10:00
Damien Elmes
8bd94e779f avoid bumping mtime when correcting card eases on upgrade
The USN is still set, which should cause the cards to sync in the
non-conflict case, but if changes have been made on other devices
the ease fix will not take priority, as we could be overwriting the
reviews of someone who has not synced in a while.
2021-01-28 08:11:35 +10:00
Damien Elmes
60bdb173ac Merge pull request #953 from hgiesel/backlogcb
Add FutureDueShowBacklog as preferences
2021-01-27 19:44:01 +10:00
Damien Elmes
630360641f suggest DB check if HTTP status 400 is returned 2021-01-27 14:23:28 +10:00
Henrik Giesel
e30f62c2a5 Add FutureDueShowBacklog as preferences 2021-01-27 01:15:19 +01:00
Damien Elmes
6285729c49 Merge pull request #897 from hgiesel/statssearch
Triggering searches from the stats screen.
2021-01-26 11:31:36 +10:00
Henrik Giesel
6b0a26e46b Move dispatch logic from Histogram to individual graphs 2021-01-25 16:34:44 +01:00
Henrik Giesel
8ecd1cad03 Add back bridge_commands_support via backend.proto 2021-01-25 13:47:20 +01:00
Kerrick Staley
e157eb443f Add comment explaining why sfld column has type integer
The `notes.sfld` column in the `collection.anki2` database has type `integer`, even though it contains text. This is [something SQLite allows](https://dba.stackexchange.com/questions/106364/text-string-stored-in-sqlite-integer-column) and was done to allow integer values to sort numerically. Add a comment explaining this.
2021-01-25 18:39:59 +08:00
Damien Elmes
b00c62455a handle missing deck ID in templates
https://github.com/ankidroid/Anki-Android/issues/7512
2021-01-25 16:47:23 +10:00
Damien Elmes
028fdb2562 coerce some more invalid decimal values to ints during sync 2021-01-25 09:43:50 +10:00