This commit is contained in:
AmandaSternberg-creator 2025-12-17 07:15:02 -08:00 committed by GitHub
commit 977ca5ea17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View file

@ -255,6 +255,7 @@ Ranjit Odedra <ranjitodedra.dev@gmail.com>
Eltaurus <https://github.com/Eltaurus-Lt>
jariji
Francisco Esteva <fr.esteva@duocuc.cl>
AmandaSternberg-creator <amandasternberg2001@gmail.com>
********************

View file

@ -5,7 +5,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<script lang="ts">
import * as tr from "@generated/ftl";
import { getPlatformString } from "@tslib/shortcuts";
import { createEventDispatcher } from "svelte";
import Icon from "$lib/components/Icon.svelte";
import IconConstrain from "$lib/components/IconConstrain.svelte";
@ -16,10 +15,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let keyCombination: string;
const dispatch = createEventDispatcher<{ tagappend: null }>();
export let onTagAppend: (() => void) | undefined;
function appendTag() {
dispatch("tagappend");
if (onTagAppend) {
onTagAppend();
}
}
</script>
@ -43,7 +44,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</span>
</div>
<Shortcut {keyCombination} on:action={() => dispatch("tagappend")} />
<Shortcut {keyCombination} on:action={appendTag} />
<style lang="scss">
.tag-add-button {

View file

@ -21,7 +21,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{#if tagsSelected}
<TagsSelectedButton on:tagselectall on:tagcopy on:tagdelete />
{:else}
<TagAddButton on:tagappend {keyCombination} />
<TagAddButton {keyCombination} onTagAppend={() => {}} />
{/if}
{/key}
</div>