mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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";
|
||||
|
||||
export let keyCombination: string | null = null;
|
||||
export let value: string;
|
||||
|
||||
let inputRef: HTMLInputElement;
|
||||
</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}
|
||||
<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}
|
||||
<ColorPicker
|
||||
value={color}
|
||||
on:input={(event) => {
|
||||
color = setColor(event);
|
||||
bridgeCommand(`lastHighlightColor:${color}`);
|
||||
|
|
|
@ -146,6 +146,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
{@html chevronDown}
|
||||
<ColorPicker
|
||||
keyCombination={pickCombination}
|
||||
value={color}
|
||||
on:input={(event) => {
|
||||
color = setColor(event);
|
||||
bridgeCommand(`lastTextColor:${color}`);
|
||||
|
|
Loading…
Reference in a new issue