Use async/await, move all css/js to separate files.

This commit is contained in:
Leo Vasanko
2025-07-08 06:33:46 -06:00
parent 28911d117e
commit e7f0e4ac1b
5 changed files with 30 additions and 273 deletions
+7 -5
View File
@@ -84,19 +84,21 @@ function showDeviceAdditionView() {
}
}
function showDashboardView() {
async function showDashboardView() {
if (window.location.pathname !== '/auth/profile') {
window.location.href = '/auth/profile'
return
}
showView('profileView')
clearStatus('profileStatus')
loadUserInfo().then(() => {
try {
await loadUserInfo()
updateUserInfo()
loadCredentials()
}).catch(error => {
await loadCredentials()
} catch (error) {
showStatus('profileStatus', `Failed to load user info: ${error.message}`, 'error')
})
}
}
// ========================================