Commit graph

26 commits

Author SHA1 Message Date
Damien Elmes
39b2f5d82f handle notes with missing cards in browser
https://forums.ankiweb.net/t/2-1-45-release-candidate/11362/30
2021-07-22 14:58:57 +10:00
Damien Elmes
33a9afaa1b add back in missing check for upload size
Compression now happens up-front, so we can tell in advance if the
upload size has been exceeded.
2021-06-29 10:50:03 +10:00
Damien Elmes
ff095ed57b fix clippy lints for latest Rust 2021-06-21 13:09:36 +10:00
Damien Elmes
7f984851b4 add notetype changing to backend 2021-06-09 20:56:52 +10:00
RumovZ
6e570a8ffc search-invalid-flag -> search-invalid-flag-2 2021-06-02 21:49:33 +02:00
RumovZ
044e57075e Add checks for parsed templates
Combine existing check for unparsable templates with a check for unknown
field names and a check for front sides without any field replacement.
Updating the notetype's fields now mutates the parsed templates, so the
checks can run on the final templates.
2021-05-28 10:07:31 +02:00
RumovZ
9ea349c38b Use HashMap in identical template check 2021-05-27 12:45:17 +02:00
RumovZ
1cdf1ed96d Check for clozes when saving notetype
Error if:
- Cloze notetype lacks a cloze field on either template side.
- Non-cloze notetype has a cloze field on any template.
2021-05-27 12:01:05 +02:00
RumovZ
87e5266f16 Check for identical templates before saving 2021-05-25 21:57:49 +02:00
RumovZ
1b1cb420ca Add details to TemplateSaveError 2021-05-25 21:01:03 +02:00
RumovZ
e4df61f9aa Preserve formatting of regex error 2021-05-16 21:07:35 +02:00
RumovZ
6024a8748f Remove SearchErrorKind::Regex as it's never used 2021-05-16 21:07:03 +02:00
Damien Elmes
363a843d07 tidy up Rust imports
rustfmt can do this automatically, but only when run with a nightly
toolchain, so it needs to be manually done for now - see rslib/rusfmt.toml
2021-04-18 18:38:54 +10:00
Damien Elmes
d7237be205 use perform_op() for undo()
Instead of manually updating the UI after undoing, we just rely
on the same change notification infrastructure regular operations
use.
2021-04-03 14:38:49 +10:00
Damien Elmes
85ea6b433c i18n error shown when attempting to rebuild normal deck 2021-04-01 22:55:10 +10:00
Damien Elmes
c85811a104 merge the filtered deck errors into an enum
Fixes the wrong message being shown when trying to move cards to a
filtered deck
2021-04-01 22:30:00 +10:00
Damien Elmes
69d7c64d14 convert card template error to tuple, and report notetype name in error
Older translations will note have the $notetype variable, but that is
not an error in Fluent - it would only cause problems if we tried to
use the new string on older Anki versions.
2021-04-01 17:59:33 +10:00
Damien Elmes
32cc47b8cb convert Json and Proto errors to tuple 2021-04-01 17:45:12 +10:00
Damien Elmes
7e285f5ec8 tuple type for IoError 2021-04-01 17:40:35 +10:00
Damien Elmes
f9cd39114b tuple type for InvalidInput 2021-04-01 17:37:18 +10:00
Damien Elmes
cfe02d5df4 switch DbError to tuple type 2021-04-01 17:34:03 +10:00
Damien Elmes
2392c9b2b5 drop dependency on failure crate 2021-04-01 17:21:13 +10:00
Damien Elmes
8c635f9337 move sync/network errors into separate file 2021-04-01 17:02:54 +10:00
Damien Elmes
f0ecf8f3b9 move DB error into separate file; add InvalidRegex error 2021-04-01 16:28:23 +10:00
Damien Elmes
0e40d22f2c split search errors into separate file 2021-04-01 16:18:28 +10:00
Damien Elmes
cc54a9251e crate::err -> crate::error 2021-04-01 16:07:13 +10:00