Skip to content

Commit

Permalink
Add Community and Core Devs Tabs (#1)
Browse files Browse the repository at this point in the history
* add coreDevs param

* Add community and core dev tab

* Update src/views/Proposals.vue

Co-authored-by: Fabien <[email protected]>

* Update matching

Co-authored-by: Fabien <[email protected]>
  • Loading branch information
brockelmore and bonustrack authored Aug 24, 2020
1 parent 2deee2f commit 52b6503
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/namespaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"address": "0xAba8cAc6866B83Ae4eec97DD07ED254282f6aD8A",
"token": "0xAba8cAc6866B83Ae4eec97DD07ED254282f6aD8A",
"image": "0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16",
"coreDevs": [
"0x683A78bA1f6b25E29fbBC9Cd1BFA29A51520De84"
],
"min": 100
},
"balancer": {
Expand All @@ -15,6 +18,8 @@
"address": "0xba100000625a3754423978a60c9317c58a424e3D",
"token": "0xba100000625a3754423978a60c9317c58a424e3D",
"image": "0xba100000625a3754423978a60c9317c58a424e3D",
"coreDevs": [
],
"min": 10
}
}
14 changes: 13 additions & 1 deletion src/views/Proposals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Block :slim="true">
<div class="px-4 py-3 bg-gray-dark">
<a
v-for="state in ['All', 'Active', 'Pending', 'Closed']"
v-for="state in ['All', 'Core devs', 'Community', 'Active', 'Pending', 'Closed']"
:key="state"
v-text="state"
@click="selectedState = state"
Expand Down Expand Up @@ -100,6 +100,18 @@ export default {
) {
return true;
}
if (
this.selectedState === 'Core devs' &&
proposal[1].address.includes(this.namespace.coreDevs)
) {
return true;
}
if (
this.selectedState === 'Community' &&
!proposal[1].address.includes(this.namespace.coreDevs)
) {
return true;
}
if (
this.selectedState === 'Closed' &&
proposal[1].msg.payload.end <= ts
Expand Down

0 comments on commit 52b6503

Please sign in to comment.