Commit graph

740 commits

Author SHA1 Message Date
Henrik Giesel
147617dff2 Add copyright header 2021-05-07 02:04:44 +02:00
Henrik Giesel
17bca7be6e Add ts-expect-error for module import in EditorToolbar 2021-05-07 02:04:44 +02:00
Henrik Giesel
bb2fb8e9f5 Fix ButtonDropdown 2021-05-07 02:04:44 +02:00
Henrik Giesel
0a979d789a Make LabelButtons support active notion 2021-05-07 02:04:44 +02:00
Henrik Giesel
95b6b386dc Only initialize extension apis if necessary 2021-05-07 02:04:44 +02:00
Henrik Giesel
d92a0c44c7 Add lefttopbtns as AddonButtons 2021-05-07 02:04:44 +02:00
Henrik Giesel
d3bec1a584 Add ButtonToolbarItem as interface for modifying button groups 2021-05-07 02:04:44 +02:00
Henrik Giesel
55e8256f0e Clean up ButtonGroup and factor out extension logic 2021-05-07 02:04:44 +02:00
Henrik Giesel
dd99524ae0 Enable setting of PreviewButton and hiding of cloze button again 2021-05-07 02:04:42 +02:00
Henrik Giesel
0612c3428b Fix typing issues 2021-05-07 02:03:55 +02:00
Henrik Giesel
47edde0d00 Set tooltip for buttons correctly 2021-05-07 02:03:55 +02:00
Henrik Giesel
74dad42df3 Use ButtonGroupItem for all buttons in editor 2021-05-07 02:03:55 +02:00
Henrik Giesel
68339ab0b0 Set ButtonPosition via ButtonGroupItem 2021-05-07 02:03:55 +02:00
Henrik Giesel
f724b45ae1 Add hiding functionality in ButtonGroup 2021-05-07 02:03:55 +02:00
Henrik Giesel
da5756822f Add API for adding new buttons, updating existing ones in ButtonGroup 2021-05-07 02:03:55 +02:00
Henrik Giesel
5f8f4c06f8 Fix issue with dropdowns 2021-05-07 02:03:55 +02:00
Henrik Giesel
deafb0925c Add .dropdown-menu class to DropdownMenu 2021-05-07 02:03:55 +02:00
Henrik Giesel
099325f407 Add back ColorButtons 2021-05-07 02:03:55 +02:00
Henrik Giesel
af7b1f7d7f Activate FormatBlockButtons 2021-05-07 02:03:55 +02:00
Henrik Giesel
805ef26e20 Add all format inline buttons 2021-05-07 02:03:55 +02:00
Henrik Giesel
35267f30c9 Export module functions from EditorToolbar 2021-05-07 02:03:55 +02:00
Henrik Giesel
e7706bac6d Refactor {CommandIcon,Icon,Square}Button into IconButton and WithState 2021-05-07 02:03:55 +02:00
Henrik Giesel
76ea48fade Make StickyBar flex 2021-05-07 02:03:55 +02:00
Henrik Giesel
45c52f75aa Translate ts files in ts/editor to svelte files 2021-05-07 02:03:55 +02:00
Henrik Giesel
8238ec5727 Rename editor-toolbar to components 2021-05-07 02:03:55 +02:00
Henrik Giesel
1515e07ea6 Add StickyBar.svelte WithTheming.svelte 2021-05-07 02:03:55 +02:00
Henrik Giesel
138e69bcf1 Move Notetype buttons to using slots instead of dynamic components 2021-05-07 02:03:55 +02:00
Henrik Giesel
a51eb42e7b Simplify structure of EditorToolbar and ButtonGroup in editor HTML file 2021-05-07 02:03:55 +02:00
Damien Elmes
a24456d96f fix missing keyboard modifier translations on Linux/Windows
https://forums.ankiweb.net/t/card-browser-hotkeys-semi-broken/9815
2021-05-07 09:30:06 +10:00
Damien Elmes
b4cb2baa0e fix properties missing from generated Svelte .d.ts files
They're currently being set to 'any', as we're not providing the dependencies
to the tsc invocation. Older Anki versions had the same issue, and we'll
want to fix that as well, but for now this at least restores the missing
props.
2021-05-04 18:55:58 +10:00
Damien Elmes
0d113fd447 i18n deckoptions; move some options into separate 'advanced' section 2021-04-26 23:34:58 +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
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
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