profiling + research + download

This commit is contained in:
Florinda
2024-11-27 09:33:08 +01:00
parent 818ed15ca0
commit ddd06350cd
15 changed files with 578 additions and 34 deletions

View File

@@ -0,0 +1,35 @@
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
export const LoadingStore = defineStore('loading_store', () => {
const scenario_loading = ref(false)
const user_loading = ref(false)
const another_loading = ref(false)
const exectuion_loading = ref(false)
const re_loading = ref(false)
const isLoading = computed(() => {
return scenario_loading.value || user_loading.value || another_loading.value || exectuion_loading.value || re_loading.value
})
const loadingType = computed(() => {
if(exectuion_loading.value) return 'ai'
if(re_loading.value) return 'ai'
if(scenario_loading.value) return 'data'
if(user_loading.value) return 'data'
if(another_loading.value) return 'data'
return 'none'
})
return {isLoading,
user_loading,
scenario_loading,
another_loading,
exectuion_loading,
re_loading,
loadingType
}
})