Commit graph

7385 commits

Author SHA1 Message Date
Henrik Giesel
29fef178d8 Add copyright headers 2021-04-20 15:43:59 +02:00
Henrik Giesel
282d9df02e Remove last ts-expect-error 2021-04-20 15:41:26 +02:00
Henrik Giesel
6e2f2fc3a6 Move toolbar initialization into toolbar.ts 2021-04-20 15:32:02 +02:00
Henrik Giesel
f11db5579e Move dynamic component initialization logic from editor to editor-toolbar 2021-04-20 14:23:28 +02:00
Henrik Giesel
94eb3af662 Improve behavior of paragraph command and add tooltip 2021-04-20 13:46:01 +02:00
Henrik Giesel
973b7008b7 Make indent outdent only work for list items
+ make paragraph show its active state
2021-04-20 13:44:44 +02:00
Henrik Giesel
5e978b28d4 Move button implementations from editor-toolbar to editor 2021-04-20 13:44:44 +02:00
Henrik Giesel
93136030e9 Include editor-toolbar as a library in editor 2021-04-20 13:44:44 +02:00
Henrik Giesel
85ea209d06 Generalize commandIconButton functionality of setting active state 2021-04-20 13:44:44 +02:00
Henrik Giesel
96bd5c7b20 Add paragraph button 2021-04-20 13:44:44 +02:00
Henrik Giesel
3adcad4ca3 Don't use <br>s when inside of paragraph 2021-04-20 13:44:44 +02:00
Henrik Giesel
ece4f75592 Generalize inListItem to getAnchorElement 2021-04-20 13:44:43 +02:00
Henrik Giesel
a3a085249d Add CSS for making empty paragraph elements visible 2021-04-20 13:44:43 +02:00
Damien Elmes
d54151aef7 update translations 2021-04-20 21:41:10 +10:00
Damien Elmes
9e1b4280c4 use "decrease indent" instead of "outdent" 2021-04-20 21:40:52 +10:00
Damien Elmes
04f0adb847 fix Find Dupes activation 2021-04-20 21:13:21 +10:00
Damien Elmes
f61920e7ed Merge pull request #1139 from hgiesel/toolbarfixes
Fix ButtonDropdown not hiding when closed
2021-04-20 19:54:51 +10:00
Damien Elmes
2fd7e8539d change detection needs to ignore collection mtime bump 2021-04-20 19:52:47 +10:00
Damien Elmes
293cbfb024 check if deck changed before saving 2021-04-20 19:50:31 +10:00
Damien Elmes
48fc9251bd implement deck config saving on JS end 2021-04-20 19:50:05 +10:00
Damien Elmes
de5f892807 allow postrequest to send a binary body; fix WithGraphData
As far as I can tell, the existing code was transforming the encoded
protobuf data into UTF8, and we're just lucky it wasn't causing problems
with the small message we were sending.
2021-04-20 17:47:52 +10:00
Damien Elmes
c5cecabdd4 include sourcemaps for pages/* in dev builds 2021-04-20 17:33:46 +10:00
Damien Elmes
05f75c6194 implement deck config updating 2021-04-20 14:57:44 +10:00
Henrik Giesel
5550dc8e44 Hide ButtonDropdown when closed
Otherwise ul.{svelte-class} in ButtonGroup has higher priority then .show from Bootstrap
2021-04-19 14:47:10 +02:00
Damien Elmes
4eaddde127 remove some imports duplicated by prelude 2021-04-19 18:22:43 +10:00
Damien Elmes
e287ebe988 Merge pull request #1138 from RumovZ/introduced
Add search keyword for "first review in x days"
2021-04-19 18:22:15 +10:00
RumovZ
d4d48676ad Use arg name instead of repeating it in format!() 2021-04-19 08:58:33 +02:00
RumovZ
af1111a91e Use timestamp adding for writing cutoff 2021-04-19 08:44:13 +02:00
RumovZ
e1e25d2b6a Add sql condition for speedup in write_introduced 2021-04-19 08:43:32 +02:00
RumovZ
eb9fbb9c0f Add sidebar filter "first review today" 2021-04-18 13:27:10 +02:00
RumovZ
f514697a90 Add sqlwriter test for introduced 2021-04-18 12:32:02 +02:00
RumovZ
6cfccf63bd Add cutoff_in_secs_from_days() helper method 2021-04-18 12:25:44 +02:00
RumovZ
27b658fc02 Add search keyword introduced
Filters for cards that had their first review within the last x days.
2021-04-18 12:14:18 +02:00
Damien Elmes
363a843d07 tidy up Rust imports
rustfmt can do this automatically, but only when run with a nightly
toolchain, so it needs to be manually done for now - see rslib/rusfmt.toml
2021-04-18 18:38:54 +10:00
Damien Elmes
06dea7aa0a start on making deck config and schema/mod changes undoable
+ move timestamps into a struct in a separate file for convenience
2021-04-18 17:33:12 +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
9b78411717 Merge pull request #1135 from RumovZ/deck-name
Add newtype NativeDeckName
2021-04-18 17:32:46 +10:00
RumovZ
6b5a73d3e7 Maybe normalize name when preparing deck update 2021-04-18 09:16:43 +02:00
RumovZ
6864cdb62e Remove redundant imports 2021-04-18 08:43:46 +02:00
Damien Elmes
6eb28909da as_str() -> as_native_str() 2021-04-18 09:33:39 +10:00
Damien Elmes
eece6125d8 hide NativeName inner value, and require explicit accessors 2021-04-18 09:29:35 +10:00
Damien Elmes
e0cf897104 create_missing_parents() can take a native name directly 2021-04-18 09:20:23 +10:00
RumovZ
32edd2b554 Give deck.name the newtype NativeDeckName
The deck name must be constructed by calling associated functions of
NativeDeckName, unless the name is guaranteed to be valid machine
name (like "Default").
NativeDeckName exposes methods to mutate the deck name and return
the human name.
The storage routines take &strs, but those should be slices of
NativeDeckNames to ensure machine form and normalization.
2021-04-17 22:47:04 +02: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