1
0
mirror of https://github.com/koloml/philomena-tagging-assistant.git synced 2026-05-09 15:12:21 +00:00

Moving and renaming entities storages to entities dir

This commit is contained in:
2025-02-16 16:19:25 +04:00
parent 09e912ffff
commit 16f60ef9b5
16 changed files with 40 additions and 40 deletions

View File

@@ -5,7 +5,7 @@ import MaintenanceSettings from "$lib/extension/settings/MaintenanceSettings";
/**
* Store for working with maintenance profiles in the Svelte popup.
*/
export const maintenanceProfilesStore: Writable<MaintenanceProfile[]> = writable([]);
export const maintenanceProfiles: Writable<MaintenanceProfile[]> = writable([]);
/**
* Store for the active maintenance profile ID.
@@ -22,7 +22,7 @@ let lastActiveProfileId: string|null = null;
Promise.allSettled([
// Read the initial values from the storages first
MaintenanceProfile.readAll().then(profiles => {
maintenanceProfilesStore.set(profiles);
maintenanceProfiles.set(profiles);
}),
maintenanceSettings.resolveActiveProfileId().then(activeProfileId => {
activeProfileStore.set(activeProfileId);
@@ -30,7 +30,7 @@ Promise.allSettled([
]).then(() => {
// And only after initial values are loaded, start watching for changes from storage and from user's interaction
MaintenanceProfile.subscribe(profiles => {
maintenanceProfilesStore.set(profiles);
maintenanceProfiles.set(profiles);
});
maintenanceSettings.subscribe(settings => {

View File

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

View File

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