From e140f2e4c7ad63b082cbdfc79c26293694c2f4f6 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sun, 18 Aug 2024 16:46:56 +0200 Subject: [PATCH] feat: make skeletons rounded, only display them after 400ms (#1402) --- frontend/src/components/Skeleton.vue | 11 ++++++++++- .../src/pages/[user]/[project]/versions/index.vue | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Skeleton.vue b/frontend/src/components/Skeleton.vue index 24db1abb3..2b0de454c 100644 --- a/frontend/src/components/Skeleton.vue +++ b/frontend/src/components/Skeleton.vue @@ -7,10 +7,19 @@ withDefaults( animated: true, } ); + +const show = ref(false); +if (import.meta.client) { + onMounted(() => { + setTimeout(() => { + show.value = true; + }, 400); + }); +} diff --git a/frontend/src/pages/[user]/[project]/versions/index.vue b/frontend/src/pages/[user]/[project]/versions/index.vue index 1a11b0571..b24cec1e9 100644 --- a/frontend/src/pages/[user]/[project]/versions/index.vue +++ b/frontend/src/pages/[user]/[project]/versions/index.vue @@ -92,7 +92,10 @@ function getVisibilityTitle(visibility: Visibility) {
    - + {{ i18n.t("version.page.noVersions") }}