mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix lint errors
This commit is contained in:
parent
2e573727ed
commit
9d1ecc3ed9
6 changed files with 22 additions and 11 deletions
|
@ -41,6 +41,9 @@ module.exports = {
|
|||
parser: "svelte-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
svelteFeatures: {
|
||||
experimentalGenerics: true,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"svelte/no-at-html-tags": "off",
|
||||
|
|
|
@ -13,7 +13,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
selectedDeck: DeckNameId | null;
|
||||
onChange?: (deck: DeckNameId) => void;
|
||||
}
|
||||
let {selectedDeck = $bindable(null), onChange}: Props = $props();
|
||||
let { selectedDeck = $bindable(null), onChange }: Props = $props();
|
||||
let decks: DeckNameId[] = $state([]);
|
||||
|
||||
$effect(() => {
|
||||
|
|
|
@ -22,7 +22,15 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
onChange?: (item: Item) => void;
|
||||
}
|
||||
|
||||
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination, tooltip }: Props = $props();
|
||||
let {
|
||||
title,
|
||||
onChange,
|
||||
icon,
|
||||
items,
|
||||
selectedItem = $bindable(null),
|
||||
keyCombination,
|
||||
tooltip,
|
||||
}: Props = $props();
|
||||
let modal: Modal | null = $state(null);
|
||||
let searchQuery = $state("");
|
||||
|
||||
|
@ -57,7 +65,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
{selectedItem?.name ?? "…"}
|
||||
</LabelButton>
|
||||
|
||||
<Shortcut keyCombination={keyCombination} on:action={() => modal?.toggle()} />
|
||||
<Shortcut {keyCombination} on:action={() => modal?.toggle()} />
|
||||
<Modal bind:this={modal} dialogClass="modal-lg">
|
||||
<div slot="header" class="modal-header">
|
||||
<IconConstrain iconSize={90}>
|
||||
|
|
|
@ -14,7 +14,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
selectedNotetype: NotetypeNameId | null;
|
||||
onChange?: (notetype: NotetypeNameId) => void;
|
||||
}
|
||||
let {selectedNotetype = $bindable(null), onChange}: Props = $props();
|
||||
let { selectedNotetype = $bindable(null), onChange }: Props = $props();
|
||||
let notetypes: NotetypeNameId[] = $state([]);
|
||||
|
||||
$effect(() => {
|
||||
|
|
|
@ -300,14 +300,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
export let selectedNotetype: NotetypeNameId | null = null;
|
||||
export let selectedDeck: DeckNameId | null = null;
|
||||
|
||||
|
||||
function onNotetypeChange(notetype: NotetypeNameId) {
|
||||
loadNote(0n, notetype.id, 0, null);
|
||||
}
|
||||
|
||||
function onDeckChange(deck: DeckNameId) {
|
||||
selectedDeck = deck;
|
||||
}
|
||||
let notetypeMeta: NotetypeIdAndModTime;
|
||||
function setNotetypeMeta(notetype: Notetype): void {
|
||||
notetypeMeta = { id: notetype.id, modTime: notetype.mtimeSecs };
|
||||
|
@ -1209,7 +1205,7 @@ components and functionality for general note editing.
|
|||
on:drop={checkNonLegacy(handlePickerDrop)}
|
||||
>
|
||||
{#if mode === "add" && !isLegacy}
|
||||
<EditorChoosers bind:selectedNotetype bind:selectedDeck onNotetypeChange={onNotetypeChange} />
|
||||
<EditorChoosers bind:selectedNotetype bind:selectedDeck {onNotetypeChange} />
|
||||
{/if}
|
||||
|
||||
<EditorToolbar {size} {wrap} api={toolbar}>
|
||||
|
|
|
@ -16,8 +16,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
onNotetypeChange?: (notetype: NotetypeNameId) => void;
|
||||
onDeckChange?: (deck: DeckNameId) => void;
|
||||
}
|
||||
let {selectedNotetype = $bindable(null), selectedDeck = $bindable(null), onNotetypeChange, onDeckChange}: Props = $props();
|
||||
|
||||
let {
|
||||
selectedNotetype = $bindable(null),
|
||||
selectedDeck = $bindable(null),
|
||||
onNotetypeChange,
|
||||
onDeckChange,
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="top-bar">
|
||||
|
|
Loading…
Reference in a new issue