Skip to content

Commit

Permalink
fix startup with fs storage
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Jun 5, 2024
1 parent 4db837c commit fc7b8ad
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/ts/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ export async function start(options = {}): Promise<void> {
// Will display an error message, see in storage.ts
}
} finally {
editor.once('canvas:frame:load', ({ window }) => {
// This needs time for the loader to be hidden
document.querySelector('.silex-loader').classList.add('silex-dialog-hide')
document.querySelector('#gjs').classList.remove('silex-dialog-hide')
config.emit(ClientEvent.STARTUP_END, { editor, config })
})
if(editor.getModel().getCurrentFrame().loaded) {
loaded(editor)
} else {
editor.once('canvas:frame:load', () => loaded(editor))
}
}
}

function loaded(editor) {
document.querySelector('.silex-loader').classList.add('silex-dialog-hide')
document.querySelector('#gjs').classList.remove('silex-dialog-hide')
config.emit(ClientEvent.STARTUP_END, { editor, config })
}

0 comments on commit fc7b8ad

Please sign in to comment.