Introducing dark mode, deriving apps in bottom bar from db
This commit is contained in:
12
src/index.js
12
src/index.js
@@ -1,6 +1,7 @@
|
||||
import Socket from "/_/code/ws/Socket.js"
|
||||
import "./Home.js"
|
||||
import "./Login.js"
|
||||
import "./Home/Login.js"
|
||||
import "./Home/ConnectionError.js"
|
||||
|
||||
let Global = class {
|
||||
Socket = new Socket()
|
||||
@@ -133,9 +134,9 @@ let Global = class {
|
||||
console.log("getProfile: ", profile);
|
||||
this.profile = profile
|
||||
return 200;
|
||||
} catch (err) {
|
||||
} catch (err) { // Network error / Error reaching server
|
||||
console.error(err);
|
||||
return 401;
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,12 +146,15 @@ let Global = class {
|
||||
this.getProfile().then(async (status) => {
|
||||
if (status === 401) {
|
||||
Login()
|
||||
} else if(status === 500) {
|
||||
ConnectionError()
|
||||
} else {
|
||||
console.log("else")
|
||||
await this.Socket.init()
|
||||
await this.onNavigate()
|
||||
Home()
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user