fix: 🥚 animation
This commit is contained in:
parent
97d395ce2a
commit
accbb55be0
2 changed files with 13 additions and 21 deletions
|
@ -270,24 +270,27 @@ function easterEgg() {
|
||||||
defaultStore.state.woozyMode = !defaultStore.state.woozyMode;
|
defaultStore.state.woozyMode = !defaultStore.state.woozyMode;
|
||||||
defaultStore.set("woozyMode", defaultStore.state.woozyMode);
|
defaultStore.set("woozyMode", defaultStore.state.woozyMode);
|
||||||
if (instanceIcon) {
|
if (instanceIcon) {
|
||||||
|
instanceIconAnimation.value = "spin";
|
||||||
|
setTimeout(() => {
|
||||||
if (iconClicks % 6 === 0) {
|
if (iconClicks % 6 === 0) {
|
||||||
iconSrc.value =
|
iconSrc.value =
|
||||||
instance.iconUrl || instance.faviconUrl || "/favicon.ico";
|
instance.iconUrl ||
|
||||||
|
instance.faviconUrl ||
|
||||||
|
"/favicon.ico";
|
||||||
} else {
|
} else {
|
||||||
iconSrc.value = "/static-assets/woozy.png";
|
iconSrc.value = "/static-assets/woozy.png";
|
||||||
}
|
}
|
||||||
instanceIcon.src = iconSrc.value;
|
instanceIcon.src = iconSrc.value;
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(iconSrc, (newValue, oldValue) => {
|
watch(iconSrc, (newValue, oldValue) => {
|
||||||
if (newValue !== oldValue) {
|
if (newValue !== oldValue) {
|
||||||
instanceIconAnimation.value = "spin";
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
instanceIconAnimation.value = "";
|
instanceIconAnimation.value = "";
|
||||||
}, 1000);
|
}, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -957,15 +957,4 @@ hr {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@keyframes spinY {
|
|
||||||
0% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue