Skip to content

Commit

Permalink
fix #2 & #3 related to testnet support
Browse files Browse the repository at this point in the history
  • Loading branch information
hellwolf committed Dec 23, 2019
1 parent 22d4f4b commit c3ec769
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<v-alert type="warning" dismissible class="black--text" light>
This website is for Multi-Collateral DAI. To redeem your SAI, visit <a href="rsai.rdai.money">rsai.rdai.money</a>
</v-alert>
<v-alert type="error" dismissible class="black--text" light v-if="chainName!== 'Mainnet' && chainName !== 'Kovan'">
The {{ chainName }} Network is not supported. Please switch to Mainnet or Kovan
</v-alert>
<v-tabs
v-model="tab"
light
Expand Down
21 changes: 14 additions & 7 deletions src/views/Choose.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default {
...mapState(["allHats"]),
...mapGetters(["hasWeb3", "userHat", "rDAIdevs"]),
allHatsLength() {
return this.allHats.length;
return this.allHats.length + 2;
},
listOfHatsLength() {
return this.listOfHats.length;
Expand Down Expand Up @@ -191,6 +191,7 @@ export default {
});
this.listOfHats = list;
} else this.listOfHats = featured;
return this.listOfHats.length;
}
},
watch: {
Expand All @@ -200,20 +201,26 @@ export default {
listOfHatsLength() {
this.columns = [[], [], [], []];
this.listOfHats.forEach((item, index) => {
if (item.hatID !== 2) {
if (item.hatID === this.userHat.hatID)
this.columns[index % this.numberOfColumns].unshift(item);
else this.columns[index % this.numberOfColumns].push(item);
}
if (item.hatID === this.userHat.hatID)
this.columns[index % this.numberOfColumns].unshift(item);
else this.columns[index % this.numberOfColumns].push(item);
});
},
hasWeb3(){
this.loadAll();
}
},
mounted() {
if (this.$vuetify.breakpoint.xsOnly) this.numberOfColumns = 1;
if (this.$vuetify.breakpoint.smOnly) this.numberOfColumns = 2;
if (this.$vuetify.breakpoint.mdOnly) this.numberOfColumns = 3;
if (this.$vuetify.breakpoint.lgOnly) this.numberOfColumns = 4;
this.loadAll();
const length = this.loadAll();
if(length < this.numberOfColumns) {
console.log("length: ", length, " this.numberOfColumns: ", this.numberOfColumns);
this.numberOfColumns = length;
this.loadAll();
}
}
};
</script>

0 comments on commit c3ec769

Please sign in to comment.