fix: 🥴
This commit is contained in:
parent
040c1a2ae2
commit
0bc6f27e32
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "13.0.5",
|
"version": "13.0.6",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="_formRoot">
|
<div class="_formRoot">
|
||||||
<div class="_formBlock fwhjspax" :style="{ backgroundImage: `url(${ $instance.bannerUrl })` }">
|
<div class="_formBlock fwhjspax" :style="{ backgroundImage: `url(${ $instance.bannerUrl })` }">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<img ref="icon" :src="defaultStore.woozyMode ? '/assets/woozy.png' : $instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon"/>
|
<img ref="instanceIcon" :src="defaultStore.woozyMode ? '/assets/woozy.png' : $instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon"/>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<b>{{ $instance.name || host }}</b>
|
<b>{{ $instance.name || host }}</b>
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,7 +120,7 @@ withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
let stats = $ref(null);
|
let stats = $ref(null);
|
||||||
let icon = $ref<HTMLElement>(null);
|
let instanceIcon = $ref<HTMLImageElement>();
|
||||||
let iconClicks = 0;
|
let iconClicks = 0;
|
||||||
let tabs = ['overview', 'emojis', 'charts'];
|
let tabs = ['overview', 'emojis', 'charts'];
|
||||||
let tab = $ref(tabs[0]);
|
let tab = $ref(tabs[0]);
|
||||||
|
@ -187,16 +187,17 @@ function syncSlide(index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
icon.addEventListener('click', async () => {
|
instanceIcon.addEventListener('click', async () => {
|
||||||
iconClicks++;
|
iconClicks++;
|
||||||
icon.style.animation = 'unset';
|
instanceIcon.style.animation = 'unset';
|
||||||
await sleep(0.1);
|
await sleep(0.1);
|
||||||
icon.style.animation = `iconShake${(iconClicks % 3) + 1} 1 0.3s`;
|
const normalizedCount = (iconClicks % 3) + 1;
|
||||||
|
instanceIcon.style.animation = `iconShake${normalizedCount} 0.${normalizedCount}s 1`;
|
||||||
if (iconClicks % 3 === 0) {
|
if (iconClicks % 3 === 0) {
|
||||||
defaultStore.set('woozyMode', !defaultStore.woozyMode);
|
defaultStore.set('woozyMode', !defaultStore.woozyMode);
|
||||||
await sleep(1.5);
|
await sleep(0.4);
|
||||||
icon.style.animation = 'unset';
|
instanceIcon.style.animation = 'unset';
|
||||||
icon.style.animation = 'swpinY 1 0.6s';
|
instanceIcon.style.animation = 'swpinY 0.9s 1';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue