|
|
@ -50,7 +50,7 @@ export const Preload = () => { |
|
|
|
await setFileSystems() |
|
|
|
await setFileSystems() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const setFileSystems = async () => { |
|
|
|
const setFileSystems = async() => { |
|
|
|
const fsLoaded = await remixFileSystems.current.setFileSystem([remixIndexedDB.current, localStorageFileSystem.current]) |
|
|
|
const fsLoaded = await remixFileSystems.current.setFileSystem([remixIndexedDB.current, localStorageFileSystem.current]) |
|
|
|
if (fsLoaded) { |
|
|
|
if (fsLoaded) { |
|
|
|
console.log(fsLoaded.name + ' activated') |
|
|
|
console.log(fsLoaded.name + ' activated') |
|
|
@ -64,8 +64,10 @@ export const Preload = () => { |
|
|
|
async function loadStorage() { |
|
|
|
async function loadStorage() { |
|
|
|
await remixFileSystems.current.addFileSystem(remixIndexedDB.current) |
|
|
|
await remixFileSystems.current.addFileSystem(remixIndexedDB.current) |
|
|
|
await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) |
|
|
|
await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) |
|
|
|
await remixIndexedDB.current.checkWorkspaces() |
|
|
|
remixIndexedDB.current.loaded && await remixIndexedDB.current.checkWorkspaces() |
|
|
|
remixIndexedDB.current.hasWorkSpaces ? await setFileSystems() : setShowDownloader(true) |
|
|
|
localStorageFileSystem.current.loaded && await localStorageFileSystem.current.checkWorkspaces() |
|
|
|
|
|
|
|
remixIndexedDB.current.loaded && ( (remixIndexedDB.current.hasWorkSpaces || !localStorageFileSystem.current.hasWorkSpaces)? await setFileSystems():setShowDownloader(true)) |
|
|
|
|
|
|
|
!remixIndexedDB.current.loaded && await setFileSystems() |
|
|
|
} |
|
|
|
} |
|
|
|
loadStorage() |
|
|
|
loadStorage() |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|