Commit graph

7770 commits

Author SHA1 Message Date
Damien Elmes
0b6beaa1da 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
2044ed7f31 remove deck config and notetype protobuf from frontend
Not yet used by anything yet, and we may want to use native classes
for these instead, like is done for Notes and Cards. Decks to follow.
2021-05-31 16:27:58 +10:00
Damien Elmes
3d0a3a5707 fix exporting of non-default deck configs 2021-05-31 16:27:58 +10:00
Damien Elmes
7108d8615b Merge pull request #1202 from hgiesel/nowrapdeckoptionstoolbar
Uniformly use properties to Button{Toolbar,Group} for setting button properties
2021-05-29 10:39:11 +10:00
Damien Elmes
c0020da00d Merge pull request #1206 from RumovZ/fix-sidebar
Fix some sidebar issues
2021-05-29 10:33:52 +10:00
Damien Elmes
8730e98778 Merge pull request #1200 from RumovZ/template-checks
Template checks
2021-05-29 10:28:06 +10:00
Damien Elmes
7465949364 update esbuild-toolchain for arm64 2021-05-29 10:14:23 +10:00
Damien Elmes
68dc4114c2 Merge pull request #1205 from qubist-pixel-ux/patch-1
Update CONTRIBUTORS
2021-05-29 10:12:39 +10:00
Henrik Giesel
1caf7ada72 Add overflow-x: hidden for SelectButton 2021-05-28 21:33:34 +02:00
RumovZ
0297a698e8 Fix renaming of unused tag
Unused tags can't be renamed, but since the CollectionOp returns success
in any case, the provisionally renamed sidebar item needs to be reset.
2021-05-28 19:18:21 +02:00
RumovZ
f443058209 Prevent sidebar toolbar from folding
If there is little space, Qt replaces some tools of the toolbar with an
expandable menu indicated by an arrow. But this arrow is invisible in
night mode.
2021-05-28 18:09:44 +02:00
RumovZ
99bc3c698f Fix restoring current sidebar element for cards 2021-05-28 17:46:46 +02:00
RumovZ
36c8ca32be Use HashSet for special fields 2021-05-28 15:42:09 +02:00
qubist-pixel-ux
6080fbcad1 Update CONTRIBUTORS 2021-05-28 16:27:22 +05:30
RumovZ
f2f5eb8b6f Add const for special fields and doc 2021-05-28 11:58:46 +02:00
RumovZ
b1dbebb1a6 Allow empty field name in templates 2021-05-28 11:37:05 +02:00
Damien Elmes
098acaf665 round to whole seconds
the steps are serialized as f32, and the resulting imprecision was
leading to decimal values

closes #1203
2021-05-28 19:34:25 +10:00
Damien Elmes
8ca1360f38 allow running test with 'bazel run jest' 2021-05-28 19:24:58 +10:00
Damien Elmes
85c5860426 remove sticky setting from fields dialog
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/60
2021-05-28 18:33:29 +10:00
Damien Elmes
be707ea5e8 make update all toggle clearer
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/59

+ remove background color; it did not look good in dark mode
2021-05-28 18:33:28 +10:00
RumovZ
613320aca3 Adjusts tests to pass new template checks 2021-05-28 10:08:55 +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
Damien Elmes
c848a0a41b slightly simplify transact_inner() 2021-05-28 14:45:36 +10:00
Damien Elmes
f26982b9b1 don't depend on timer to increment between ops in unit test 2021-05-28 11:43:24 +10:00
Damien Elmes
ceb2813d5d 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
Henrik Giesel
054f96b726 Uniformly use variables to Button{Toolbar,Group} for setting button properties
Instead of using WithTheming around ButtonToolbar/ButtonGroup
2021-05-27 17:13:36 +02:00
RumovZ
d55f41669c Use implicit failure handling and self as parent 2021-05-27 16:51:03 +02:00
RumovZ
25b6d4e31c Escape braces in fluent string 2021-05-27 16:46:33 +02:00
Damien Elmes
b0bde454ff add v3 scheduler to prefs screen 2021-05-27 23:09:49 +10:00
Damien Elmes
3ac06ea949 remove 'update later' button 2021-05-27 22:42:21 +10:00
Damien Elmes
2812c0c9bb tweak wording of full sync message 2021-05-27 22:42:10 +10:00
RumovZ
3bb9967574 Apply suggestions from code review
Tweak wording of template check errors.

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2021-05-27 13:40:33 +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
Damien Elmes
de5e393b66 fix remembered tags not being applied to next added note
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/56
2021-05-27 13:18:34 +10:00
Damien Elmes
6f198d73ef ask user to confirm which deck they want when opening options in reviewer
Also fixes https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/57
2021-05-27 13:15:28 +10:00
Damien Elmes
b810ee4b3b next_states() didn't need to be public 2021-05-26 15:12:48 +10:00
Damien Elmes
656a73504d update translations 2021-05-26 14:41:39 +10:00
Damien Elmes
4a575dbe0a hook up some missing translations in deck options screen 2021-05-26 14:41:18 +10:00
Damien Elmes
6a823e53a1 add option to clone current config 2021-05-26 13:20:24 +10:00
Damien Elmes
52a98ce0ce change get_queued_cards() to no longer return congrats info 2021-05-26 12:59:45 +10:00
Damien Elmes
ce9e1c3370 roll back sass for now to quieten deprecation warnings
https://github.com/twbs/bootstrap/issues/34051
2021-05-26 10:20:34 +10:00
Damien Elmes
3b2b3fd010 Merge pull request #1198 from ankitects/ts-deps
update ts deps + formatting
2021-05-26 10:14:42 +10:00
Damien Elmes
3489257f41 update ts deps
- prettier's formatting has changed, so files needed to be reformatted
- dart is spitting out deprecation warnings like:

254 │   2: $spacer / 2,
    │      ^^^^^^^^^^^
    ╵
    bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6  @import
    ts/sass/button_mixins.scss 2:9                                          @use
    ts/components/ColorPicker.svelte 2:5                                    root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter-width, 2)
2021-05-26 09:37:40 +10:00
Damien Elmes
87cfd51cfa update rules_nodejs 2021-05-26 09:12:23 +10:00
Damien Elmes
30714c858d Merge pull request #1196 from hgiesel/csscleanup
Use TextInputModal directly
2021-05-26 08:48:16 +10:00
Henrik Giesel
a819fa6abe Satisfy svelte_check 2021-05-26 08:46:12 +10:00
Henrik Giesel
e21947956f Fix TextInputModal preset value 2021-05-26 08:46:12 +10:00
Henrik Giesel
9e02d3a92c Use TextInputModal directly from svelte component
* the only important thing is that it is not positioned within elements
  with display: none
* I think we can treat the existence of the modal to be a kind of
  "precondition" that has to be met for the component to be used
2021-05-26 08:46:12 +10:00
Henrik Giesel
a55ab8e03a Inline some bootstrap-dark styling 2021-05-26 08:40:00 +10:00