11<script setup lang="ts">
22import { watch , onMounted , computed } from " vue" ;
3- import { oauthClient } from " ./api/auth" ;
43import { useTheme } from " vuetify/lib/framework.mjs" ;
54
65import ToggleCompareMap from " ./components/map/ToggleCompareMap.vue" ;
76import SideBars from " ./components/sidebars/SideBars.vue" ;
87import ControlsBar from " ./components/ControlsBar.vue" ;
8+ import SplashPage from " ./components/SplashPage.vue" ;
99
1010import {
1111 useAppStore ,
@@ -31,58 +31,49 @@ function onReady() {
3131 }
3232}
3333
34- const login = () => {
35- oauthClient .redirectToLogin ();
36- };
37-
3834onMounted (onReady );
3935watch (() => appStore .currentUser , onReady );
4036 </script >
4137
4238<template >
4339 <v-app >
44- <v-overlay
45- :model-value =" !appStore.currentUser"
46- absolute
47- persistent
48- :opacity =" 0.8"
49- scrim =" secondary"
50- class =" align-center justify-center"
51- >
52- <v-btn @click =" login" > Log in to Continue </v-btn >
53- </v-overlay >
54- <v-overlay
55- v-if =" appStore.currentUser"
56- :model-value =" showError"
57- absolute
58- :opacity =" 0.8"
59- class =" align-center justify-center"
60- >
61- <v-card class =" pa-3" >
62- <v-btn
63- icon
64- variant =" flat"
65- class =" pa-3"
66- style =" float : right "
67- @click.stop =" appStore.currentError = undefined"
68- >
69- <v-icon >mdi-close</v-icon >
70- </v-btn >
71- <v-card-title > Error: </v-card-title >
72- <v-card-text >
73- {{ appStore.currentError }}
74- </v-card-text >
75- </v-card >
76- </v-overlay >
77- <div >
78- <div
79- :class =" panelStore.draggingPanel ? 'main-area no-select' : 'main-area'"
80- @mousemove =" panelStore.dragPanel"
81- @mouseup =" panelStore.stopDrag"
40+ <SplashPage v-if =" ! appStore .currentUser " />
41+ <div v-else >
42+ <v-overlay
43+ v-if =" appStore.currentUser"
44+ :model-value =" showError"
45+ absolute
46+ :opacity =" 0.8"
47+ class =" align-center justify-center"
8248 >
83- <ToggleCompareMap />
84- <SideBars />
85- <ControlsBar />
49+ <v-card class =" pa-3" >
50+ <v-btn
51+ icon
52+ variant =" flat"
53+ class =" pa-3"
54+ style =" float : right "
55+ @click.stop =" appStore.currentError = undefined"
56+ >
57+ <v-icon >mdi-close</v-icon >
58+ </v-btn >
59+ <v-card-title > Error: </v-card-title >
60+ <v-card-text >
61+ {{ appStore.currentError }}
62+ </v-card-text >
63+ </v-card >
64+ </v-overlay >
65+ <div >
66+ <div
67+ :class ="
68+ panelStore.draggingPanel ? 'main-area no-select' : 'main-area'
69+ "
70+ @mousemove =" panelStore.dragPanel"
71+ @mouseup =" panelStore.stopDrag"
72+ >
73+ <ToggleCompareMap />
74+ <SideBars />
75+ <ControlsBar />
76+ </div >
8677 </div >
8778 </div >
8879 </v-app >
0 commit comments