Implement loading (#104)

* Implement loading

* LoadingBar

* Run linter

* Update App.vue

* Loading bar all the things

* Update SplashScreen.vue

* Update SplashScreen.vue

* Update App.vue

* initial revert

* Update Instance.vue

* revert css

* Fix instance

* More reverting

* Run lint

* Finalize changes

* Revert "Merge branch 'master' into loading"

This reverts commit 3014e765fb6fb343f3030fd8a822edd97fb2af41, reversing
changes made to b780e859d2b53a203eb3561ba3be88af083d9c15.

* Fix loading issues

* fix lint

* Revert "Revert "Merge branch 'master' into loading""

This reverts commit 971ef8466613579b7f523edbd25b692df62d0f86.

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
Adrian O.V
2023-05-10 18:50:42 -04:00
committed by GitHub
parent 9be0d16f75
commit 71cf2c53f5
21 changed files with 463 additions and 188 deletions

View File

@@ -68,9 +68,9 @@ import {
get_uuids_by_profile_path,
kill_by_uuid,
} from '@/helpers/process'
import { process_listener } from '@/helpers/events'
import { process_listener, profile_listener } from '@/helpers/events'
import { useRoute } from 'vue-router'
import { shallowRef, ref, onUnmounted } from 'vue'
import { ref, onUnmounted } from 'vue'
import { convertFileSrc } from '@tauri-apps/api/tauri'
import { open } from '@tauri-apps/api/dialog'
import { useBreadcrumbs, useSearch } from '@/store/state'
@@ -79,15 +79,21 @@ const route = useRoute()
const searchStore = useSearch()
const breadcrumbs = useBreadcrumbs()
const instance = shallowRef(await get(route.params.id))
searchStore.instanceContext = instance.value
const instance = ref(await get(route.params.id))
searchStore.instanceContext = instance.value
breadcrumbs.setName('Instance', instance.value.metadata.name)
breadcrumbs.setContext({
name: instance.value.metadata.name,
link: route.path,
})
profile_listener(async (event) => {
if (event.profile_path === route.params.id) {
instance.value = await get(route.params.id)
}
})
const uuid = ref(null)
const playing = ref(false)
const loading = ref(false)