Commit Graph

1593 Commits

Author SHA1 Message Date
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
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
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
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
e03bfd2923 Refactor bridgeCommand and silence false "uncaught msg" log 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
8593ab3c4c Connect icons to sticky fields values 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
a66b0fbd84 Fix positioning of buttons 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
Benjamin K
5d880f6e31 Clean up imports 2021-03-04 19:55:35 +01:00
Benjamin K
a066cee326 The old delimiter is now kept, when cancel button is clicked 2021-03-04 19:39:43 +01:00
bluegreenmagick
69006b5872 add dialog to choose addons to update 2021-03-03 10:34:43 +09:00
RumovZ
e29bd4479b Make clickable dyndeck labels fixed in size 2021-03-01 11:26:52 +01:00
Damien Elmes
e218604708 monospace font in html editor
https://forums.ankiweb.net/t/change-default-font-of-html-edit-mode-to-a-monospaced-font/7833
2021-03-01 10:16:12 +10:00
Damien Elmes
32af54cd4d catch attempts to nest under a filtered deck; don't show traceback 2021-03-01 09:58:12 +10:00
Damien Elmes
5564fd9e13
Merge pull request #1040 from RumovZ/deck-name-err
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
92cbf168f6 Catch DeckIsFilteredError directly on frontend 2021-02-26 11:32:40 +01:00
Damien Elmes
b8acf11f3e remove left-click on saved searches
Multiple users have thought it was a bug rather than an intentional
feature, and it breaks double-clicking:

https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/51
2021-02-26 18:48:32 +10:00
Damien Elmes
d666b7e5b0 fix browser appearance defaults
https://forums.ankiweb.net/t/small-bug-in-the-browser-appearance-window/7806
2021-02-26 18:46:09 +10:00
Damien Elmes
bfd452c120
Merge pull request #1039 from RumovZ/dyndeck-hint
Clickable hint in dyndeck dialogue for unmovable cards
2021-02-26 18:02:51 +10:00
bluegreenmagick
c7d8700054 StudyDeck without add button 2021-02-25 07:34:01 +09:00
RumovZ
1dca43f409 Fix #1024 – catch deck rename errors 2021-02-24 13:59:38 +01:00
RumovZ
8e43b29816 Localise RenameDeckError 2021-02-24 13:57:44 +01:00
RumovZ
e95c2fa6ce Fix type hints in dyndeckconf 2021-02-24 11:24:27 +01:00
RumovZ
234ca4d496 Refactor dyndeckconf/on_hint_button 2021-02-24 11:14:33 +01:00
RumovZ
d6b1c0cf3a Give dyndeck hint unique styling 2021-02-23 23:34:05 +01:00
RumovZ
ae88f7e593 Add clickable hint to dyndeckconf 2021-02-23 23:14:11 +01:00
RumovZ
5a37b8e2af Add direct col reference to dyndeckconf 2021-02-23 22:31:04 +01:00
Henrik Giesel
8aa8174d4b Fix scrollbar issue in anki-editable component in two ways
- using :host-context(.nightMode) allows for applying the nightmode
  scroll bar inside the component
- apply max-width: 100% to all element within editable, not just images
2021-02-23 15:52:20 +01:00
Damien Elmes
f41ec183c2
Merge pull request #1034 from abdnh/clayout-cloze-shortcuts
Shortcuts to preview clozes in card layout screen
2021-02-22 10:07:16 +10:00
abdo
39f3b6ce93 Shortcuts to preview clozes in card layout screen
Assign Alt+{number} to select cloze cards.
2021-02-21 14:46:53 +03:00
Damien Elmes
13f5ee1ddc tweak update message
- Since we need to show this to new users until AnkiDroid is updated,
use a wording that doesn't seem so out of place to new users.
- Avoid mentioning syncing, since the user may not sync, and the
modSchema() call will allow the user to confirm anyway.
- Let the user know they can change their mind about AnkiDroid by
visiting the preferences.
2021-02-21 19:47:26 +10:00
Damien Elmes
5ae66af5d2 rework v2 scheduler upgrade; drop downgrade
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.

Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
bluegreenmagick
d6eac551b1 change _on_click_current to _on_click_index
fix bug where clicking on a blank space below sidebar item
would still trigger currentIndex item's click event
2021-02-20 22:58:02 +09:00
Damien Elmes
2941503bea tweak getFile() arguments in editor to be more readable 2021-02-19 10:18:40 +10:00