* Don't download nodejs if NODE_BINARY is set
Some build environments, such as nixpkgs, restrict network access and
thus would prefer to not download anything at all. Setting PROTOC_BINARY
and friends makes the build system not download stuff, and the same
should be true for nodejs
* Allow setting YARN_BINARY for the build system
* Add myself to CONTRIBUTORS
As required by CI
When a user clicks on the table row in the deck list (neither click on the deck
link nor on the options menu) while the shift key is pressed,
then set the deck in that table row as the current deck.
This gives the user some quick feedback and enables the user to easily create
subdecks (as it automatically fills the add deck dialog with the deck name of
the selected deck) and to create notes belonging to the selected deck.
* Allow burying cards in browser
This code is based on existing "toggle suspend" command in browser.
- Adds "toggle bury" command to browser cards menu.
- Adds "browsing-toggle-bury" to core translation. Only english-language.
- Adds "buried" coloring to rows for buried cards in browser table.
Not yet done:
- Keyboard shortcut for "toggle bury" action.
- Non-english translations.
* Add contributor as requested in CONTRIBUTORS.
* Fix formatting in browser_table.rs.
* Add keyboard shortcut to "toggle bury" command.
This adds keyboard shortcut "ctrl-shift-j" to "toggle bury" command in
browser cards menu.
* Simplify logic for color of buried-card rows.
* Fix wrong import
* Fix text centering
* Update CONTRIBUTORS
* Add ellipsis prop to LabelButton; fix buttons
* Revert 6911fbfa6
* Create a prop to toggle ellipsis in LabelButton.svelte
Thanks to @hikaru-y: using "white-space: nowrap;" and "overflow: hidden;" together even when "text-overflow: ellipsis" is not needed can be problematic.
This fixes the text centering on deck options's SaveButton.
* Toggle ellipsis in NotetypeSelector.svelte's leftmost LabelButton
Without it, the button can expand indefinitely depending on the previous Note Type's name.
Co-Authored-By: Hikaru Y. <hkrysg@gmail.com>
Co-authored-by: Hikaru Y. <hkrysg@gmail.com>
* Fix Windows dark mode detection: OpenKey can fail
#1497 introduced reading hardcoded Windows Registry key, which assumes key exists. This is not true on Windows 7. Later addition of `try-except` block missed that OpenKey might fail.
This fix allows launching current version of Anki on Windows 7 when installed with Pip with the modified Python 3.9 installation.
* Update CONTRIBUTORS
CI req: Add myself to the contributor list
* update get_linux_dark_mode to use freedesktop.org standard
* Update CONTRIBUTORS
* run formatter
* Update CONTRIBUTORS
* allow for multiple dark mode detection strategies on Linux
* string -> str
* update docstring
* Update CONTRIBUTORS
Calling `moveCaretToEnd()` when `richText` is empty will cause the first keystroke of
ibus-based input methods with candidates to goes double. For example, if you
type "a" it becomes "aa". This problem exists in many linux distributions.
When `richText` is empty, there is no need to place the caret, just return
as a workaround.
* Scroll stats to top when exporting (#1114)
It's obviously a bit of a "hacky" solution, since it's slightly jarring for users to scroll down, click export, then find themselves all the way at the top again, but it's somewhat less confusing than wondering why your PDF is broken :-)
* Clarified comment in stats.py (#1114)
* Apply scrolling fix to new stats screen, not legacy stats (dae)
Also wait for JS callback before saving the PDF, as JS is executed
asynchronously.
* Extend maximum answer time...
Previously the time allowed to answer a question was capped at 10 minutes.
While this makes sense for fact recall, it limits the utility of Anki when
used for solving problems that can take more time to work through. This
extends the maximum answer time to 2 hours, which seems to be a reasonable
upper limit for solving a math or algorithm question.
* Add warning when max answer time exceeds 10 minutes
* Move warning below input field
* Truncate long deck names to match AnkiWeb behavior
Prevent long deck name from obscuring deck stats in main deck browser - match behavior at https://ankiweb.net/decks/ for handling long deck names (truncate name)
* Fix formatting
* Update CONTRIBUTORS
Add myself to contributors list
* Fix ValueError when exported files have wrong mtime
Set the `strict_timestamps` argument to `False`, so the media files which have a wrong mtime can be normally added to the zipfile.
* Update CONTRIBUTORS (ankitects#1666)
* Reformat exporting.py
* Callback for StudyDeck, use with onModelChange
* Add types to callback function
* Rationalise types
* Update CONTRIBUTORS
* Fix type hints
I'm still getting to grips with the type hints!
* Consistency with callback checks
* | not supported for type hints on 3.9
* fix: try catch excepton on get_windows_dark_mode and global cache that check
* add commitor email to CONTRIBUTORS
* remove is_windows_dark_mode cache
* avoid logging the missing key (dae)
The check happens frequently, so this will fill up the user's console if we print it each time.
* Add thousands comma separator for card counts graph
* Fix Answer Buttons graph's tooltip
Changes to the "times pressed" heading
* Shows the percent of that button out of all the presses
* Comma separates total on thousands
* Update CONTRIBUTERS
* Wider spacing for graph tables
* Switch to locale-based stats numbers
* Update CONTRIBUTORS
Wrong email?
* Fix counts graph on narrow devices
Graph and table now align in a column when the device's screen is narrow. Columns widths are bounded to not get too wide
* Rename toLocaleXXX functions
* toLocaleNumber -> localizedNumber
* toLocaleString -> localizedDate
Also cleans up sketchy "card counts" table formatting
* Localize more numbers
Uses locale-based rounding for more numbers now
* Localize graph axis ticks
* Fix future-due graph tooltip
* avoid div by zero (dae)
Ignoring NaN in localizedNumber() could potentially mask a mistake
in the future - better to explicitly handle the invalid case at the
source instead.