From 2fd7b2348b8e34ff0e95b934a450a80424d76dab 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 24db1abb..2b0de454 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 1a11b057..94d66ffa 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") }}