Damien Elmes
7ef09375a6
Merge pull request #1086 from glutanimate/abort-addon-import-exception
...
Add an exception that allows add-ons to abort early
2021-03-23 19:28:13 +10:00
Damien Elmes
81467a436d
Merge pull request #1084 from hgiesel/svelte-hooks
...
Svelte "hooks" - Streamline method of getting async data
2021-03-23 19:22:46 +10:00
Damien Elmes
c90ab022c9
add hook to modify browser row content
2021-03-23 19:13:52 +10:00
Damien Elmes
3f03b5f06a
only declare rows deleted if they're the result of a NotFound error
...
If it's some other error like the DB suddenly becoming accessible,
we don't want to scare the user into thinking their data was deleted,
and we want to know what the error was without popping up tens of
message boxes for each row.
2021-03-23 19:04:15 +10:00
Damien Elmes
d7a577e3af
move browser_row method into search service
...
For want of a better place to put it. Also split the node conversion
into a separate file.
2021-03-23 18:55:05 +10:00
Damien Elmes
970543ee26
move activeCols into config/
2021-03-23 18:40:50 +10:00
Damien Elmes
2bffcba345
Merge pull request #1082 from RumovZ/backend-rows
...
Backend rows
2021-03-23 18:31:42 +10:00
Henrik Giesel
730d75a6c4
Satisfy svelte_check
2021-03-22 15:41:43 +01:00
Henrik Giesel
0a882175e5
Add type signatures to asyncReactive
2021-03-22 15:30:35 +01:00
Henrik Giesel
8bf68ea7ca
Satisfy formatter
2021-03-22 15:25:49 +01:00
Henrik Giesel
e973b555f3
Fix asyncReactive detection of loading
...
- Removed `success` store as it wouldn't work
- We should check for a value in error instead
2021-03-22 15:23:48 +01:00
Henrik Giesel
b52d05431d
Partially revert "Make sure RangeBox does not trigger update on stores on creation"
...
This reverts commit 8232e2f5ed .
2021-03-22 15:11:36 +01:00
Glutanimate
1adc4ae908
Add an exception that allows add-ons to abort early
2021-03-22 14:53:04 +01:00
Damien Elmes
15c76c1a09
switch DeckID to a NewType
...
Not sure at this point whether this will buy us much in the Python
codebase over a simple int alias, but let's give it a go.
2021-03-22 23:43:54 +10:00
Damien Elmes
fafe30f4b4
use perform_op() for deck creation
2021-03-22 23:17:07 +10:00
RumovZ
8b21c1ad7c
Use raw sort field text in note_field_str() ...
...
... instead of the preprocessed note.sort_field. That means we always
have to load the note with fields.
2021-03-22 12:12:52 +01:00
RumovZ
4c169106af
Return input if decode_entities() encounters error
2021-03-22 12:08:22 +01:00
Damien Elmes
12e1ca0c2f
deck rename with perform_op()
2021-03-22 20:38:51 +10:00
RumovZ
c5b8813b4e
Show tooltip on browser cells
...
Oftentimes, a cell's text is too long to be fully displayed inside the
table, so show it as a tooltip.
2021-03-22 09:31:07 +01:00
Damien Elmes
42d007d94d
use perform_op() for deck drag&drop
2021-03-22 18:23:56 +10:00
RumovZ
38f03650c9
Fix date_string using FixedOffset instead of Local
2021-03-22 08:50:54 +01:00
Henrik Giesel
12123fc68b
Remove assignment to preferencesPromise: getPreferences will only be called once
2021-03-22 04:03:52 +01:00
Damien Elmes
13255ed096
remove the default question fade
...
Fading was primarily motivated by wanting to prevent ugly redraw,
but we wait for both MathJax and images now.
2021-03-22 12:11:00 +10:00
Henrik Giesel
0368bac9be
Move async and asyncReactive to sveltelib
...
- sveltelib is a lib for component-agnostic svelte utils
2021-03-22 03:06:53 +01:00
Damien Elmes
815fd2df0b
delay scrolling to answer until images load
2021-03-22 12:05:18 +10:00
Henrik Giesel
c44340e761
Avoid duplicate initial fetching with asyncReactive
2021-03-22 02:58:19 +01:00
Henrik Giesel
8232e2f5ed
Make sure RangeBox does not trigger update on stores on creation
2021-03-22 02:50:16 +01:00
Henrik Giesel
8cb7d4a8ad
Create search and days writable in GraphsPage to allow browserSearch to work
2021-03-22 02:44:08 +01:00
Damien Elmes
095d655a50
fix .csv import not using faster QPlainTextEdit
2021-03-22 11:26:49 +10:00
Damien Elmes
2c76e70b32
fix text not appearing after .apkg import
2021-03-22 11:24:53 +10:00
Damien Elmes
b9421ac38b
fix note importing detecting changes due to unicode differences
...
https://forums.ankiweb.net/t/python-checksum-rust-checksum/8195/16
2021-03-22 10:56:24 +10:00
Henrik Giesel
c7a6665307
Fix syntax error introduced by rebase
2021-03-22 01:44:07 +01:00
Henrik Giesel
1e5bb2f226
Create BrowserSearch component, because we cannot read from stores within slotted content
2021-03-22 01:42:23 +01:00
Henrik Giesel
abdf8a464f
Remove pending, and resort to checking for value
...
- once value is set, it won't be unset
2021-03-22 01:42:23 +01:00
Henrik Giesel
6d2d40472d
Use preferencesPromise, as refreshing is handled over stores
2021-03-22 01:42:23 +01:00
Henrik Giesel
4468938dfd
Use $-assignments instead of store.set
2021-03-22 01:42:23 +01:00
Henrik Giesel
fbf2c6f6fc
Rename search and days to initialSearch and intitialDays in GraphsPage
2021-03-22 01:42:23 +01:00
Henrik Giesel
4ef0b3c977
Get it to work, if you change the input
...
- there's still an issue on initial load
2021-03-22 01:42:23 +01:00
Henrik Giesel
26d4854502
Compiles with WithGraphData
2021-03-22 01:42:23 +01:00
Henrik Giesel
c6ba8f779e
Move Graph-specific html from GraphsPage to Graph.svelte
2021-03-22 01:42:21 +01:00
Henrik Giesel
cfaf0e587b
Add WithGraphData
2021-03-22 01:40:51 +01:00
Henrik Giesel
aebb665164
Rename asyncRefresh to asyncReactive
2021-03-22 01:40:51 +01:00
Henrik Giesel
92658495ad
Improve implementation of asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
b0116aa3a9
Add (probably non-working) asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
159f6dc4e1
Add Svelte async hook
2021-03-22 01:40:51 +01:00
Damien Elmes
e437bec8bc
Merge pull request #1083 from hgiesel/pagesrestructure2
...
Move ticks.scss directly into Graph.svelte
2021-03-22 10:13:42 +10:00
Damien Elmes
3bb8848104
fix profile dumping on platforms other than Macs
...
https://github.com/ankitects/anki/pull/1082#issuecomment-803660818
2021-03-22 09:44:06 +10:00
RumovZ
0ca8434744
Fix card_due_str()
2021-03-21 21:18:56 +01:00
RumovZ
d07c7e1d94
Strip question from answer string
2021-03-21 21:17:38 +01:00
RumovZ
a1ea88bc67
Readd browser.model.getCard()
...
Actually, the new model has no truck with card objects, but since it may
hold an invalid id, it takes responsibility for catching the exception.
2021-03-21 18:44:31 +01:00