Commit graph

7483 commits

Author SHA1 Message Date
Damien Elmes
d76ef9cde5 update Rust deps
- tokio 1.0
- updated reqwest, thanks to Rumo
- other minor dep updates

the reqwest build file has been split into two, as it was awkward
to manually update the combined file, and the platform gate is now
on the target in rslib/
2021-04-27 22:18:12 +10:00
Damien Elmes
0d113fd447 i18n deckoptions; move some options into separate 'advanced' section 2021-04-26 23:34:58 +10:00
Damien Elmes
dca53ae1e2 Merge pull request #1156 from RumovZ/trigger-dec
Add separate no_arg_trigger decorator
2021-04-26 20:22:07 +10:00
Damien Elmes
7999682f6d defer bounds checking in SpinBox to focus loss
The previous behaviour was preventing a backspace to remove the
current text when a minimum of 1 or greater was supplied
2021-04-26 20:17:48 +10:00
RumovZ
8e0298120d Add separate no_arg_trigger decorator 2021-04-26 08:46:08 +02:00
Damien Elmes
532840bbfc Merge pull request #1154 from RumovZ/fix-skip-dec
Fix skip_if_selection_is_empty() for triggers
2021-04-26 09:21:42 +10:00
Damien Elmes
b2f56fff7c Merge pull request #1153 from hgiesel/goodbyewebcomp
Make EditorToolbar more similar to DeckOptions
2021-04-26 09:20:06 +10:00
RumovZ
7ac84a38d6 Remove some unnecessary lambdas 2021-04-25 19:51:57 +02:00
RumovZ
4b91c2b9f1 Fix skip_if_selection_is_empty() for triggers
It seems to be enough if one decorator calls pyqtSlot(), but to avoid
problems in the future, let's have all decorators do that.
2021-04-25 19:50:56 +02:00
Henrik Giesel
b0988e43e1 Move EditorToolbar API into EditorToolbar.svelte 2021-04-25 19:15:00 +02:00
Henrik Giesel
a21a4d330b Initialize editor toolbar via function, not web component 2021-04-25 18:32:01 +02:00
Damien Elmes
bd45967129 add translations for deck option warnings
+ cap maximum recommended review limit to 9999, since we don't allow
the user to set it higher
2021-04-25 23:06:35 +10:00
Damien Elmes
ddf7c5bb89 update translations 2021-04-25 22:06:05 +10:00
Damien Elmes
7aceb9fd3f subLabel->tooltip 2021-04-25 21:37:21 +10:00
Damien Elmes
9a25f8480d slide warnings in/out 2021-04-25 21:10:53 +10:00
Damien Elmes
68a4f4bade Merge pull request #1151 from RumovZ/no-sel-dec
Fix some problems with browser actions while selection is empty
2021-04-25 20:48:40 +10:00
Damien Elmes
1a6c5f594d enable the new deck options by default
- The old options are still available with a shift+click
- Translations still need updating
- See d8ca46e6e9 for some examples
of extending the screen in an add-on
2021-04-25 19:58:58 +10:00
Damien Elmes
e5264c909b use lodash instead of json in RevertButton 2021-04-25 19:34:07 +10:00
Damien Elmes
f3b344a571 fix error when user cancels out of set due date/reposition 2021-04-25 19:33:25 +10:00
Damien Elmes
d8ca46e6e9 experimental support for extending add-ons screen with Svelte 2021-04-25 19:33:18 +10:00
Damien Elmes
fdb814cbcd deckconfig->deckoptions 2021-04-25 19:02:30 +10:00
Damien Elmes
863fa972ef RevertIcon->RevertButton 2021-04-25 19:02:30 +10:00
RumovZ
f898f5507c Skip some browser methods if selection is empty
This was handled inconsistently before:
* Select Notes would throw a search error.
* Set Due Date would throw an exception.
* Dialogs with no effect would open.
* No-ops would be pushed to the undo queue.
2021-04-25 08:47:15 +02:00
RumovZ
8f37234373 Add dec to make methods no-op if no selection 2021-04-25 08:36:22 +02:00
Damien Elmes
d5c1f19521 basic support for add-ons in new deck config screen
- expose the data as a writable store
- currently only supports raw HTML; example to come
- fix changes not marking a deck config as modified
- the data is currently packed into the deckconfig object, but we
may move these to a separate store in the collection config in the
future, like is done with decks/notetypes
2021-04-24 11:08:01 +10:00
Damien Elmes
fcd1582adb Merge pull request #1150 from hgiesel/notetypechoose
Editor Toolbar cleanup
2021-04-24 11:04:24 +10:00
Henrik Giesel
6209731cd0 Prefer slicing and splicing 2021-04-24 01:48:22 +02:00
Henrik Giesel
79b16c1a96 Remove unused import 2021-04-24 01:32:02 +02:00
Henrik Giesel
f94c7f380f Fix typing typo 2021-04-24 01:15:16 +02:00
Henrik Giesel
438fcae263 Add addMenu and updateMenu, avoid using {buttons,menus}Promise outside of class 2021-04-24 01:08:55 +02:00
Henrik Giesel
a2ff598637 Remove addcards toolbar again for now 2021-04-24 00:10:45 +02:00
Henrik Giesel
9346e007c9 Add mostly working addcards topbar 2021-04-24 00:00:32 +02:00
Henrik Giesel
667db3c12e Simplify Handling of margins and padding of ButtonGroup & ButtonDropdown 2021-04-23 22:22:53 +02:00
Henrik Giesel
bf0ea46536 Simplify tag structure in ButtonGroup 2021-04-23 21:42:44 +02:00
Henrik Giesel
da230fbb24 Add simple version of Chooser buttons 2021-04-23 21:25:44 +02:00
Henrik Giesel
01b53a6be8 Make update algorithm in editor-toolbar/index.ts recursive 2021-04-23 20:50:09 +02:00
Henrik Giesel
e66edd3887 Reduce typing overhead in ts/editor-toolbar/index.ts and export buttonGroup 2021-04-23 19:05:43 +02:00
Henrik Giesel
aebaaf1a70 Add IterableToolbarItem interface for easier typing 2021-04-23 18:53:52 +02:00
Henrik Giesel
14d3877bb4 Fix regression from eefdd564e2
Negative indices were not treated correctly (as offset from end)
2021-04-23 18:21:03 +02:00
Henrik Giesel
9e952e428e Use rawButton in browser.py 2021-04-23 17:34:42 +02:00
Henrik Giesel
5acf330414 Add withLabel component 2021-04-23 17:20:52 +02:00
Henrik Giesel
59f0a2dd70 Make dynamicComponents usable for addons, rather than the components directly
rawButton({ html: ... })

instead of

{ component: RawButton, html: ... }
2021-04-23 16:43:36 +02:00
Damien Elmes
68d35835de onDestroy must be called from top level 2021-04-23 20:25:47 +10:00
Damien Elmes
c78bcebcf6 make return value match mergeTooltipAndShortcut() signature 2021-04-23 19:48:36 +10:00
Damien Elmes
eefdd564e2 remove nested terneries and enable lint
@hgiesel would you mind quickly checking I've correctly captured
the logic here?
2021-04-23 13:00:18 +10:00
Damien Elmes
5e37cb7561 move isApplePlatform() into lib/shortcuts, and remove sveltelib file 2021-04-23 11:22:30 +10:00
Damien Elmes
fba4b7ac24 use new registerShortcut() fuction in DeckConfigPage 2021-04-23 11:20:12 +10:00
Damien Elmes
56165d6374 bump rules_nodejs version 2021-04-23 11:11:47 +10:00
Damien Elmes
8ac8434eee Merge pull request #1149 from hgiesel/renameankitolib
Rename anki/ to lib/ for export
2021-04-23 10:18:33 +10:00
Damien Elmes
61dfa02b88 update remaining anki/ references 2021-04-23 10:16:40 +10:00