Damien Elmes
77c0f0effd
add missing copyright headers to *.rs
2021-04-13 18:59:16 +10:00
Damien Elmes
926fc2e492
add missing copyright headers to *.py
2021-04-13 18:45:35 +10:00
RumovZ
d58af0dd95
Merge branch 'master' into backend-columns
2021-04-11 11:18:15 +02:00
RumovZ
531e08a711
Remove from_config variant in pb SortOrder
...
Instead, fetch the config order on the frontend and pass a builtin
variant into the backend.
That makes the following unnecessary:
* Resolving the config sort in search/mod.rs
* Deserializing the Column enum
* Config accessors for the sort columns
2021-04-10 11:13:42 +02:00
RumovZ
94d52de9da
Store active browser columns in col state
2021-04-09 22:53:02 +02:00
RumovZ
3b23248983
Remove pb SortKind enum and use pb Columns instead
2021-04-09 18:50:30 +02:00
RumovZ
93c6e258aa
Merge SortKind enum into Column enum
2021-04-09 18:03:29 +02:00
RumovZ
e28f2320b8
Unify state columns
...
* Remove duplicate backend columns
* Remove duplicate column routines
* Move columns on frontend from state to model
* Generate available columns from Colum enum
* Add second column label for notes mode
2021-04-08 23:48:24 +02:00
RumovZ
8c499ed5bf
Rename columns for future mode-independent use
2021-04-08 23:43:48 +02:00
RumovZ
d7e0da3786
Remove Column class and use pb class instead
2021-04-08 11:17:25 +02:00
RumovZ
7ea1dbd4a4
Move BrowserColumn into BrowserColumns message
2021-04-08 10:16:06 +02:00
RumovZ
3c84749973
Use backend column objects on frontend
2021-04-06 19:47:03 +02:00
Damien Elmes
ae7a327cae
current deck change is now undoable
...
- make sure we set flag in changes when config var changed
- move current deck get/set into backend
- set_config() now returns a bool indicating whether a change was
made, so other operations can be gated off it
- active decks generation is deferred until sched.reset()
2021-04-06 21:52:06 +10:00
Damien Elmes
1b81653e0e
update scheduling ops
...
- migrate to CollectionOp()
- return actual change count when suspending/burying
- add helper to convert vec to vec of newtype
2021-04-06 16:38:42 +10:00
Damien Elmes
783e0ec224
update note ops
...
remove_note() now returns the count of removed cards, allowing us
to unify the tooltip between browser and review screen
I've left the old translation in - we'll need to write a script at
one point that gathers all references to translations in the code,
and shows ones that are unused.
2021-04-06 14:56:36 +10:00
Damien Elmes
c3b0fb35b7
more perform_op() tweaks
...
- pass the handler directly
- reviewer special-cases for flags and notes are now applied at
call site
- drop the kind attribute on OpChanges which is not needed
2021-04-06 10:14:11 +10:00
Damien Elmes
18ba5554ca
undo support for tag collapse; expand->collapse for consistency w/ decks
2021-04-05 11:47:12 +10:00
Damien Elmes
dc5b900056
add routine to set deck collapse state
...
Updating a deck via protobuf is now exposed on the backend, but not
currently on the frontend - I suspect we'll be better off writing
separate routines for the actions we need instead, and we get a better
undo description for free.
This is currently causing an ugly redraw in the browse screen, which
will need fixing.
2021-04-05 11:19:04 +10:00
Damien Elmes
510f24bf93
embed deck config and expose to frontend
2021-04-04 22:52:53 +10:00
Damien Elmes
3d1ddf9762
embed deck messages
2021-04-04 21:41:16 +10:00
Damien Elmes
b10e8dd347
expose read-only access to new notetype objects
2021-04-04 20:45:37 +10:00
Damien Elmes
282ae2285a
expose read-only access to new deck objects
2021-04-04 20:39:56 +10:00
Damien Elmes
cb9d5b9f28
simplify errors
...
- use a flat enum instead of oneof messages, most of which were empty
- tidy up the Python side
2021-04-03 16:06:46 +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
b2bfd940e7
move filtered deck labels to backend
...
- use strum to generate an iterator for the protobuf enum so we don't
forget to add new labels if extending in the future
- no add-ons appear to be using dynOrderLabels(), so it has been removed
@RumovZ perhaps a similar approach might work for listing the available
browser columns as well?
2021-04-01 23:53:38 +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
RumovZ
880e6dc651
Add browser column enum for backend
2021-03-30 11:59:52 +02:00
RumovZ
0eb35216d0
Move order docstring back into find_cards()
2021-03-29 12:03:31 +02:00
Damien Elmes
3d11e74774
List->Sequence in a bunch of table/browser methods
...
Most code doesn't require a list specifically, and build a list
is an extra step.
2021-03-29 16:48:33 +10:00
Damien Elmes
165c90824b
avoid rebuilding card/note id list when searching
2021-03-29 16:25:55 +10:00
RumovZ
1f79a8766d
squash merge browser refactor
...
Closes #1100
2021-03-29 16:14:54 +10:00
Damien Elmes
d793c30526
switch NoteType to Notetype
...
When used as a variable, we were typically calling it a 'notetype', not
a 'note type'.
2021-03-27 22:03:19 +10:00
Damien Elmes
b251843da6
add Dict suffix to Dict aliases in models.py
2021-03-27 21:46:49 +10:00
Damien Elmes
6b72aaf8c2
ID -> Id in protobuf and Python
...
follow-up to a90d5aa359
2021-03-27 21:38:20 +10:00
Damien Elmes
2338998304
update to the latest rules_rust + security framework update
2021-03-27 19:28:19 +10:00
Damien Elmes
4676d2f3b1
drop the legacy enum from rslib, and pass separate module/message idx
2021-03-27 11:56:31 +10:00
Damien Elmes
cf32bb034a
update remaining TR references in rslib
2021-03-27 11:18:34 +10:00
Damien Elmes
d7005803bc
update 1 arg tr strings in rslib
2021-03-27 10:39:53 +10:00
Damien Elmes
51f5df600f
update no-arg TR references in rslib/
2021-03-26 23:16:08 +10:00
Damien Elmes
0006a385e1
allow js to request specific i18n modules
...
Brings the payload on the congrats page with a non-English language
down from about 150k to 15k
2021-03-26 21:43:36 +10:00
Damien Elmes
7a7cb7402d
update most no-arg TR references in *.svelte
2021-03-26 19:13:30 +10:00
Damien Elmes
1ed1902933
update TR references with args in *.svelte
2021-03-26 19:13:30 +10:00
Damien Elmes
0e50259e6b
update TR references with args in *.ts; fix average answer time
2021-03-26 19:10:39 +10:00
Damien Elmes
2ab7a30b7b
convert no-arg TR references to method invocations in *.ts
2021-03-26 19:10:27 +10:00
Damien Elmes
d7bef83f98
add types to some more Fluent variables
2021-03-26 16:52:54 +10:00
Damien Elmes
afdca58e31
declare variables with some common names as int instead of a union
2021-03-26 16:33:53 +10:00
Damien Elmes
3d0e5248aa
update TR references that crossed multiple lines
2021-03-26 14:38:15 +10:00
Damien Elmes
5d164bea7f
update TR references that contain arguments
2021-03-26 14:21:04 +10:00
Damien Elmes
1df14f7c9c
update no-arg tr references in qt/
2021-03-26 13:48:26 +10:00
Damien Elmes
568bd54a61
update some more TR references in pylib; update tr_legacyglobal
2021-03-26 13:33:46 +10:00