From c3ec76947b091fe7e9f7b52b79f2a3bdf7069738 Mon Sep 17 00:00:00 2001 From: Miao ZhiCheng Date: Mon, 23 Dec 2019 23:52:41 +0200 Subject: [PATCH] fix #2 & #3 related to testnet support --- src/App.vue | 3 +++ src/views/Choose.vue | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5937bbc1..020b2fd7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -46,6 +46,9 @@ This website is for Multi-Collateral DAI. To redeem your SAI, visit rsai.rdai.money + + The {{ chainName }} Network is not supported. Please switch to Mainnet or Kovan + { - 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() { @@ -213,7 +215,12 @@ export default { 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(); + } } };