работаем бля работаем
This commit is contained in:
30
new-client/src/app/entry.ts
Normal file
30
new-client/src/app/entry.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import initializeApp from './bootstrap/app'
|
||||
import authorize from './bootstrap/authorize'
|
||||
import showError from './bootstrap/error'
|
||||
import preloader from './bootstrap/preloader'
|
||||
import checkUpdates from './bootstrap/updater'
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
await checkUpdates()
|
||||
|
||||
preloader.show()
|
||||
|
||||
await authorize()
|
||||
|
||||
initializeApp()
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
|
||||
if (error instanceof Error && error.message) {
|
||||
showError(error.message)
|
||||
}
|
||||
else {
|
||||
showError('Something went wrong')
|
||||
}
|
||||
}
|
||||
finally {
|
||||
preloader.hide()
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user