|
@@ -6,85 +6,70 @@
|
|
</div>
|
|
</div>
|
|
<!--/ Application cache reset button -->
|
|
<!--/ Application cache reset button -->
|
|
|
|
|
|
- <v-slide-y-transition mode="out-in">
|
|
|
|
- <!-- Loading screen -->
|
|
|
|
- <loader v-if="loadingMessage" :message="loadingMessage" />
|
|
|
|
- <!--/ Loading screen -->
|
|
|
|
|
|
+ <div v-if="!loadingMessage && isGdprValidated && isHostConfigured">
|
|
|
|
+ <!-- Sidebar menu -->
|
|
|
|
+ <v-navigation-drawer
|
|
|
|
+ v-model="drawer"
|
|
|
|
+ clipped
|
|
|
|
+ fixed
|
|
|
|
+ app
|
|
|
|
+ >
|
|
|
|
+ <v-list dense>
|
|
|
|
+ <v-list-tile to="/experiments" exact>
|
|
|
|
+ <v-list-tile-action>
|
|
|
|
+ <v-icon>library_books</v-icon>
|
|
|
|
+ </v-list-tile-action>
|
|
|
|
+ <v-list-tile-content>
|
|
|
|
+ <v-list-tile-title>List of experiments</v-list-tile-title>
|
|
|
|
+ </v-list-tile-content>
|
|
|
|
+ </v-list-tile>
|
|
|
|
|
|
- <!-- Host connection configuration -->
|
|
|
|
- <host-config v-else-if="!isHostConfigured" />
|
|
|
|
- <!--/ Host connection configuration -->
|
|
|
|
|
|
+ <v-list-tile @click="loadScenes">
|
|
|
|
+ <v-list-tile-action>
|
|
|
|
+ <v-icon>refresh</v-icon>
|
|
|
|
+ </v-list-tile-action>
|
|
|
|
+ <v-list-tile-content>
|
|
|
|
+ <v-list-tile-title>Refresh list of scenes</v-list-tile-title>
|
|
|
|
+ </v-list-tile-content>
|
|
|
|
+ </v-list-tile>
|
|
|
|
+ </v-list>
|
|
|
|
+ </v-navigation-drawer>
|
|
|
|
+ <!--/ Sidebar menu -->
|
|
|
|
|
|
|
|
+ <!-- Top bar -->
|
|
|
|
+ <v-toolbar app fixed clipped-left>
|
|
|
|
+ <v-toolbar-side-icon @click.stop="drawer = !drawer" />
|
|
|
|
+ <v-toolbar-title>Web experiment</v-toolbar-title>
|
|
|
|
+ </v-toolbar>
|
|
|
|
+ <!--/ Top bar -->
|
|
|
|
+ </div>
|
|
|
|
|
|
- <div v-else>
|
|
|
|
- <!-- Sidebar menu -->
|
|
|
|
- <v-navigation-drawer
|
|
|
|
- v-model="drawer"
|
|
|
|
- clipped
|
|
|
|
- fixed
|
|
|
|
- app
|
|
|
|
- >
|
|
|
|
- <v-list dense>
|
|
|
|
- <v-list-tile to="/experimentsList" exact>
|
|
|
|
- <v-list-tile-action>
|
|
|
|
- <v-icon>library_books</v-icon>
|
|
|
|
- </v-list-tile-action>
|
|
|
|
- <v-list-tile-content>
|
|
|
|
- <v-list-tile-title>List of experiments</v-list-tile-title>
|
|
|
|
- </v-list-tile-content>
|
|
|
|
- </v-list-tile>
|
|
|
|
-
|
|
|
|
- <v-list-tile @click="loadScenes">
|
|
|
|
- <v-list-tile-action>
|
|
|
|
- <v-icon>refresh</v-icon>
|
|
|
|
- </v-list-tile-action>
|
|
|
|
- <v-list-tile-content>
|
|
|
|
- <v-list-tile-title>Refresh list of scenes</v-list-tile-title>
|
|
|
|
- </v-list-tile-content>
|
|
|
|
- </v-list-tile>
|
|
|
|
- </v-list>
|
|
|
|
- </v-navigation-drawer>
|
|
|
|
- <!--/ Sidebar menu -->
|
|
|
|
-
|
|
|
|
- <!-- Top bar -->
|
|
|
|
- <v-toolbar app fixed clipped-left>
|
|
|
|
- <v-toolbar-side-icon @click.stop="drawer = !drawer" />
|
|
|
|
- <v-toolbar-title>Web experiment</v-toolbar-title>
|
|
|
|
- </v-toolbar>
|
|
|
|
- <!--/ Top bar -->
|
|
|
|
-
|
|
|
|
- <!-- Pages content -->
|
|
|
|
- <v-content>
|
|
|
|
- <v-container fill-height>
|
|
|
|
- <v-layout justify-center>
|
|
|
|
- <v-flex xs12>
|
|
|
|
- <v-scroll-x-reverse-transition mode="out-in">
|
|
|
|
- <!-- View injected here -->
|
|
|
|
- <router-view />
|
|
|
|
- <!--/ View injected here -->
|
|
|
|
- </v-scroll-x-reverse-transition>
|
|
|
|
- </v-flex>
|
|
|
|
- </v-layout>
|
|
|
|
- </v-container>
|
|
|
|
- </v-content>
|
|
|
|
- <!--/ Pages content -->
|
|
|
|
- </div>
|
|
|
|
- </v-slide-y-transition>
|
|
|
|
|
|
+ <!-- Pages content -->
|
|
|
|
+ <v-content>
|
|
|
|
+ <v-container fill-height>
|
|
|
|
+ <v-layout justify-center>
|
|
|
|
+ <v-flex xs12>
|
|
|
|
+ <v-scroll-x-reverse-transition mode="out-in">
|
|
|
|
+ <!-- View injected here -->
|
|
|
|
+ <router-view />
|
|
|
|
+ <!--/ View injected here -->
|
|
|
|
+ </v-scroll-x-reverse-transition>
|
|
|
|
+ </v-flex>
|
|
|
|
+ </v-layout>
|
|
|
|
+ </v-container>
|
|
|
|
+ </v-content>
|
|
|
|
+ <!--/ Pages content -->
|
|
</v-app>
|
|
</v-app>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import './style.css'
|
|
import './style.css'
|
|
import ResetAppButton from '@/components/ResetAppButton.vue'
|
|
import ResetAppButton from '@/components/ResetAppButton.vue'
|
|
-import Loader from '@/components/Loader.vue'
|
|
|
|
-import HostConfig from '@/components/HostConfig.vue'
|
|
|
|
import { mapGetters, mapActions } from 'vuex'
|
|
import { mapGetters, mapActions } from 'vuex'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- ResetAppButton,
|
|
|
|
- Loader,
|
|
|
|
- HostConfig
|
|
|
|
|
|
+ ResetAppButton
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -96,20 +81,29 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['isHostConfigured', 'areScenesLoaded'])
|
|
|
|
|
|
+ ...mapGetters(['isGdprValidated', 'isHostConfigured', 'areScenesLoaded'])
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ isGdprValidated(isValidated) {
|
|
|
|
+ if (isValidated) this.APP_LOADER()
|
|
|
|
+ },
|
|
isHostConfigured(isConfigured) {
|
|
isHostConfigured(isConfigured) {
|
|
- if (isConfigured) this.loadScenes()
|
|
|
|
|
|
+ if (isConfigured) this.APP_LOADER()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async mounted() {
|
|
|
|
- this.setAppUniqueId()
|
|
|
|
- if (this.isHostConfigured) await this.loadWebSocket()
|
|
|
|
- if (this.isHostConfigured && !this.areScenesLoaded) await this.loadScenes()
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.APP_LOADER()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions(['setAppUniqueId', 'loadScenesList', 'connectToWs']),
|
|
|
|
|
|
+ ...mapActions(['loadScenesList', 'connectToWs']),
|
|
|
|
+
|
|
|
|
+ // Main app function that redirect the user where he needs to be at
|
|
|
|
+ async APP_LOADER() {
|
|
|
|
+ if (this.isGdprValidated && this.isHostConfigured) {
|
|
|
|
+ await this.loadWebSocket()
|
|
|
|
+ if (!this.areScenesLoaded) await this.loadScenes()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
async load(fn, loadingMessage) {
|
|
async load(fn, loadingMessage) {
|
|
try {
|
|
try {
|
|
@@ -132,7 +126,6 @@ export default {
|
|
loadWebSocket() {
|
|
loadWebSocket() {
|
|
return this.load(this.connectToWs, 'Connecting to WebSocket server...')
|
|
return this.load(this.connectToWs, 'Connecting to WebSocket server...')
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|