7373 </v-toolbar-title >
7474 </v-hover >
7575 <v-progress-linear
76- v-if =" loading"
76+ v-if =" loading || childLoading "
7777 indeterminate
7878 absolute
7979 bottom
8080 />
8181 <v-spacer />
8282
8383 <create-modify-dialog :workspace =" workspace" @success =" startChecking" />
84- <workspace-option-menu :workspace =" workspace" />
84+ <workspace-option-menu :workspace =" workspace" @loading = " handleLoading " />
8585 </v-app-bar >
8686
8787 <!-- Display upload status -->
147147 </v-row >
148148 </v-alert >
149149
150- <session-panel :apps =" apps" :workspace =" workspace" :loading =" loading" />
150+ <session-panel :apps =" apps" :workspace =" workspace" :loading =" loading || childLoading " />
151151
152152 <v-row class =" ma-0" >
153153 <v-col
162162 <network-panel
163163 :workspace =" workspace"
164164 :items =" networks"
165- :loading =" loading"
165+ :loading =" loading || childLoading "
166166 :apps =" apps"
167167 />
168168 </v-card >
180180 <table-panel
181181 :workspace =" workspace"
182182 :items =" tables"
183- :loading =" loading"
183+ :loading =" loading || childLoading "
184184 :apps =" apps"
185185 />
186186 </v-card >
@@ -195,14 +195,14 @@ import {
195195 ref , computed , watch ,
196196} from ' vue' ;
197197
198+ import { useRouter } from ' vue-router/composables' ;
198199import api from ' @/api' ;
199200import TablePanel from ' @/components/TablePanel.vue' ;
200201import NetworkPanel from ' @/components/NetworkPanel.vue' ;
201202import SessionPanel from ' @/components/SessionPanel.vue' ;
202203import store from ' @/store' ;
203204import WorkspaceOptionMenu from ' @/components/WorkspaceOptionMenu.vue' ;
204205import type { App } from ' @/types' ;
205- import { useRouter } from ' vue-router/composables' ;
206206
207207const surroundingWhitespace = / ^ \s + | \s + $ / ;
208208const workspaceNameRules: Array <(x : string ) => string | boolean > = [
@@ -221,6 +221,7 @@ const localWorkspace = ref<string | null>(null);
221221const editing = ref (false );
222222const requestError = ref <string | null >(null );
223223const loading = ref (false );
224+ const childLoading = ref (false );
224225const tables = computed (() => store .getters .tables );
225226const networks = computed (() => store .getters .networks );
226227const uploads = computed (() => store .state .uploads .filter (
@@ -282,6 +283,11 @@ async function update(this: any) {
282283 loading .value = false ;
283284}
284285
286+ // handle the loading state from child emits function
287+ function handleLoading(newLoading : boolean ) {
288+ childLoading .value = newLoading ;
289+ }
290+
285291watch (() => props .workspace , () => update ());
286292watch (localWorkspace , () => { requestError .value = null ; });
287293
0 commit comments