This repository has been archived on 2024-03-13. You can view files and clone it, but cannot push or open issues or pull requests.
timekeeper/components/MaxEnergyUpgradeButton.vue

40 lines
819 B
Vue
Raw Normal View History

<template>
<progress-button
:label="label"
:description="description"
:max="$store.state.nextFluxCapacitorCost"
:value="$store.state.currency"
:current="$store.state.energyMax"
:next="$store.state.energyMax + 200"
@click="upgrade"
/>
</template>
<script>
export default {
computed: {
label() {
return `L${this.$store.state.fluxCapacitorLevel} Flux Capacitor`
},
description() {
return `Increase maximum energy.`
},
current() {
return this.$store.state.energyMax
},
next() {
return this.$store.state.energyMax + 200
},
},
methods: {
upgrade() {
this.$store.commit(
'spendCurrency',
this.$store.state.nextFluxCapacitorCost
)
this.$store.commit('upgradeMaxEnergy')
},
},
}
</script>