chore: make skeleton delay optional

This commit is contained in:
MiniDigger | Martin 2024-08-18 17:15:48 +02:00
parent 2fd7b2348b
commit df5fdb476b
2 changed files with 6 additions and 4 deletions

View File

@ -1,15 +1,17 @@
<script lang="ts" setup>
withDefaults(
const props = withDefaults(
defineProps<{
animated?: boolean;
delay?: boolean;
}>(),
{
animated: true,
delay: false,
}
);
const show = ref(false);
if (import.meta.client) {
if (import.meta.client && props.delay) {
onMounted(() => {
setTimeout(() => {
show.value = true;

View File

@ -93,8 +93,8 @@ function getVisibilityTitle(visibility: Visibility) {
<section class="basis-full md:basis-11/15 flex-grow">
<ul>
<template v-if="versionsStatus === 'loading'">
<Skeleton class="mb-2 h-[90px]" />
<Skeleton class="mb-2 h-[90px]" />
<Skeleton class="mb-2 h-[90px]" delay />
<Skeleton class="mb-2 h-[90px]" delay />
</template>
<Alert v-else-if="!versions?.result?.length" type="info"> {{ i18n.t("version.page.noVersions") }} </Alert>
<Pagination