mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Add selector tooltips
This commit is contained in:
parent
4444942b46
commit
c7a9471343
3 changed files with 5 additions and 2 deletions
|
@ -32,4 +32,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
items={decks}
|
items={decks}
|
||||||
icon={mdiBookOutline}
|
icon={mdiBookOutline}
|
||||||
keyCombination="Control+D"
|
keyCombination="Control+D"
|
||||||
|
tooltip={tr.qtMiscTargetDeckCtrlandd()}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -18,10 +18,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
items: Item[];
|
items: Item[];
|
||||||
icon: IconData;
|
icon: IconData;
|
||||||
keyCombination: string;
|
keyCombination: string;
|
||||||
|
tooltip: string;
|
||||||
onChange?: (item: Item) => void;
|
onChange?: (item: Item) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination }: Props = $props();
|
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination, tooltip }: Props = $props();
|
||||||
let modal: Modal | null = $state(null);
|
let modal: Modal | null = $state(null);
|
||||||
let searchQuery = $state("");
|
let searchQuery = $state("");
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LabelButton on:click={openModal} class="chooser-button">
|
<LabelButton {tooltip} on:click={openModal} class="chooser-button">
|
||||||
{selectedItem?.name ?? "…"}
|
{selectedItem?.name ?? "…"}
|
||||||
</LabelButton>
|
</LabelButton>
|
||||||
|
|
||||||
|
|
|
@ -31,4 +31,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
items={notetypes}
|
items={notetypes}
|
||||||
icon={mdiNewspaper}
|
icon={mdiNewspaper}
|
||||||
keyCombination="Control+N"
|
keyCombination="Control+N"
|
||||||
|
tooltip={tr.qtMiscChangeNoteTypeCtrlandn()}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue