Commit Graph

3347 Commits

Author SHA1 Message Date
09d9ae364f
reduce minimum width 2024-11-30 12:36:24 +01:00
d1e42e5379
reduce minimum width 2024-11-30 11:52:16 +01:00
Abdo
fa47e905c5
Restore $deckOptions (#3265)
* Restore $deckOptions

* Avoid error in logs when using ./yarn dev or mobile clients (dae)
2024-06-28 19:38:18 +07:00
Aristotelis
549cc467b6
Fix IO rendering in the previewer and template editor (#3228) 2024-06-08 13:18:58 +01:00
Damien Elmes
205068a993 Remove missed debugging statement 2024-06-08 05:29:29 +07:00
Damien Elmes
847912c5d8 Remove context check bypass when ANKI_API_PORT set
This resulted in the I/O regression in #3223 not being caught with ./run,
and puts devs ast risk. It also does not currently seem to be required
(pages like graphs and deck options work correctly with ./yarn dev).
I suspect the change was made to support running of pages/*.html, which
we no longer build.
2024-06-08 05:16:56 +07:00
Damien Elmes
71311f201e Fix image occlusion error during review 2024-06-08 05:06:54 +07:00
Abdo
e3c6b5bf3d
Work around RuntimeError in _update_button_label() (#3224) 2024-06-06 11:19:33 +01:00
Abdo
fbb73046e0
Avoid askUser() in sync dialogs (#3222) 2024-06-03 07:49:02 +01:00
Damien Elmes
5082d9ae5c Factor flask.make_response() calls out into helper function 2024-06-03 13:42:03 +07:00
Damien Elmes
d957cec9e0 Add missing word 2024-06-01 15:56:01 +07:00
Damien Elmes
6ef9ba0305 Switch 404 responses to plain text
Alternative fix which closes #3220
2024-06-01 15:50:27 +07:00
Abdo
8d2e8b1e4f
Pass -- to mpv/mplayer before filename (#3219)
* Pass -- to mpv/mplayer before filename

* Pass -- in as a separate argument (dae)
2024-06-01 09:44:24 +01:00
Abdo
06f7aa393d
Add a preference to toggle LaTeX generation (#3218)
* Add a preference to toggle LaTeX generation

* Fix test

* Remove LaTeX security restrictions

* Show existing LaTeX images regardless of preference

* Lift config check out of loop (dae)

* Shift option to review settings; display warning when disabled (dae)
2024-06-01 09:26:28 +01:00
Abdo
d981a6e3c6
Reword sync conflict explanation (#3221)
* Reword sync conflict explanation

* Preserve old string for now (dae)
2024-06-01 09:05:19 +01:00
Xidorn Quan
f7b93a5012 Add StartupWMClass for anki.desktop
This ensures that the system can correctly assign the windows of Anki to the desktop launcher item, e.g. in Ubuntu's dock.

Update CONTRIBUTORS
2024-06-01 14:58:47 +07:00
Richard Romero Jr
81de39768c
Fixes shift click selection after programmatic selection in most cases, Issue #2469 (#3213)
* Fixes shift click selection after programmatic selection in most cases

* Attempting to resolve checks

* Adding comment for _move_current setCurrentIndex

* Update qt/aqt/browser/table/table.py (dae)
2024-06-01 08:54:44 +01:00
Damien Elmes
8229383b5c Remove empty cards shortcut
It's conflicting, and will need a new combo:
https://forums.ankiweb.net/t/anki-24-06-release-candidate/44926/44
2024-05-27 05:14:27 +07:00
Abdo
a9bf702317
Call profile_did_open hook at the end of loadProfile (#3202) 2024-05-24 09:23:29 +01:00
Damien Elmes
c8f8a9cd2f Honor night mode when switching between cards in card info 2024-05-22 17:07:01 +07:00
Damien Elmes
4a55f69e48 Revert "Use SplashScreen flag for all aqt tooltips (#3194)"
This reverts commit e50a768e44.

This appears to have caused a regression with keyboard shortcuts

https://forums.ankiweb.net/t/anki-24-06-release-candidate/44926/14
2024-05-22 17:06:37 +07:00
Damien Elmes
9a438ae87d Probable fix for crash when syncing from preferences
https://forums.ankiweb.net/t/windows-anki-24-04-1-crashes-with-self-hosted-sync-server/44849/6
2024-05-21 23:08:08 +07:00
Damien Elmes
91c877e02b Tweaks to the 'optimize all presets' progress
https://forums.ankiweb.net/t/visual-bugs-with-optimization/44873
2024-05-17 15:00:01 +07:00
Damien Elmes
bc69f689ab Fix Mnemosyne importer clobbering source file 2024-05-17 12:34:01 +07:00
Abdo
ef49e3f741
Do not show media auto sync errors (#3197)
* Do not show media auto sync errors

* is_autosync -> is_periodic_sync

* More wording improvements; fix periodic sync depending on auto sync setting (dae)
2024-05-17 06:25:10 +01:00
Damien Elmes
f639c3660a Revert "Revert "Revert "Preserve HTML formatting inside clozes (#3038)"""
This reverts commit 9c733848b8.
2024-05-17 11:51:09 +07:00
Voczi
e50a768e44
Use SplashScreen flag for all aqt tooltips (#3194)
* Set custom tooltip flag as SplashScreen

Prevents tooltip from showing when parent is out of focus

* Update CONTRIBUTORS
2024-05-15 13:13:53 +01:00
Damien Elmes
22ecab1a0e Ensure DB check tooltip appears in main window
https://forums.ankiweb.net/t/is-this-bug-or-the-new-modification-in-anki-desktop/44072
2024-04-30 23:21:41 +10:00
Pedro Schreiber
074becc0ce
Add keyboard shortcuts for empty cards and toggle mask on image occlusion (#3136)
* Add keyboard shortcuts for empty cards and toggle mask on image occlusion

- add shortcut for empty cards
- add shortcut for toggle mask
- set tooltips with shortcuts

use unused shortcut for empty cards

* remove unnecessary shortcut added in main.py

* change empty cards shortcut and try to fix CI error in CONTRIBUTORS

* change shortcut for empty cards for universal support
2024-04-25 17:19:38 +10:00
Mani
f0f9535200
fix io draw in mobile client (#3160) 2024-04-23 22:39:26 +10:00
Harvey R
839fd7bc8b
Add minimalist mode tooltip (#3155)
* Add preferences-minimalist-mode-tooltip

* Update preferences.ui

* Update preferences.ui

* Add preferences_minimalist_mode_tooltip

* Update preferences.ui

* Update preferences.ui
2024-04-23 00:32:55 +10:00
Abdo
e6c7d89443
Fix auto sync not working on Windows shutdown (#3153)
* Fix auto sync not working on Windows shutdown

* Fix mypy error

* Use translated string
2024-04-23 00:32:00 +10:00
Abdo
0a706c5dd9
Ignore errors in do_window_cleanup to fix shutdown issue (#3142)
* Ignore errors in do_window_cleanup to fix shutdown issue

* Only catch RuntimeError
2024-04-17 20:50:41 +10:00
Loudwig
d8f2782c26
Feature Show Reminder before answer (#3064) (#3119)
* Feature Question Action Show Reminder (#3064)

Added a option in the deck config that allow the user to choose in
Autoupdate mode between showing a reminder or revealing the card.
Also added my name to the contributors

* Update ftl/core/deck-config.ftl
2024-04-13 08:39:50 +01:00
Wu Yi-Wei
31439e325d
Add Margins on the Buttons on the About Page (#3137)
* Add Margins on the Buttons on the About Page

* Fix contributors

* Fix format
2024-04-12 05:21:26 +01:00
Escape0707
97efd49cd8
Ignore exception raised by pip_system_certs not found (#3114)
This dependency usually doesn't benefit Linux distros with requests library configured to use system certificate already. And is not packaged by most distros. Making it optional will make most Linux users' installation much easier.
2024-04-05 13:12:06 +01:00
Antoine Q
068f14378e
Update about.py (#3112)
Update about.py to add my name.
2024-04-03 10:22:40 +01:00
Damien Elmes
bdc9be2bbb Ensure ankihelper is rebuilt on arch change
https://forums.ankiweb.net/t/24-04-breaks-dark-mode-on-mac/43048
2024-04-03 15:07:50 +07:00
Damien Elmes
a5154635dc Possible fix for crash on first sync
https://forums.ankiweb.net/t/desktop-app-closes-itself-after-i-try-to-log-in/43132
2024-04-03 14:11:34 +07:00
Damien Elmes
9c733848b8 Revert "Revert "Preserve HTML formatting inside clozes (#3038)""
This reverts commit e911b4b69a.

Trying again now that 24.04 is out.
2024-03-31 15:55:30 +07:00
Damien Elmes
9f55cf26fc
Switch to SvelteKit (#3077)
* Update to latest Node LTS

* Add sveltekit

* Split tslib into separate @generated and @tslib components

SvelteKit's path aliases don't support multiple locations, so our old
approach of using @tslib to refer to both ts/lib and out/ts/lib will no
longer work. Instead, all generated sources and their includes are
placed in a separate out/ts/generated folder, and imported via @generated
instead. This also allows us to generate .ts files, instead of needing
to output separate .d.ts and .js files.

* Switch package.json to module type

* Avoid usage of baseUrl

Incompatible with SvelteKit

* Move sass into ts; use relative links

SvelteKit's default sass support doesn't allow overriding loadPaths

* jest->vitest, graphs example working with yarn dev

* most pages working in dev mode

* Some fixes after rebasing

* Fix/silence some svelte-check errors

* Get image-occlusion working with Fabric types

* Post-rebase lock changes

* Editor is now checked

* SvelteKit build integrated into ninja

* Use the new SvelteKit entrypoint for pages like congrats/deck options/etc

* Run eslint once for ts/**; fix some tests

* Fix a bunch of issues introduced when rebasing over latest main

* Run eslint fix

* Fix remaining eslint+pylint issues; tests now all pass

* Fix some issues with a clean build

* Latest bufbuild no longer requires @__PURE__ hack

* Add a few missed dependencies

* Add yarn.bat to fix Windows build

* Fix pages failing to show when ANKI_API_PORT not defined

* Fix svelte-check and vitest on Windows

* Set node path in ./yarn

* Move svelte-kit output to ts/.svelte-kit

Sadly, I couldn't figure out a way to store it in out/ if out/ is
a symlink, as it breaks module resolution when SvelteKit is run.

* Allow HMR inside Anki

* Skip SvelteKit build when HMR is defined

* Fix some post-rebase issues

I should have done a normal merge instead.
2024-03-31 09:16:31 +01:00
Antoine Q
32c129656e
Improve timer interval display (#3096) (#3100)
* Improve update interval of timer display

Timer calculation frequency increased and aligned with new card apparition.

* Update CONTRIBUTORS

* Update timer interval to 0.333 sec

* Restore timer to 1 sec

- Restoring timer to 1sec value as it is not necessary to increase the frequency.

- Adding a time update directy after new card is displayed so that the timer display immediatly restarts to 0.
2024-03-31 07:49:16 +01:00
kelciour
111f3bd138
Fix mpv loadfile syntax change (#3105) 2024-03-31 07:46:59 +01:00
Damien Elmes
67062da924 Possible workaround for toolbar height issue
https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/125
2024-03-28 15:37:49 +07:00
Damien Elmes
e911b4b69a Revert "Preserve HTML formatting inside clozes (#3038)"
This reverts commit 58b2475f42.

Rolling this back for now, as it may cause regressions. We can give it
another try at the start of the next beta-testing period.
2024-03-25 16:47:54 +07:00
Abdo
58b2475f42
Preserve HTML formatting inside clozes (#3038)
* Preserve HTML formatting inside clozes

* Place caret after/inside cloze

To match the old behavior

* Fix clozing in mathjax

* Formatting

* Avoid .extractContents() and handle partially covered tags

* Exclude range end if endOffset == 0

* Remove unnecessary branches

* Use nodeIsElement

* Let extractContents() handle partially selected nodes
2024-03-18 13:44:19 +00:00
Pedro Schreiber
6ff42155ad
Display deck names when deleting (#3058)
* -  update remove decks function to return names of all deleted decks
- update protobuf message to display deck names
- update python files to receive message in the frontend.
- add message template to ftl

* update CONTRIBUTORS

* format

* refactor: move up deck names concatenation to tooltip api call
to fix type expectations

* restore core behavior and get deck name from view

* fix type specs

* remove new type and use str instead
restore incorrectly removed lines
2024-03-13 12:29:06 +07:00
Kai Knoblich
057733d02e
qt/aqt/__init__.py: Skip GL library workaround for FreeBSD (#3071)
* qt/aqt/__init__.py: Skip GL library workaround for FreeBSD

The workaround to load explicitly "libGL.so.1" isn't required for
FreeBSD and leads to segmentation faults if used in environments that
have nVidia drivers loaded.

See also FreeBSD bug 270778 for further details. [1]

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270778

* Update CONTRIBUTORS
2024-03-12 15:50:21 +07:00
Damien Elmes
1d4d7ee7ed Fix full sync dialog failing to appear
The changed timing in 7784321b90 caused
the question dialog to use the progress window as the parent, which
meant it got closed when the progress window closes moments afterwards.

https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/69
2024-03-12 14:39:46 +07:00
Foxy_null
6ac60f8032
Added new translator name (#3060)
* Add my name to about.py

* Add my name to CONTRIBUTORS
2024-03-08 12:55:16 +00:00