1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 07:12:57 +00:00

Added store for the groups

This commit is contained in:
2024-12-02 03:17:58 +04:00
parent c9a9fe059c
commit 4bdf04f911

View File

@@ -0,0 +1,12 @@
import {writable} from "svelte/store";
import TagGroup from "$entities/TagGroup.ts";
/** @type {import('svelte/store').Writable<TagGroup[]>} */
export const tagGroupsStore = writable([]);
TagGroup
.readAll()
.then(groups => tagGroupsStore.set(groups))
.then(() => {
TagGroup.subscribe(groups => tagGroupsStore.set(groups));
});