mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 18:14:49 +00:00
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 commit3014e765fb, reversing changes made tob780e859d2. * Fix loading issues * fix lint * Revert "Revert "Merge branch 'master' into loading"" This reverts commit971ef84666. --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user