Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues related to testnet support #11

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>