Commit graph

706 commits

Author SHA1 Message Date
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
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
e5264c909b use lodash instead of json in RevertButton 2021-04-25 19:34:07 +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
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
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
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
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
61dfa02b88 update remaining anki/ references 2021-04-23 10:16:40 +10:00
Henrik Giesel
31eaeef09b Rename anki/ to lib/ for export
import _ from "anki/x";

will become

import _ from "lib/x";

to fit the directory name.
2021-04-23 10:02:28 +10:00
Damien Elmes
628f337c3c Merge pull request #1148 from hgiesel/updatetypescript
Update Typescript to 4.2.4
2021-04-23 09:48:34 +10:00
Damien Elmes
ca74b25481 Merge pull request #1146 from hgiesel/shortcuts
Shortcut API for Editor
2021-04-23 09:44:01 +10:00
Henrik Giesel
ed602146df Update eslint to 4.22.0 2021-04-22 19:19:39 +02:00
Henrik Giesel
4b7e7bbdb1 Import createPatch in ts/sql_format directly 2021-04-22 18:43:35 +02:00
Henrik Giesel
697fa4ed9a Update Typescript to 4.2.4 2021-04-22 18:33:42 +02:00
Henrik Giesel
90a6024dff Separate type import for WithShortcut 2021-04-22 18:19:09 +02:00
Henrik Giesel
d4e6fe6a34 Prefer optionalModifiers over register multiple shortcuts 2021-04-22 18:15:25 +02:00
Henrik Giesel
4ebad6f173 Add optionalModifiers parameter to registerShortcut 2021-04-22 17:28:38 +02:00
Henrik Giesel
33fc648695 Add license headers 2021-04-22 16:49:30 +02:00
Henrik Giesel
363469dc36 Satisfy formatter 2021-04-22 15:24:27 +02:00
Henrik Giesel
0abcb86007 Use registerShortcut in inputHandlers + Avoid focus on color picker 2021-04-22 15:09:09 +02:00
Henrik Giesel
2477684e1c Fix typo deregisters 2021-04-22 14:54:29 +02:00
Henrik Giesel
469c138ec1 Add shortcut labels for ColorPicker and Latex items 2021-04-22 14:35:44 +02:00
Henrik Giesel
e68d019b19 Add better better shortcutLabel support for buttons 2021-04-22 14:18:48 +02:00
Damien Elmes
c7c81c8f15 override some bootstrap styles for night mode
There's probably a better way to accomplish this - fixes welcome!

Also fix the page reloading when enter hit inside the modal.
2021-04-22 21:57:32 +10:00
Henrik Giesel
ffb0fd67e5 Add editing fluent strings without attached keyboard shortcuts 2021-04-22 13:38:37 +02:00
Henrik Giesel
7c2ac1fd37 Add getPlatformString for making shortcuts to platform string 2021-04-22 13:04:24 +02:00
Damien Elmes
d3d083651f catch ctrl/cmd+enter to save settings 2021-04-22 19:54:57 +10:00
Damien Elmes
80689d319a move top padding into sticky area to prevent movement 2021-04-22 19:54:50 +10:00
Damien Elmes
6d4c9994a8 disable overscroll on html as well 2021-04-22 19:54:44 +10:00
Damien Elmes
84eea8dbb9 more layout tweaks
- reduce maximum width
- de-emphasise revert and info buttons
- reduce grid margin
2021-04-22 18:11:27 +10:00