Damien Elmes
4fc701eb1b
fix fields/cards font size & too-large toolbar on high DPI Windows
...
- enable default_css on editor again, so that the html element
is set to the system font size. If this is bringing in unwanted styling,
maybe we can come up with a different solution that just adjusts the
fonts
- make toolbar size relative to html font size, instead of hard-coding
it
2021-05-20 13:15:17 +10:00
Damien Elmes
991695b7f6
use standard toolbar colors for legacy items
2021-05-19 19:58:12 +10:00
Damien Elmes
390379ed62
disable svelte-check on Windows for now
2021-05-19 11:45:02 +10:00
Henrik Giesel
30d246d74b
WIP: Use our components in deckoptions sticky bar
2021-05-18 16:32:29 +02:00
Henrik Giesel
777d774545
Use StickyBar in deckoptions
2021-05-18 14:13:11 +02:00
Damien Elmes
2dab3f0487
disable broken svelte_check test on Windows for now
...
Likely caused by a lack of sandboxing on Windows, causing the generated
.d.ts files to be visible to svelte_check, and being picked up in
preference over the .svelte file.
2021-05-08 12:15:49 +10:00
Henrik Giesel
cd6599c301
Fix module name formatting
2021-05-07 02:14:54 +02:00
Henrik Giesel
1e5feffba0
Fix Preview tooltip
2021-05-07 02:04:44 +02:00
Henrik Giesel
8a558eb297
Fix unused CSS selector issue in graphs introduced by updating Svelte
2021-05-07 02:04:44 +02:00
Henrik Giesel
fbc9c8a250
Use any in toolbar.ts for using context as parameter
2021-05-07 02:04:44 +02:00
Henrik Giesel
8f2c5a0c1c
Turn on editor:eslint
2021-05-07 02:04:44 +02:00
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
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
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
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
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
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
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
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
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
0abcb86007
Use registerShortcut in inputHandlers + Avoid focus on color picker
2021-04-22 15:09:09 +02:00
Henrik Giesel
469c138ec1
Add shortcut labels for ColorPicker and Latex items
2021-04-22 14:35:44 +02:00