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:
12
src/stores/tag-groups-store.js
Normal file
12
src/stores/tag-groups-store.js
Normal 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));
|
||||
});
|
||||
Reference in New Issue
Block a user