fix: load base data before view data

This commit is contained in:
axolotle 2024-08-21 21:25:44 +02:00
parent 65da87bee2
commit bdb283a80c

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted } from 'vue' import { onMounted, ref } from 'vue'
import { useInfos } from '@/composables/useInfos' import { useInfos } from '@/composables/useInfos'
import { useRequests } from '@/composables/useRequests' import { useRequests } from '@/composables/useRequests'
@ -10,7 +10,8 @@ const { ssoLink, connected, yunohost, logout, onAppCreated } = useInfos()
const { locked } = useRequests() const { locked } = useRequests()
const { spinner, dark } = useSettings() const { spinner, dark } = useSettings()
onAppCreated() const ready = ref(false)
onAppCreated().then(() => ready.value = true)
onMounted(() => { onMounted(() => {
const copypastaCode = ['ArrowDown', 'ArrowDown', 'ArrowUp', 'ArrowUp'] const copypastaCode = ['ArrowDown', 'ArrowDown', 'ArrowUp', 'ArrowUp']
@ -106,7 +107,7 @@ onMounted(() => {
</header> </header>
<!-- MAIN --> <!-- MAIN -->
<MainLayout /> <MainLayout v-if="ready" />
<BModalOrchestrator /> <BModalOrchestrator />