Work for ControlNet
This commit is contained in:
27
src/lib/stores/configState.ts
Normal file
27
src/lib/stores/configState.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { debounce } from '$lib/utils';
|
||||
import { get, writable } from 'svelte/store';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
export type ConfigState = {
|
||||
/** Strip user state even if saving to local storage */
|
||||
alwaysStripUserState: boolean,
|
||||
|
||||
/** When saving, always prompt for a name to save the workflow as */
|
||||
promptForWorkflowName: boolean,
|
||||
}
|
||||
|
||||
type ConfigStateOps = {
|
||||
}
|
||||
|
||||
export type WritableConfigStateStore = Writable<ConfigState> & ConfigStateOps;
|
||||
const store: Writable<ConfigState> = writable(
|
||||
{
|
||||
alwaysStripUserState: false,
|
||||
promptForWorkflowName: false
|
||||
})
|
||||
|
||||
const configStateStore: WritableConfigStateStore =
|
||||
{
|
||||
...store
|
||||
}
|
||||
export default configStateStore;
|
||||
@@ -9,6 +9,8 @@ export type UIState = {
|
||||
autoAddUI: boolean,
|
||||
uiUnlocked: boolean,
|
||||
uiEditMode: UIEditMode,
|
||||
|
||||
isSavingToLocalStorage: boolean
|
||||
}
|
||||
|
||||
export type WritableUIStateStore = Writable<UIState>;
|
||||
@@ -18,7 +20,9 @@ const store: WritableUIStateStore = writable(
|
||||
nodesLocked: false,
|
||||
autoAddUI: true,
|
||||
uiUnlocked: false,
|
||||
uiEditMode: "widgets"
|
||||
uiEditMode: "widgets",
|
||||
|
||||
isSavingToLocalStorage: false
|
||||
})
|
||||
|
||||
const uiStateStore: WritableUIStateStore =
|
||||
|
||||
Reference in New Issue
Block a user