add file manager

This commit is contained in:
Qing
2022-12-31 21:07:08 +08:00
parent b847ded828
commit 2dd95be90d
17 changed files with 5402 additions and 5872 deletions

View File

@@ -41,6 +41,7 @@ interface AppState {
isInteractiveSeg: boolean
isInteractiveSegRunning: boolean
interactiveSegClicks: number[][]
showFileManager: boolean
}
export const appState = atom<AppState>({
@@ -53,6 +54,7 @@ export const appState = atom<AppState>({
isInteractiveSeg: false,
isInteractiveSegRunning: false,
interactiveSegClicks: [],
showFileManager: false,
},
})
@@ -78,6 +80,18 @@ export const isInpaintingState = selector({
},
})
export const showFileManagerState = selector({
key: 'showFileManager',
get: ({ get }) => {
const app = get(appState)
return app.showFileManager
},
set: ({ get, set }, newValue: any) => {
const app = get(appState)
set(appState, { ...app, showFileManager: newValue })
},
})
export const fileState = selector({
key: 'fileState',
get: ({ get }) => {