fix is_disable_switch_model
This commit is contained in:
@@ -34,6 +34,7 @@ export interface Rect {
|
||||
interface AppState {
|
||||
disableShortCuts: boolean
|
||||
isInpainting: boolean
|
||||
isDisableModelSwitch: boolean
|
||||
}
|
||||
|
||||
export const appState = atom<AppState>({
|
||||
@@ -41,6 +42,7 @@ export const appState = atom<AppState>({
|
||||
default: {
|
||||
disableShortCuts: false,
|
||||
isInpainting: false,
|
||||
isDisableModelSwitch: false,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -66,6 +68,18 @@ export const isInpaintingState = selector({
|
||||
},
|
||||
})
|
||||
|
||||
export const isDisableModelSwitchState = selector({
|
||||
key: 'isDisableModelSwitchState',
|
||||
get: ({ get }) => {
|
||||
const app = get(appState)
|
||||
return app.isDisableModelSwitch
|
||||
},
|
||||
set: ({ get, set }, newValue: any) => {
|
||||
const app = get(appState)
|
||||
set(appState, { ...app, isDisableModelSwitch: newValue })
|
||||
},
|
||||
})
|
||||
|
||||
export const croperState = atom<Rect>({
|
||||
key: 'croperState',
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user