diff --git a/app/src/App.vue b/app/src/App.vue index 439c266..638503f 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -40,8 +40,28 @@ }, }, created () { - // load Promise.all([this.loadStats(), this.loadSettings()]).then(() => { + // init app + let goto + const setupFinished = true // TODO + const wifiConnected = this.stats.wifi.connected + + // only on initial navigation + if (!setupFinished) { + if (this.$route.path !== '/setup/start') { + goto = '/setup/start' + } + } else if (!wifiConnected) { + if (this.$route.path !== '/wifi') { + goto = '/wifi' + } + } + + if (goto) { + this.$router.push(goto) + } + + // initialization done this.isLoading = false }) },