Damien Elmes
605ad1c9ee
remove unnecessary setMod() calls
2021-03-10 11:47:53 +10:00
Damien Elmes
57d7e3e2ab
commit immediately when there's no active checkpoint
...
Reviews and operations on the backend that support undoing can now be
committed immediately, so they will not be lost in the event of a crash.
This required tweaks to a few places:
- don't set collection mtime on save() unless changes were made in
Python, as otherwise we end up accidentally clearing the backend undo
queue
- autosave() is now run on every reset()
- garbage collection now runs in a timer, instead of relying on
autosave() to be run periodically
2021-03-10 11:47:53 +10:00
Damien Elmes
40aff4447a
undo support for note adding
2021-03-10 11:47:53 +10:00
Damien Elmes
105ce94dd4
undo unbury/unsuspend
2021-03-10 11:47:53 +10:00
Damien Elmes
77e4526718
fix notes being saved indiscriminately
...
caused by a commit a few days ago:
f61827657630ec0e6bbc5ca58c1a5ca131aede56
2021-03-10 11:47:53 +10:00
Damien Elmes
41779c1aad
implement bury/suspend undo
2021-03-10 11:47:53 +10:00
Damien Elmes
b466f0ce90
rework undo
...
- use dataclasses for the review/checkpoint undo cases, instead of the
nasty ad-hoc list structure
- expose backend review undo to Python, and hook it into GUI
- redo is not currently exposed on the GUI, and the backend can only
cope with reviews done by the new scheduler at the moment
- the initial undo prototype code was bumping mtime/usn on undo, but
that was not ideal, as it was breaking the queue handling which expected
the mtime to match. The original rationale for bumping mtime/usn was
to avoid problems with syncing, but various operations like removing
a revlog can't be synced anyway - so we just need to ensure we clear the
undo queue prior to syncing
2021-03-10 11:47:53 +10:00
Damien Elmes
67c490a8dc
support undoing deck mutations
...
This required refactoring the deck code a bit to split up the 'update'
and 'add' cases better.
2021-03-10 11:47:53 +10:00
Damien Elmes
c9eeb91e0a
initial work on undoing reviews+burying siblings
...
- fetch sfld and csum when fetching notes, to make it cheaper
to write them back out unmodified
- make `fields` private, and access it via accessors, so we can
still catch when fields have been mutated without calling
prepare_for_update()
- fix python importing code passing a string in as the checksum
2021-03-10 11:47:53 +10:00
Damien Elmes
359d0bc331
use native struct for QueuedCard
2021-03-10 11:47:53 +10:00
Damien Elmes
b9c4b2bdbe
Merge pull request #1046 from hgiesel/sticky
...
Sticky icons in the editor window
2021-03-10 11:43:51 +10:00
Damien Elmes
1e7405296f
Merge pull request #1050 from BlueGreenMagick/choose-addon-to-update
...
Choose addon to update
2021-03-10 11:41:50 +10:00
Damien Elmes
7e14f72121
bump version
2021-03-10 11:11:45 +10:00
Damien Elmes
8eebfe18a2
update translations
2021-03-10 10:46:34 +10:00
bluegreenmagick
4cde93ed74
don't show routine update when not update_enabled
2021-03-09 22:27:28 +09:00
bluegreenmagick
29076ec9ec
add context menu to open ankiweb page
2021-03-09 22:19:03 +09:00
bluegreenmagick
c11feda0eb
add bool_to_check and checked method
2021-03-09 22:19:03 +09:00
bluegreenmagick
01d8dc20f1
fix check issues in ChooseAddonsToUpdateList
2021-03-09 22:19:03 +09:00
bluegreenmagick
e73e0bec34
save chooseaddonupdate check state
2021-03-09 22:19:03 +09:00
Henrik Giesel
2905881dcf
Fix another import
2021-03-09 14:02:41 +01:00
Henrik Giesel
475b1968d0
Fix reversed sticky icon logic
2021-03-09 13:44:06 +01:00
Henrik Giesel
acb912697e
Satisfy formatter
2021-03-09 13:43:11 +01:00
Henrik Giesel
b5362e99c0
Change to pin icon
2021-03-09 13:43:11 +01:00
Henrik Giesel
9e557bb0c1
Switch to bi-sticky icons, toggle opacity for state indiciation
2021-03-09 13:43:11 +01:00
Henrik Giesel
e03bfd2923
Refactor bridgeCommand and silence false "uncaught msg" log
2021-03-09 13:43:11 +01:00
Henrik Giesel
25d7d80e20
Switch back to pin icons, use fill/unfilled versions
2021-03-09 13:43:11 +01:00
Henrik Giesel
fee4667e32
Place sticky icons at the far right end of the labelContainer
2021-03-09 13:43:11 +01:00
Henrik Giesel
cd26901f3d
Make sure topleft buttons are rounded too, prefer Bootstrap's rounded class
2021-03-09 13:43:11 +01:00
Henrik Giesel
6fbd82f2f8
Change signature of editor onBridgeCmd to Any instead of None
2021-03-09 13:43:11 +01:00
Henrik Giesel
da0317cb85
Replace pin icon with lock icon
...
Credit goes out to @kleinerpirat
2021-03-09 13:43:11 +01:00
Henrik Giesel
ebf423bc9c
Remove Change Tracker again
2021-03-09 13:43:11 +01:00
Henrik Giesel
29742122d2
Remove button highlight on disabling button (i.e. blur)
2021-03-09 13:43:09 +01:00
Henrik Giesel
a8bde2d13c
Remove "true" return value from event handler
...
* this does not change any semantics
2021-03-09 13:41:39 +01:00
Henrik Giesel
2f46c69ed6
Separate index.ts into editable/editingArea/editorField/labelContainer.ts
2021-03-09 13:40:47 +01:00
Henrik Giesel
8593ab3c4c
Connect icons to sticky fields values
2021-03-09 13:37:56 +01:00
Henrik Giesel
d1bca9e4d9
Add visual elements for pinned fields
2021-03-09 13:37:56 +01:00
Henrik Giesel
d13bd1096d
Remove explicit popperjs again, because it's included in bootstrap.bundle
2021-03-09 13:37:56 +01:00
Henrik Giesel
31cba30873
Include the bootstrap icons in the editor view
2021-03-09 13:37:56 +01:00
Henrik Giesel
fb5763afb6
Change font-size in topbar buttons
...
Bootstrap sets font-size to inherit, so it's not inherited from top.
Before, it defaulted to 13, so this should prevent add-ons, which
feature text in their buttons (like <select> buttons).
2021-03-09 13:37:56 +01:00
Henrik Giesel
a66b0fbd84
Fix positioning of buttons
2021-03-09 13:37:56 +01:00
Henrik Giesel
81d1f2906a
Fix highlight for topright buttons
2021-03-09 13:37:56 +01:00
Henrik Giesel
037539dbf4
Remove field margins
...
* Bootstrap solves it more elegantly with line-height
* body { margin: 0 } is also defined by bootstrap
2021-03-09 13:37:56 +01:00
Henrik Giesel
f2cc85a3bc
Include bootstrap in editor
2021-03-09 13:37:56 +01:00
Henrik Giesel
aeda64a890
Add bootstrap, bootstrap-icons, and popperjs
2021-03-09 13:37:56 +01:00
Damien Elmes
ef9da3808c
bump version
2021-03-09 14:44:20 +10:00
Damien Elmes
7aac1b08d2
Merge pull request #1062 from abdnh/strip-html-comments
...
Strip HTML comments from external pastes
2021-03-09 11:55:59 +10:00
Damien Elmes
d3fa8621cb
Merge pull request #1060 from hgiesel/focusplus
...
Fix focus handling by moving caretToEnd logic
2021-03-09 11:53:09 +10:00
Damien Elmes
7ce75479b2
fix sync download failing when temp dir on different mount
...
https://forums.ankiweb.net/t/problems-with-2-1-41-on-arch-linux/8103
2021-03-09 11:44:49 +10:00
abdo
7673a52a02
Strip HTML comments from external pastes
...
Fix a regression caused by 150de7a683
2021-03-09 03:15:08 +03:00
Henrik Giesel
76260c3f8d
Satisfy formatter
2021-03-08 20:55:04 +01:00