mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2025-01-05 18:26:56 +01:00
Remove April Mop
This commit is contained in:
parent
20b056148b
commit
0f765a80a3
2 changed files with 3 additions and 48 deletions
|
@ -3,7 +3,6 @@
|
|||
import { mdiStar } from '@mdi/js';
|
||||
|
||||
import Icon from '../../components/Icon.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let avg;
|
||||
export let type;
|
||||
|
@ -11,8 +10,6 @@
|
|||
export let legendaryPity = type.id === 'weapon-event' ? 80 : 90;
|
||||
export let colorMultiplier = 120;
|
||||
|
||||
const original = [...avg.legendary.pulls];
|
||||
|
||||
let numberFormat = Intl.NumberFormat('en', {
|
||||
maximumFractionDigits: 2,
|
||||
minimumFractionDigits: 0,
|
||||
|
@ -23,27 +20,6 @@
|
|||
return `color: hsl(${hue}, 100%, 60%);`;
|
||||
}
|
||||
|
||||
function wow() {
|
||||
for (const pull of avg.legendary.pulls) {
|
||||
if (pull.pity >= 90) continue;
|
||||
pull.pity += 1;
|
||||
}
|
||||
|
||||
avg.legendary.pulls = avg.legendary.pulls;
|
||||
}
|
||||
|
||||
let interval;
|
||||
onMount(() => {
|
||||
interval = setInterval(() => {
|
||||
wow();
|
||||
}, 500);
|
||||
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
avg.legendary.pulls = original;
|
||||
}, 60000);
|
||||
});
|
||||
|
||||
$: textSize = avg.legendary.total > 20 ? 'text-sm' : 'text-base';
|
||||
</script>
|
||||
|
||||
|
@ -148,9 +124,8 @@
|
|||
{#each avg.legendary.pulls as pull}
|
||||
<span class="pity rate-{pull.rate} {textSize}"
|
||||
>{$t(pull.name)}
|
||||
<!-- <span style={calculateColor((legendaryPity - pull.pity) / legendaryPity)}>{pull.pity}</span> -->
|
||||
<span class="rainbow">{pull.pity}</span>
|
||||
</span>
|
||||
<span style={calculateColor((legendaryPity - pull.pity) / legendaryPity)}>{pull.pity}</span></span
|
||||
>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -200,24 +175,4 @@
|
|||
break-inside: avoid;
|
||||
}
|
||||
}
|
||||
|
||||
.rainbow {
|
||||
background-image: repeating-linear-gradient(45deg, green, yellow, orange, red);
|
||||
background-size: 800% 800%;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
animation: rainbow 5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes rainbow {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 25%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -7,7 +7,7 @@ const IMAGE_CACHE = `cacheimg${IMAGE_CACHE_VER}`;
|
|||
|
||||
const IMAGE_URL = `${self.location.origin}/images/`;
|
||||
|
||||
const changelog = ['Update Timeline'];
|
||||
const changelog = ['Remove April Mop 😂', 'Update Timeline'];
|
||||
|
||||
const channel = new BroadcastChannel('paimonmoe-sw');
|
||||
|
||||
|
|
Loading…
Reference in a new issue