2022-01-10 07:11:55 +00:00
|
|
|
<template>
|
2022-01-10 10:15:00 +00:00
|
|
|
<div class="p-8 relative">
|
2022-01-10 07:11:55 +00:00
|
|
|
<div class="key-art absolute top-8 left-0 right-0" />
|
|
|
|
<div
|
|
|
|
class="absolute top-0 bottom-0 left-0 right-0 flex items-center justify-center"
|
|
|
|
@click="$store.commit('addCurrency', 1)"
|
|
|
|
>
|
|
|
|
<span
|
2022-01-10 10:15:00 +00:00
|
|
|
class="spare-time flex flex-row items-center font-bold rounded-2xl select-none"
|
2022-01-10 07:11:55 +00:00
|
|
|
:class="`text-${$store.getters.activeTab.darkColor}`"
|
|
|
|
>
|
2022-01-12 01:17:11 +00:00
|
|
|
<span class="text-3xl md:text-5xl" v-text="currencyText" />
|
2022-01-10 07:11:55 +00:00
|
|
|
<span
|
|
|
|
class="fas fa-hourglass-half text-xl pt-1 pl-2 md:text-3xl md:pt-2"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-12 01:17:11 +00:00
|
|
|
<script>
|
|
|
|
export default {
|
2022-01-12 01:19:17 +00:00
|
|
|
computed: {
|
|
|
|
currencyText() {
|
|
|
|
if (this.$store.state.currency.greaterThan(1e7)) {
|
|
|
|
return this.$store.state.currency.toString()
|
|
|
|
}
|
|
|
|
return Math.floor(this.$store.state.currency)
|
|
|
|
},
|
|
|
|
},
|
2022-01-12 01:17:11 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-01-10 07:11:55 +00:00
|
|
|
<style scoped>
|
|
|
|
.key-art {
|
|
|
|
background: url('https://freesvg.org/img/johnny_automatic_hourglass.png');
|
|
|
|
background-size: contain;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: center;
|
|
|
|
opacity: 0.4;
|
|
|
|
height: calc(100% - 4rem); /* 4rem = top padding + bottom padding */
|
|
|
|
}
|
|
|
|
.spare-time {
|
2022-01-10 10:15:00 +00:00
|
|
|
--color: rgba(2555, 255, 255, 0.5);
|
|
|
|
background: var(--color);
|
|
|
|
box-shadow: 0px 0px 20px 20px var(--color);
|
2022-01-10 07:11:55 +00:00
|
|
|
transition: color 2000ms;
|
|
|
|
}
|
|
|
|
</style>
|