Damien Elmes
b392020798
fix clippy lints for latest Rust
2021-06-21 13:09:36 +10:00
Damien Elmes
c79f8ba88f
in/out -> request/response
...
The saved characters weren't worth the increased difficulty when
reading, and the fact that we were deviating from protobuf norms.
2021-06-20 15:49:20 +10:00
Damien Elmes
a58826941f
add rustls-native-certs
...
closes #1241
2021-06-18 18:15:41 +10:00
Damien Elmes
2e53dc63c8
Merge pull request #1230 from RumovZ/fields-check
...
Check for misplaced or missing clozes when adding and in the editor
2021-06-17 21:26:16 +10:00
RumovZ
87a50f22e6
Assign dupe error the lowest precedence
2021-06-16 11:42:40 +02:00
Henrik Giesel
0f658de702
Add escape_anki_wildcards_for_search_node
2021-06-16 09:25:27 +02:00
Henrik Giesel
b8142d33c8
Revert "Remove special treatment of tag:none"
...
This reverts commit 95285ef66d02d9d3f0d560f70514b16e8a2f7bf5.
2021-06-16 17:19:21 +10:00
Henrik Giesel
b19e07c135
Remove special treatment of tag:none
2021-06-16 17:19:21 +10:00
Henrik Giesel
c5faf39d7c
Make Browser root nodes use "_*" uniformly
2021-06-16 17:19:21 +10:00
Damien Elmes
ecdd668f9a
update Rust deps
2021-06-16 16:10:57 +10:00
RumovZ
d7340d3f07
Fix missing hyphen escape when normalizing search ( #1233 )
...
* Fix missing hyphen escape when normalizing search
* Add some more tests for normalization
* Use char to satisfy clippy
2021-06-15 10:02:39 +10:00
Damien Elmes
220fca9a1d
handle <br/> when rendering a single line
...
+ case-insensitive matching
https://forums.ankiweb.net/t/html-editor-modifies-note-when-a-field-with-break-tags-is-opened/10772
2021-06-14 13:05:48 +10:00
RumovZ
aeedb4dc11
Add check for out-of-place/missing clozes
2021-06-12 10:02:21 +02:00
Damien Elmes
61e86cc29d
new change notetype implementation for the frontend
...
- changes can now be undone
- the same field can now be mapped to multiple target fields, allowing
fields to be cloned
- the old Qt dialog has been removed
- the old col.models.change() API calls the new code, to avoid
breaking existing consumers. It requires the field map to always
be passed in, but that appears to have been the common case.
- closes #1175
2021-06-10 22:19:24 +10:00
Damien Elmes
40dc2e217c
fix spurious text in header injected by rust analyzer
2021-06-10 09:06:37 +10:00
Damien Elmes
1f2567e04c
add notetype changing to backend
2021-06-09 20:56:52 +10:00
Damien Elmes
410660990e
add LIFO sorting options for new cards
2021-06-08 14:01:46 +10:00
Damien Elmes
1479957538
fix note changes triggering a queue rebuild
2021-06-08 12:09:35 +10:00
Damien Elmes
4325f867a7
Merge pull request #1217 from RumovZ/flag-ftl
...
Mark search-invalid-flag as a new string
2021-06-03 10:50:11 +10:00
RumovZ
f33bd4ca11
search-invalid-flag -> search-invalid-flag-2
2021-06-02 21:49:33 +02:00
Damien Elmes
2903848c62
handle duplicate ids in values when upgrading deck config
...
Multiple configs with the same inner id would lead to errors like the
following when trying to open the collection:
DeckConfigInner.interval_multiplier: invalid wire type: StartGroup (expected ThirtyTwoBit)
2021-06-02 17:12:59 +10:00
Damien Elmes
578b1b0552
Merge pull request #1213 from RumovZ/new-flags
...
Add pink, turquoise and purple flags
2021-06-02 11:22:26 +10:00
RumovZ
5e7a47fdc7
Rename violet to pink
2021-06-01 18:14:43 +02:00
Damien Elmes
50961a9196
push review randomizing into SQL
...
This makes the review backlog case more expensive, since we end up
shuffling items outside the daily limit, but for the common case it's
about the same speed, and it means we don't need two separate sorting
steps. New cards remain handled the same way, since a backlog
is common there.
Also ensures that interday learning cards honor the deck sorting, and
that the non-default sort orders shuffle at the end.
2021-06-01 14:50:35 +10:00
Damien Elmes
562787bce1
add options to sort reviews by deck
...
https://forums.ankiweb.net/t/is-studying-subdeck-by-subdeck-broken-in-2-1-44-mac/10458/2
2021-06-01 13:22:39 +10:00
Damien Elmes
775beda6ce
fix subdeck order not being preserved by active_decks in v3
2021-06-01 11:40:25 +10:00
RumovZ
c97c6c6e98
Add violet, turquoise and purple flags
2021-05-31 12:03:30 +02:00
Damien Elmes
29c4869aef
remove deck protobuf from frontend
...
Like the previous change, avoid exposing the protobuf as a public API
for now. It requires more thought, and is probably better done with
either extra helper accessors like decks.name(), or via a native class.
2021-05-31 16:31:06 +10:00
Damien Elmes
25e4e4c8f6
fix exporting of non-default deck configs
2021-05-31 16:27:58 +10:00
Damien Elmes
93459cc48f
Merge pull request #1200 from RumovZ/template-checks
...
Template checks
2021-05-29 10:28:06 +10:00
RumovZ
44506136e2
Use HashSet for special fields
2021-05-28 15:42:09 +02:00
RumovZ
329f89c093
Add const for special fields and doc
2021-05-28 11:58:46 +02:00
RumovZ
33bf391114
Allow empty field name in templates
2021-05-28 11:37:05 +02:00
RumovZ
2e923db6bd
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
Damien Elmes
e3db8641d1
slightly simplify transact_inner()
2021-05-28 14:45:36 +10:00
Damien Elmes
af50c445dd
don't depend on timer to increment between ops in unit test
2021-05-28 11:43:24 +10:00
Damien Elmes
aa7d2721c9
avoid bumping mtime when nothing has changed
...
+ update sync indicator after every op
+ skip mtime bump on undo/redo
2021-05-28 11:09:16 +10:00
Damien Elmes
6cc713cbe8
add v3 scheduler to prefs screen
2021-05-27 23:09:49 +10:00
RumovZ
c61587b1de
Use HashMap in identical template check
2021-05-27 12:45:17 +02:00
RumovZ
3dfa1de68b
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
Damien Elmes
57ec4cc7b5
change get_queued_cards() to no longer return congrats info
2021-05-26 12:59:45 +10:00
RumovZ
6fae0ea21f
Update tests to avoid duplicate front templates
2021-05-25 21:58:12 +02:00
RumovZ
60131eab23
Check for identical templates before saving
2021-05-25 21:57:49 +02:00
RumovZ
fa19f590e8
Add details to TemplateSaveError
2021-05-25 21:01:03 +02:00
RumovZ
bd8c13067d
Escape HTML in template error message
2021-05-25 19:40:15 +02:00
Damien Elmes
e9309c5378
expose the ability to get/set aux notetype/template keys
...
template keys are not currently adjusted when card templates are
repositioned.
2021-05-25 22:13:53 +10:00
Damien Elmes
050ef11a96
pass css and latex svg flag back from rendering op
...
This could potentially help us avoid having to refetch the notetype
during study in the future, though updates to Note initialization and
the LaTeX handling would be required first.
2021-05-25 18:41:43 +10:00
Damien Elmes
02c7f7989e
support passing in a native notetype object to render_uncommitted_card()
2021-05-25 16:58:06 +10:00
Damien Elmes
52676f1555
fix a panic when browser encounters a filtered card outside filtered deck
...
the -99999 due date overflows the i32, yielding to a stuck interface
when running in a debug build
2021-05-25 13:44:42 +10:00
Damien Elmes
adcdb422c5
config updates by the frontend now skip undo by default
2021-05-24 14:50:46 +10:00