mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2025-12-23 23:02:58 +00:00
Converting profiles store to TS
This commit is contained in:
@@ -1,28 +1,23 @@
|
||||
import { writable } from "svelte/store";
|
||||
import { type Writable, writable } from "svelte/store";
|
||||
import MaintenanceProfile from "$entities/MaintenanceProfile";
|
||||
import MaintenanceSettings from "$lib/extension/settings/MaintenanceSettings";
|
||||
|
||||
/**
|
||||
* Store for working with maintenance profiles in the Svelte popup.
|
||||
*
|
||||
* @type {import('svelte/store').Writable<MaintenanceProfile[]>}
|
||||
*/
|
||||
export const maintenanceProfilesStore = writable([]);
|
||||
export const maintenanceProfilesStore: Writable<MaintenanceProfile[]> = writable([]);
|
||||
|
||||
/**
|
||||
* Store for the active maintenance profile ID.
|
||||
*
|
||||
* @type {import('svelte/store').Writable<string|null>}
|
||||
*/
|
||||
export const activeProfileStore = writable(null);
|
||||
export const activeProfileStore: Writable<string|null> = writable(null);
|
||||
|
||||
const maintenanceSettings = new MaintenanceSettings();
|
||||
|
||||
/**
|
||||
* Active profile ID stored locally. Used to reset active profile once the existing profile was removed.
|
||||
* @type {string|null}
|
||||
*/
|
||||
let lastActiveProfileId = null;
|
||||
let lastActiveProfileId: string|null = null;
|
||||
|
||||
Promise.allSettled([
|
||||
// Read the initial values from the storages first
|
||||
|
||||
Reference in New Issue
Block a user