|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
<div id="app">
|
|
|
+ <!-- loading screen -->
|
|
|
+ <loading-overlay v-if="!connected"/>
|
|
|
+
|
|
|
<!-- top navigation bar -->
|
|
|
<top-navigation-bar :window="window"
|
|
|
:current-project="currentProject"
|
|
@@ -53,10 +56,12 @@ import ProjectSettingsWindow from "@/components/projects/project-settings-window
|
|
|
import AboutWindow from "@/components/other/about-window";
|
|
|
import ProjectDataAddWindow from "@/components/projects/project-data-add-window";
|
|
|
import ProjectDataViewWindow from "@/components/projects/project-data-view-window";
|
|
|
+import LoadingOverlay from "@/components/other/loading-overlay";
|
|
|
|
|
|
export default {
|
|
|
name: 'App',
|
|
|
components: {
|
|
|
+ LoadingOverlay,
|
|
|
ProjectDataAddWindow,
|
|
|
ProjectDataViewWindow,
|
|
|
AboutWindow,
|
|
@@ -67,6 +72,7 @@ export default {
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
|
+ connected: false,
|
|
|
socket: {
|
|
|
baseurl: window.location.protocol + '//' + window.location.hostname + ':5000',
|
|
|
// initialize socket.io connection
|
|
@@ -134,8 +140,11 @@ export default {
|
|
|
created: function() {
|
|
|
this.socket.io.on('app_status', status => {
|
|
|
this.status = status;
|
|
|
+ this.connected = true;
|
|
|
});
|
|
|
|
|
|
+ setInterval(() => this.connected = this.socket.io.connected, 2000);
|
|
|
+
|
|
|
window.addEventListener('resize', this.resize);
|
|
|
this.resize();
|
|
|
},
|