fix: 🥴

This commit is contained in:
ThatOneCalculator 2022-12-17 17:22:18 -08:00
parent b1fbbbe426
commit 14fbddaefb
No known key found for this signature in database
GPG key ID: 8703CACD01000000
2 changed files with 16 additions and 16 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "13.0.7", "version": "13.0.8",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -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 :src="defaultStore.woozyMode ? '/assets/woozy.png' : $instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon" @click="easterEgg"/> <img ref="instanceIcon" :src="defaultStore.woozyMode ? '/assets/woozy.png' : $instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon" @click="easterEgg"/>
<div class="name"> <div class="name">
<b>{{ $instance.name || host }}</b> <b>{{ $instance.name || host }}</b>
</div> </div>
@ -167,6 +167,20 @@ definePageMetadata(computed(() => ({
icon: 'ph-info-bold ph-lg', icon: 'ph-info-bold ph-lg',
}))); })));
async function easterEgg(): Promise<void> {
iconClicks++;
instanceIcon.style.animation = 'unset';
await sleep(0.1);
const normalizedCount = (iconClicks % 3) + 1;
instanceIcon.style.animation = `iconShake${normalizedCount} 0.${normalizedCount}s 1`;
if (iconClicks % 3 === 0) {
defaultStore.set('woozyMode', !defaultStore.woozyMode);
await sleep(0.4);
instanceIcon.style.animation = 'unset';
instanceIcon.style.animation = 'swpinY 0.9s 1';
}
}
let swiperRef = null; let swiperRef = null;
async function sleep(seconds) { async function sleep(seconds) {
@ -186,20 +200,6 @@ function syncSlide(index) {
swiperRef.slideTo(index); swiperRef.slideTo(index);
} }
async function easterEgg() {
iconClicks++;
instanceIcon.style.animation = 'unset';
await sleep(0.1);
const normalizedCount = (iconClicks % 3) + 1;
instanceIcon.style.animation = `iconShake${normalizedCount} 0.${normalizedCount}s 1`;
if (iconClicks % 3 === 0) {
defaultStore.set('woozyMode', !defaultStore.woozyMode);
await sleep(0.4);
instanceIcon.style.animation = 'unset';
instanceIcon.style.animation = 'swpinY 0.9s 1';
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>