mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
parent
f9f8769ea8
commit
8d34ba93b0
3 changed files with 4 additions and 1 deletions
|
@ -6,11 +6,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import Shortcut from "../../components/Shortcut.svelte";
|
import Shortcut from "../../components/Shortcut.svelte";
|
||||||
|
|
||||||
export let keyCombination: string | null = null;
|
export let keyCombination: string | null = null;
|
||||||
|
export let value: string;
|
||||||
|
|
||||||
let inputRef: HTMLInputElement;
|
let inputRef: HTMLInputElement;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<input bind:this={inputRef} tabindex="-1" type="color" on:input on:change />
|
<input bind:this={inputRef} tabindex="-1" type="color" bind:value on:input on:change />
|
||||||
|
|
||||||
{#if keyCombination}
|
{#if keyCombination}
|
||||||
<Shortcut {keyCombination} on:action={() => inputRef.click()} />
|
<Shortcut {keyCombination} on:action={() => inputRef.click()} />
|
||||||
|
|
|
@ -127,6 +127,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
>
|
>
|
||||||
{@html chevronDown}
|
{@html chevronDown}
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
|
value={color}
|
||||||
on:input={(event) => {
|
on:input={(event) => {
|
||||||
color = setColor(event);
|
color = setColor(event);
|
||||||
bridgeCommand(`lastHighlightColor:${color}`);
|
bridgeCommand(`lastHighlightColor:${color}`);
|
||||||
|
|
|
@ -146,6 +146,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
{@html chevronDown}
|
{@html chevronDown}
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
keyCombination={pickCombination}
|
keyCombination={pickCombination}
|
||||||
|
value={color}
|
||||||
on:input={(event) => {
|
on:input={(event) => {
|
||||||
color = setColor(event);
|
color = setColor(event);
|
||||||
bridgeCommand(`lastTextColor:${color}`);
|
bridgeCommand(`lastTextColor:${color}`);
|
||||||
|
|
Loading…
Reference in a new issue