diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index be4124329..fc22fa4a6 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -1,35 +1,29 @@ diff --git a/theseus_gui/src/components/ui/Instance.vue b/theseus_gui/src/components/ui/Instance.vue index ceb74e181..f94e623de 100644 --- a/theseus_gui/src/components/ui/Instance.vue +++ b/theseus_gui/src/components/ui/Instance.vue @@ -1,6 +1,6 @@ diff --git a/theseus_gui/src/main.js b/theseus_gui/src/main.js index e79e06b15..75c8357db 100644 --- a/theseus_gui/src/main.js +++ b/theseus_gui/src/main.js @@ -16,8 +16,10 @@ app.use(pinia) app.use(FloatingVue) app.mixin(loadCssMixin) +const mountedApp = app.mount('#app') + initialize_state() - .then(() => app.mount('#app')) + .then(() => mountedApp.initialize()) .catch((err) => { console.error(err) }) diff --git a/theseus_gui/src/pages/Library.vue b/theseus_gui/src/pages/Library.vue index bb9120c0f..2dfeaa5b5 100644 --- a/theseus_gui/src/pages/Library.vue +++ b/theseus_gui/src/pages/Library.vue @@ -4,14 +4,21 @@ import { shallowRef } from 'vue' import { list } from '@/helpers/profile.js' import { useRoute } from 'vue-router' import { useBreadcrumbs } from '@/store/breadcrumbs' +import { loading_listener } from '@/helpers/events.js' +import { progress_bars_list } from '@/helpers/state.js' const route = useRoute() const breadcrumbs = useBreadcrumbs() -const profiles = await list() -const instances = shallowRef(Object.values(profiles)) +const instances = shallowRef(Object.values(await list())) +const loadingInstances = shallowRef(Object.values(await progress_bars_list())) breadcrumbs.setRootContext({ name: 'Library', link: route.path }) +loading_listener(async (profile) => { + console.log(profile) + instances.value = Object.values(await list()) + loadingInstances.value = Object.values(await progress_bars_list()) +})