mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
chaged hard coded true retention colors to dynamic colorBlindColors
This commit is contained in:
parent
efa3b2f4de
commit
8e3180e446
2 changed files with 6 additions and 4 deletions
|
@ -3,6 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { colorBlindColors, type GraphBounds } from "./graph-helpers";
|
||||||
import * as tr from "@generated/ftl";
|
import * as tr from "@generated/ftl";
|
||||||
import { localizedNumber } from "@tslib/i18n";
|
import { localizedNumber } from "@tslib/i18n";
|
||||||
import { type RevlogRange } from "./graph-helpers";
|
import { type RevlogRange } from "./graph-helpers";
|
||||||
|
@ -30,8 +31,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const isColorBlindMode = (window as any).colorBlindMode;
|
const isColorBlindMode = (window as any).colorBlindMode;
|
||||||
if (isColorBlindMode) {
|
if (isColorBlindMode) {
|
||||||
youngColor = "#44ab9a";
|
youngColor = colorBlindColors.young;
|
||||||
matureColor = "#127733";
|
matureColor = colorBlindColors.mature;
|
||||||
}
|
}
|
||||||
// Set globally so scoped SCSS can use them
|
// Set globally so scoped SCSS can use them
|
||||||
document.documentElement.style.setProperty("--young-color", youngColor);
|
document.documentElement.style.setProperty("--young-color", youngColor);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { colorBlindColors, type GraphBounds } from "./graph-helpers";
|
||||||
import * as tr from "@generated/ftl";
|
import * as tr from "@generated/ftl";
|
||||||
import { type RevlogRange } from "./graph-helpers";
|
import { type RevlogRange } from "./graph-helpers";
|
||||||
import {
|
import {
|
||||||
|
@ -29,8 +30,8 @@
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const isColorBlindMode = (window as any).colorBlindMode;
|
const isColorBlindMode = (window as any).colorBlindMode;
|
||||||
if (isColorBlindMode) {
|
if (isColorBlindMode) {
|
||||||
passColor = "#127733";
|
passColor = colorBlindColors.relearn;
|
||||||
failColor = "#cb6676";
|
failColor = colorBlindColors.filtered;
|
||||||
}
|
}
|
||||||
// Apply them to document root so SCSS can see them
|
// Apply them to document root so SCSS can see them
|
||||||
document.documentElement.style.setProperty("--pass-color", passColor);
|
document.documentElement.style.setProperty("--pass-color", passColor);
|
||||||
|
|
Loading…
Reference in a new issue