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
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
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
84eea8dbb9
more layout tweaks
...
- reduce maximum width
- de-emphasise revert and info buttons
- reduce grid margin
2021-04-22 18:11:27 +10:00
Damien Elmes
fcf6ad954f
add a workaround for bad save button in rtl mode
...
Bootstrap provides a different set of CSS for RTL languages, but having
to deal with two separate sets of css files depending on the language
would be a PITA.
2021-04-22 17:45:16 +10:00
Damien Elmes
d0ade13654
fix add/rename dialog right-aligning, and RTL issue
2021-04-22 17:31:33 +10:00
Damien Elmes
3b86fbe454
fill width when steps exceed 2; add bottom margin
2021-04-22 17:28:14 +10:00
Damien Elmes
1a8da843c6
allow checkboxes and select entries to take up whole line
2021-04-22 16:47:10 +10:00
Damien Elmes
779bc4953a
switch config to a grid; move info to popups
2021-04-22 15:39:50 +10:00
Damien Elmes
ab5c32abfd
fix select appearance inside webview
2021-04-22 11:41:41 +10:00
Damien Elmes
b175ba9d72
minor layout tweaks to deck conf screen
...
- more space for dropdown
- limit width of main area so popups wrap correctly
- experiment with different colour dropdown
2021-04-22 11:33:27 +10:00
Damien Elmes
a7ef410615
hook new deck config screen up behind an env var
2021-04-22 10:59:16 +10:00
Damien Elmes
48fc9251bd
implement deck config saving on JS end
2021-04-20 19:50:05 +10:00
Damien Elmes
05f75c6194
implement deck config updating
2021-04-20 14:57:44 +10:00
Damien Elmes
fc419e3b81
tweak deckconfig top area formatting
...
I suspect there's a better way to ensure selector and save button are
shown on the same line on both large and small widths; PRs are welcome.
2021-04-18 17:33:12 +10:00
Damien Elmes
1f0ff0f22d
add schema change prompt to removal, tweak return struct
2021-04-18 17:33:12 +10:00
Damien Elmes
3aa1d8bab9
move daily limits into separate section; add extra warning+tweak formatting
2021-04-18 00:04:02 +10:00
Damien Elmes
75205948b3
apply spinbox limits on each keystroke
2021-04-18 00:03:02 +10:00
Damien Elmes
20d1a3d1b1
avoid showing the strings twice
...
While it can help to show the link between the settings, having multiple
sections change at once feels a bit over the top
2021-04-17 22:56:55 +10:00
Damien Elmes
0f741912b6
add text to describe deckconfig warnings
2021-04-17 22:53:47 +10:00
Damien Elmes
e825a77ddd
update config automatically, and update parent limits at same time
2021-04-17 21:44:33 +10:00
Damien Elmes
dbf31d6748
add some unit tests to deckconfig
2021-04-17 21:00:10 +10:00
Damien Elmes
f89d7b2b1e
add a hack to avoid Long.js in Jest tests
2021-04-17 17:05:48 +10:00
Damien Elmes
c0e615ddde
support es6 imports in Jest tests
...
Switching to lodash-es caused Jest to fail. The standard Jest workflow
would be to transpile things with Bazel, but we can do it faster by
bundling with esbuild.
the log in lib.test.ts has revealed numbers are being set as Long instead
of JS numbers, and the published workaround for it is not working :-(
2021-04-17 16:38:45 +10:00
Damien Elmes
0645cb29b7
fix parent limit handling
...
We can't calculate it on the backend, as adjusting a config may alter
the parent limit.
Also fix hidden deck name and missing separator.
2021-04-17 12:53:59 +10:00
Damien Elmes
168af33aa8
add macro for invoking Jest
2021-04-16 23:46:31 +10:00
Damien Elmes
72193c45ec
more experimental updates to deck config screen
...
- try out bootstrap modals - they're not perfect, but let's see how
they go for now. Won't be hard to switch to bridge commands if required.
- handle adding/renaming/removing
- add a class to manage the state
2021-04-16 23:29:21 +10:00
Henrik Giesel
5c601db45f
Fix most of svelte-check issues for editor-toolbar
2021-04-15 13:09:51 +02:00
Damien Elmes
c046ce1c26
move bootstrap into ts/sass
2021-04-15 16:10:01 +10:00
Damien Elmes
cc91868092
move esbuild into separate repo
...
Most of our changes have been upstreamed, but the toolchain change
probably won't be merged soon, and a separate git repo will make it
easier to track upstream changes.
@hgiesel output_css=True will need to be changed to output_css="foo.css"
instead
2021-04-15 10:53:49 +10:00
Damien Elmes
ac045e9e3f
fix initial ease not being updated
2021-04-14 23:01:03 +10:00
Damien Elmes
57a1651113
deck config prototype work in progress
...
Still in the early stages, and not hooked up yet.
2021-04-14 22:33:10 +10:00