fix: 🥴

This commit is contained in:
ThatOneCalculator 2022-12-17 18:31:11 -08:00
parent af86c98efa
commit 943f1e9b4f
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 28 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "13.0.5-rc.7", "version": "13.0.5-rc.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 ref="instanceIcon" :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon" @click="easterEgg"/> <img ref="instanceIcon" :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" aria-label="none" class="icon" :class="instanceIconAnimation" @click="easterEgg"/>
<div class="name"> <div class="name">
<b>{{ $instance.name || host }}</b> <b>{{ $instance.name || host }}</b>
</div> </div>
@ -174,17 +174,17 @@ async function sleep(seconds) {
function easterEgg() { function easterEgg() {
iconClicks++; iconClicks++;
instanceIconAnimation = 'none'; instanceIconAnimation = 'noAnimation';
console.log(iconClicks); console.log(instanceIconAnimation);
sleep(0.1); sleep(0.1);
const normalizedCount = (iconClicks % 3) + 1; const normalizedCount = (iconClicks % 3) + 1;
instanceIconAnimation = `iconShake${normalizedCount} 0.${normalizedCount}s`; instanceIconAnimation = `shake${normalizedCount}`;
if (iconClicks % 3 === 0) { if (iconClicks % 3 === 0) {
console.log('here');
defaultStore.state.woozyMode = !defaultStore.state.woozyMode; defaultStore.state.woozyMode = !defaultStore.state.woozyMode;
sleep(0.4); sleep(0.4);
instanceIconAnimation = 'none'; instanceIconAnimation = 'noAnimation';
instanceIconAnimation = 'swpinY 0.9s'; instanceIconAnimation = 'doSpinY';
console.log(instanceIconAnimation);
if (iconClicks % 6 === 0) { if (iconClicks % 6 === 0) {
instanceIcon.src = instance.iconUrl || instance.faviconUrl || '/favicon.ico' instanceIcon.src = instance.iconUrl || instance.faviconUrl || '/favicon.ico'
} }
@ -274,7 +274,26 @@ function syncSlide(index) {
margin: 16px auto 0 auto; margin: 16px auto 0 auto;
height: 64px; height: 64px;
border-radius: 8px; border-radius: 8px;
animation: v-bind('instanceIconAnimation');
&.noAnimation {
animation: none;
}
&.shake1 {
animation: iconShake1 0.1s 1;
}
&.shake2 {
animation: iconShake2 0.2s 1;
}
&.shake3 {
animation: iconShake3 0.3s 1;
}
&.doSpinY {
animation: spinY 0.9s 1;
}
} }
> .name { > .name {