Fix galaxy autobuyer interval visibility

This commit is contained in:
Andrei Andreev 2019-07-24 22:02:15 +03:00 committed by GitHub
parent bad289a255
commit 062b4ec881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,8 @@ Vue.component("galaxy-autobuyer-box", {
return { return {
limitGalaxies: false, limitGalaxies: false,
isBuyMaxUnlocked: false, isBuyMaxUnlocked: false,
buyMax: false buyMax: false,
showInterval: false
}; };
}, },
watch: { watch: {
@ -24,10 +25,11 @@ Vue.component("galaxy-autobuyer-box", {
this.isBuyMaxUnlocked = this.autobuyer.isBuyMaxUnlocked; this.isBuyMaxUnlocked = this.autobuyer.isBuyMaxUnlocked;
this.limitGalaxies = this.autobuyer.limitGalaxies; this.limitGalaxies = this.autobuyer.limitGalaxies;
this.buyMax = this.autobuyer.buyMax; this.buyMax = this.autobuyer.buyMax;
this.showInterval = !this.autobuyer.isBuyMaxActive;
} }
}, },
template: template:
`<autobuyer-box :autobuyer="autobuyer" :showInterval="!buyMax" name="Automatic Galaxies"> `<autobuyer-box :autobuyer="autobuyer" :showInterval="showInterval" name="Automatic Galaxies">
<autobuyer-interval-button slot="beforeInterval" :autobuyer="autobuyer" /> <autobuyer-interval-button slot="beforeInterval" :autobuyer="autobuyer" />
<div> <div>
<div class="o-autobuyer-toggle-checkbox" @click="limitGalaxies = !limitGalaxies"> <div class="o-autobuyer-toggle-checkbox" @click="limitGalaxies = !limitGalaxies">