From accbb55be0a134cb87b4cfb6f90e38f78614aa02 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 25 Jul 2023 23:49:51 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A5=9A=20animation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/pages/about.vue | 23 +++++++++++++---------- packages/client/src/style.scss | 11 ----------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index 05a772f61..8a05e7343 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -270,24 +270,27 @@ function easterEgg() { defaultStore.state.woozyMode = !defaultStore.state.woozyMode; defaultStore.set("woozyMode", defaultStore.state.woozyMode); if (instanceIcon) { - if (iconClicks % 6 === 0) { - iconSrc.value = - instance.iconUrl || instance.faviconUrl || "/favicon.ico"; - } else { - iconSrc.value = "/static-assets/woozy.png"; - } - instanceIcon.src = iconSrc.value; + instanceIconAnimation.value = "spin"; + setTimeout(() => { + if (iconClicks % 6 === 0) { + iconSrc.value = + instance.iconUrl || + instance.faviconUrl || + "/favicon.ico"; + } else { + iconSrc.value = "/static-assets/woozy.png"; + } + instanceIcon.src = iconSrc.value; + }, 500); } } } watch(iconSrc, (newValue, oldValue) => { if (newValue !== oldValue) { - instanceIconAnimation.value = "spin"; - setTimeout(() => { instanceIconAnimation.value = ""; - }, 1000); + }, 500); } }); diff --git a/packages/client/src/style.scss b/packages/client/src/style.scss index aca9d14f3..46543eeba 100644 --- a/packages/client/src/style.scss +++ b/packages/client/src/style.scss @@ -957,15 +957,4 @@ hr { opacity: 0; } } - @keyframes spinY { - 0% { - opacity: 1; - } - 50% { - opacity: 0.2; - } - 100% { - opacity: 1; - } - } }