diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml
index a6ba0ace0..653a39f01 100644
--- a/.github/workflows/deploy-dev.yml
+++ b/.github/workflows/deploy-dev.yml
@@ -59,6 +59,9 @@ jobs:
CAPTCHA_HOST: ${{ vars.CAPTCHA_HOST }}
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }}
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }}
+ JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }}
+ JOIN_URI: 'https://join.hypha.earth/'
+
- name: S3 sync
uses: jakejarvis/s3-sync-action@master
diff --git a/.github/workflows/deploy-eos-dev.yml b/.github/workflows/deploy-eos-dev.yml
index 38ad602d2..ec39fc326 100644
--- a/.github/workflows/deploy-eos-dev.yml
+++ b/.github/workflows/deploy-eos-dev.yml
@@ -74,6 +74,9 @@ jobs:
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }}
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }}
+ JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }}
+ JOIN_URI: 'https://join.hypha.earth/'
+
- name: Deploy to S3 bucket
run: aws s3 sync ./dist/spa s3://${{ vars.AWS_S3_BUCKET}} --delete
- name: Invalidate CloudFront
diff --git a/.github/workflows/deploy-eos-prod.yml b/.github/workflows/deploy-eos-prod.yml
index e137842a1..2c8ee5a86 100644
--- a/.github/workflows/deploy-eos-prod.yml
+++ b/.github/workflows/deploy-eos-prod.yml
@@ -74,6 +74,9 @@ jobs:
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }}
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }}
+ JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }}
+ JOIN_URI: 'https://join.hypha.earth/'
+
- name: Deploy to S3 bucket
run: aws s3 sync ./dist/spa s3://${{ vars.AWS_S3_BUCKET}} --delete
- name: Invalidate CloudFront
diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml
index 7e7424bdb..6e1188605 100644
--- a/.github/workflows/deploy-prod.yml
+++ b/.github/workflows/deploy-prod.yml
@@ -64,6 +64,9 @@ jobs:
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }}
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }}
+ JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }}
+ JOIN_URI: 'https://join.hypha.earth/'
+
- name: S3 sync
uses: jakejarvis/s3-sync-action@master
with:
diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml
index 5ca9902bb..fef1be5f2 100644
--- a/.github/workflows/deploy-staging.yml
+++ b/.github/workflows/deploy-staging.yml
@@ -64,6 +64,8 @@ jobs:
CAPTCHA_HOST: ${{ vars.CAPTCHA_HOST }}
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }}
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }}
+ JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }}
+ JOIN_URI: 'https://join.hypha.earth/'
- name: S3 sync
uses: jakejarvis/s3-sync-action@master
diff --git a/quasar.conf.js b/quasar.conf.js
index d6c015147..9ae07f330 100644
--- a/quasar.conf.js
+++ b/quasar.conf.js
@@ -107,7 +107,9 @@ module.exports = function (ctx) {
CAPTCHA_PUBLIC_KEY: process.env.CAPTCHA_PUBLIC_KEY,
CAPTCHA_HOST: process.env.CAPTCHA_HOST,
CAPTCHA_NETWORK: process.env.CAPTCHA_NETWORK || 'telosTestnet',
- LOGIN_CONTRACT: process.env.LOGIN_CONTRACT
+ LOGIN_CONTRACT: process.env.LOGIN_CONTRACT,
+ JOIN_CONTRACT: process.env.JOIN_CONTRACT,
+ JOIN_URI: process.env.JOIN_URI
},
scopeHoisting: true,
diff --git a/src/boot/config.js b/src/boot/config.js
index d7b25f3c4..1ebed139d 100644
--- a/src/boot/config.js
+++ b/src/boot/config.js
@@ -3,13 +3,14 @@ export default async ({ Vue, store }) => {
const contracts = {
dao: process.env.DAO_CONTRACT,
decide: process.env.DECIDE_CONTRACT,
- hyphaToken: process.env.SUPPLY_CONTRACT,
+ hvoiceToken: process.env.HVOICE_TOKEN_CONTRACT,
hypha: process.env.HYPHA_CONTRACT,
- seedsToken: process.env.SEEDS_TOKEN_CONTRACT,
- seedsEscrow: process.env.SEEDS_ESCROW_CONTRACT,
- tlostoSeeds: process.env.TLOSTO_SEEDS,
+ hyphaToken: process.env.SUPPLY_CONTRACT,
+ join: process.env.JOIN_CONTRACT,
kv: process.env.KV_CONTRACT,
- hvoiceToken: process.env.HVOICE_TOKEN_CONTRACT
+ seedsEscrow: process.env.SEEDS_ESCROW_CONTRACT,
+ seedsToken: process.env.SEEDS_TOKEN_CONTRACT,
+ tlostoSeeds: process.env.TLOSTO_SEEDS
}
Vue.prototype.$config = {
diff --git a/src/components/dao/settings-tokens.vue b/src/components/dao/settings-tokens.vue
index de004e64d..215658682 100644
--- a/src/components/dao/settings-tokens.vue
+++ b/src/components/dao/settings-tokens.vue
@@ -2,6 +2,7 @@
import { mapActions, mapGetters } from 'vuex'
import { validation } from '~/mixins/validation'
import currency from 'src/data/currency.json'
+import map from '~/utils/map'
const mapCurrency = (currency) => (_) => ({
label: `${currency[_]?.symbol} - ${currency[_]?.name}`,
@@ -9,6 +10,9 @@ const mapCurrency = (currency) => (_) => ({
...currency[_]
})
+const MIN_DECAY = 0
+const MAX_DECAY = 10000000
+
export default {
name: 'settings-token',
mixins: [validation],
@@ -32,7 +36,6 @@ export default {
data () {
return {
-
tokens: {
// Treasury token (aka peg_token = treasuryDigits treasurySymbol)
treasuryName: null,
@@ -51,7 +54,6 @@ export default {
utilityDigits: 2, // 1.0, 1.00, 1.000
utilityTokenMultiplier: 1,
utilityAmount: null, // i.e 100000 or -1 for infinite supply
- // utilityValue: '1', // The equivalent value of 1 token in USD
// Voice token (aka voice_token = voiceDigits voiceSymbol)
voiceName: 'Voice Token',
@@ -81,7 +83,10 @@ export default {
try {
const isValid = await this.validate(this.tokens)
if (isValid) {
- await this.createTokens({ ...this.tokens })
+ await this.createTokens({
+ ...this.tokens,
+ voiceDecayPercent: map(this.tokens.voiceDecayPercent, 0, 100, MIN_DECAY, MAX_DECAY)
+ })
}
} catch (e) {
const message = e.message || e.cause.message
@@ -95,6 +100,7 @@ export default {
const [treasuryDigits, treasurySymbol] = this.daoSettings.settings_pegToken_a.split(' ')
const [utilityDigits, utilitySymbol] = this.daoSettings.settings_rewardToken_a.split(' ')
const [voiceDigits, voiceSymbol] = this.daoSettings.settings_voiceToken_a.split(' ')
+ const [utilityAmount] = this.daoSettings?.settings_rewardTokenMaxSupply_a?.split(' ')
this.tokens = {
// ...this.tokens,
@@ -102,19 +108,13 @@ export default {
treasurySymbol,
treasuryDigits: treasuryDigits.split('.')[1].length, // 1.0, 1.00, 1.000
treasuryTokenMultiplier: this.daoSettings.settings_treasuryTokenMultiplier_i,
- // treasuryCurrency: {
- // label: `${currency.USD?.symbol} - ${currency.USD?.name}`,
- // value: currency.USD.code,
- // ...currency.USD
- // },
// // Utility token
utilityName: this.daoSettings.settings_rewardTokenName_s || utilitySymbol,
utilitySymbol,
utilityDigits: utilityDigits.split('.')[1].length, // 1.0, 1.00, 1.000, // 1.0, 1.00, 1.000
utilityTokenMultiplier: this.daoSettings.settings_utilityTokenMultiplier_i,
- utilityAmount: this.daoSettings.settings_rewardTokenMaxSupply_a, // i.e 100000 or -1 for infinite supply
- // // utilityValue: '1', // The equivalent value of 1 token in USD
+ utilityAmount: parseInt(utilityAmount) === -1 ? '∞' : utilityAmount, // i.e 100000 or -1 for infinite supply
// // Voice token
voiceName: voiceSymbol,
@@ -122,7 +122,7 @@ export default {
voiceDigits: voiceDigits.split('.')[1].length,
voiceTokenMultiplier: this.daoSettings.settings_voiceTokenMultiplier_i,
voiceDecayPeriod: this.daoSettings.settings_voiceTokenDecayPeriod_i,
- voiceDecayPercent: this.daoSettings.settings_voiceTokenDecayPerPeriodX10M_i
+ voiceDecayPercent: map(this.daoSettings.settings_voiceTokenDecayPerPeriodX10M_i, MIN_DECAY, MAX_DECAY, 0, 100)
}
}
@@ -145,18 +145,18 @@ export default {
}
},
immediate: true
- },
-
- 'tokens.treasuryCurrency': {
- handler: function (value) {
- if (value) {
- this.tokens.treasuryName = value?.name
- this.tokens.treasurySymbol = value?.code
- }
- },
- immediate: true
}
+ // 'tokens.treasuryCurrency': {
+ // handler: function (value) {
+ // if (value) {
+ // this.tokens.treasuryName = value?.name
+ // this.tokens.treasurySymbol = value?.code
+ // }
+ // },
+ // immediate: true
+ // }
+
}
}
@@ -180,11 +180,16 @@ export default {
.col-12.col-md-6
label.h-label {{ $t('configuration.settings-tokens.tresury.form.name.label') }}
q-input.q-my-xs(
+ :debounce="200"
+ :disable="selectedDao.hasCustomToken"
+ :filled="selectedDao.hasCustomToken"
+ :placeholder="$t('configuration.settings-tokens.utility.form.name.placeholder')"
:rules="[rules.required]"
+ color="accent"
dense
- disable
- filled
lazy-rules
+ outlined
+ ref="treasuryName"
rounded
v-model='tokens.treasuryName'
)
@@ -193,13 +198,19 @@ export default {
.col-12.col-md-6
label.h-label {{ $t('configuration.settings-tokens.tresury.form.symbol.label') }}
q-input.q-my-xs(
- :rules="[rules.required]"
+ :debounce="200"
+ :disable="selectedDao.hasCustomToken"
+ :filled="selectedDao.hasCustomToken"
+ :placeholder="$t('configuration.settings-tokens.utility.form.symbol.placeholder')"
+ :rules="[rules.required, rules.isTokenAvailable]"
dense
- disable
- filled
lazy-rules
+ mask="AAAAAAAA"
+ maxlength="7"
+ outlined
+ ref="treasurySymbol"
rounded
- v-model='tokens.treasurySymbol'
+ v-model="tokens.treasurySymbol"
)
q-tooltip(:content-style="{ 'font-size': '1em' }" anchor="top middle" self="bottom middle" v-if="!selectedDao.hasCustomToken") {{ $t('common.onlyDaoAdmins') }}
@@ -241,7 +252,7 @@ export default {
.col-12
label.h-label {{ $t('configuration.settings-tokens.tresury.form.digits.label') }}
input-slider(
- :disable="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
:max="3"
:maxLabel="$t('configuration.settings-tokens.tresury.form.digits.morePrecise')"
:min="1"
@@ -262,8 +273,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.utility.form.name.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
:placeholder="$t('configuration.settings-tokens.utility.form.name.placeholder')"
:rules="[rules.required]"
color="accent"
@@ -280,8 +291,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.utility.form.symbol.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
:placeholder="$t('configuration.settings-tokens.utility.form.symbol.placeholder')"
:rules="[rules.required, rules.isTokenAvailable]"
dense
@@ -299,8 +310,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.utility.form.value.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
:placeholder="$t('configuration.settings-tokens.utility.form.value.placeholder')"
:rules="[rules.requiredIf(tokens.utilityAmount > 0)]"
color="accent"
@@ -317,8 +328,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.utility.form.multiplier.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
:rules="[rules.required]"
color="accent"
dense
@@ -334,7 +345,7 @@ export default {
.col-12
label.h-label {{ $t('configuration.settings-tokens.utility.form.digits.label') }}
input-slider(
- :disable="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
:max="3"
:maxLabel="$t('configuration.settings-tokens.tresury.form.digits.morePrecise')"
:min="1"
@@ -384,17 +395,19 @@ export default {
.row.q-col-gutter-md
.col-12.col-md-8(:class="{'q-mt-sm': !$q.screen.gt.md}")
label.h-label {{ $t('configuration.settings-tokens.voice.form.decayPeriod.label') }}
- custom-period-input.q-my-xs(:disable="selectedDao.hasCustomToken" v-model='tokens.voiceDecayPeriod')
+ custom-period-input.q-my-xs(:disable="selectedDao.hasCustomToken || !isAdmin" v-model='tokens.voiceDecayPeriod')
q-tooltip(:content-style="{ 'font-size': '1em' }" anchor="top middle" self="bottom middle" v-if="!selectedDao.hasCustomToken") {{ $t('common.onlyDaoAdmins') }}
.col-12.col-md-4(:class="{'q-mt-sm': !$q.screen.gt.md}")
label.h-label {{ $t('configuration.settings-tokens.voice.form.decayPercent.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
+ :max="100"
+ :min="0"
:placeholder="$t('configuration.settings-tokens.voice.form.decayPercent.placeholder')"
- :rules="[rules.required]"
+ :rules="[rules.required, rules.greaterThan(0), rules.lessOrEqualThan(100)]"
color="accent"
dense
lazy-rules
@@ -411,8 +424,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.voice.form.multiplier.label') }}
q-input.q-my-xs(
:debounce="200"
- :disable="selectedDao.hasCustomToken"
- :filled="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
+ :filled="selectedDao.hasCustomToken || !isAdmin"
:rules="[rules.required]"
color="accent"
dense
@@ -428,7 +441,7 @@ export default {
.col-12
label.h-label {{ $t('configuration.settings-tokens.voice.form.digits.label') }}
input-slider(
- :disable="selectedDao.hasCustomToken"
+ :disable="selectedDao.hasCustomToken || !isAdmin"
:max="3"
:maxLabel="$t('configuration.settings-tokens.tresury.form.digits.morePrecise')"
:min="1"
diff --git a/src/components/form/custom-period-input.vue b/src/components/form/custom-period-input.vue
index ced79791c..6a687b989 100644
--- a/src/components/form/custom-period-input.vue
+++ b/src/components/form/custom-period-input.vue
@@ -7,6 +7,7 @@ const secondsToInterval = (seconds) => {
let period = ''
+ const minutes = Math.floor(seconds / 60)
const hours = Math.floor(seconds / 3600)
const days = Math.floor(seconds / 86400)
const weeks = Math.floor(seconds / 604800)
@@ -20,16 +21,18 @@ const secondsToInterval = (seconds) => {
period = 'days'
} else if (hours > 0) {
period = 'hours'
+ } else if (minutes > 0) {
+ period = 'minutes'
}
- return { period, months, weeks, days, hours }
+ return { period, months, weeks, days, hours, minutes }
}
export default {
name: 'custom-period-input',
data () {
return {
- period: 'days'
+ period: ''
}
},
@@ -51,6 +54,7 @@ export default {
},
set (value) {
if (this.type === 'time' && this.period !== '') {
+ if (this.period === 'minutes') { value = (value * 60) }
if (this.period === 'hours') { value = (value * 60) * 60 }
if (this.period === 'days') { value = value * 24 * 60 * 60 }
if (this.period === 'weeks') { value = value * 7 * 24 * 60 * 60 }
@@ -65,8 +69,15 @@ export default {
label () { return this.$t(`periods.${this.period}`) }
},
- mounted () {
- this.period = secondsToInterval(this.value).period
+ watch: {
+ value: {
+ handler: function (value) {
+ if (value && !this.period) {
+ this.period = secondsToInterval(this.value).period
+ }
+ },
+ immediate: true
+ }
}
}
@@ -87,7 +98,11 @@ div.custom-period-input
.col-6
q-btn-dropdown.full-width(:disable="disable" :label="label" outline no-caps rounded unelevated)
q-list
- q-item(clickable v-close-popup @click="period = 'hours'")
+ q-item(clickable v-close-popup @click="period = 'minutes'")
+ q-item-section
+ q-item-label {{ $t('periods.minutes') }}
+
+ q-item(clickable v-close-popup @click="period = 'minutes'")
q-item-section
q-item-label {{ $t('periods.hours') }}
diff --git a/src/components/login/register-user-with-captcha-view.vue b/src/components/login/register-user-with-captcha-view.vue
index 45001f53e..5f9750174 100644
--- a/src/components/login/register-user-with-captcha-view.vue
+++ b/src/components/login/register-user-with-captcha-view.vue
@@ -6,6 +6,8 @@ import ipfsy from '~/utils/ipfsy'
import { Notify } from 'quasar'
import slugify from '~/utils/slugify'
+const HELP_LINK = 'https://help.hypha.earth/hc/2431449449'
+
export default {
name: 'register-user-with-captcha-view',
mixins: [validation],
@@ -50,6 +52,7 @@ export default {
}
}
return {
+ HELP_LINK: HELP_LINK,
stepIndex: {
captcha: 1,
inviteLink: 2,
@@ -205,6 +208,9 @@ export default {
]
})
}
+ },
+ goToDocumentation() {
+ window.location.href = this.HELP_LINK
}
}
}
@@ -265,7 +271,7 @@ export default {
.text-bold.text-black.q-mt-md {{ $t('login.register-user-with-captcha-view.signYourFirstTransaction') }}
p.text-normal.q-mt-xs {{ $t('login.register-user-with-captcha-view.didYouCreate') }}
.row.flex.justify-center.items-center.q-mt-xl
- .text-primary.text-bold.cursor-pointer(@click="next") {{ $t('login.register-user-with-captcha-view.needHelp') }}
+ .text-primary.text-bold.cursor-pointer(@click="goToDocumentation()") {{ $t('login.register-user-with-captcha-view.needHelp') }}
#form4.flex.column.justify-between.no-wrap.full-height(v-show="step === this.steps.create.name")
div.full-height.column.justify-end
.font-lato.text-heading.text-weight-bolder(:style="{ 'font-size': '34px' }") {{ $t('login.register-user-with-captcha-view.createYourDao') }}
diff --git a/src/components/navigation/dho-card.vue b/src/components/navigation/dho-card.vue
index 07c9fe0a1..b253f267a 100644
--- a/src/components/navigation/dho-card.vue
+++ b/src/components/navigation/dho-card.vue
@@ -37,7 +37,7 @@ export default {
this.$q.notify({
color: 'secondary',
textColor: 'white',
- message: 'The link has been copied',
+ message: this.$('messages.linkCopied'),
icon: 'far fa-copy',
timeout: 5000,
actions: [{ icon: 'fas fa-times', color: 'white' }]
diff --git a/src/components/navigation/dho-info.vue b/src/components/navigation/dho-info.vue
index cc1925ea7..57b2b2f02 100644
--- a/src/components/navigation/dho-info.vue
+++ b/src/components/navigation/dho-info.vue
@@ -55,7 +55,7 @@ export default {
this.$q.notify({
color: 'secondary',
textColor: 'white',
- message: 'The link has been copied',
+ message: this.$('messages.linkCopied'),
icon: 'far fa-copy',
timeout: 5000,
actions: [{ icon: 'fas fa-times', color: 'white' }]
diff --git a/src/components/proposals/proposal-view.vue b/src/components/proposals/proposal-view.vue
index 447f473d2..0652e98f0 100644
--- a/src/components/proposals/proposal-view.vue
+++ b/src/components/proposals/proposal-view.vue
@@ -78,7 +78,8 @@ export default {
parentQuest: Object,
votingMethod: String,
circle: Object,
- parentCircle: Array
+ parentCircle: Array,
+ hidePolicyHistory: Boolean
},
data () {
return {
@@ -213,7 +214,7 @@ widget.proposal-view.q-mb-sm
.column
.text-h5.text-bold {{ title }}
.text-italic.text-body {{ subtitle }}
- version-history(v-if="type === PROPOSAL_TYPE.POLICY" :proposalId="proposal?.docId ? proposal.docId : docId")
+ version-history(v-if="type === PROPOSAL_TYPE.POLICY && !hidePolicyHistory" :proposalId="proposal?.docId ? proposal.docId : docId")
quest-progression(v-if="type === PROPOSAL_TYPE.QUEST_START" :proposalId="proposal?.docId ? proposal.docId : docId")
.q-my-sm(:class="{ 'row':$q.screen.gt.md }" v-if="type === PROPOSAL_TYPE.ROLE || type === PROPOSAL_TYPE.EDIT || type === PROPOSAL_TYPE.PAYOUT || type === PROPOSAL_TYPE.ABILITY || type === PROPOSAL_TYPE.BADGE")
.col.bg-internal-bg.rounded-border(:class="{ 'q-mr-xs':$q.screen.gt.md, 'q-mb-sm':$q.screen.lt.md || $q.screen.md }" v-if="icon")
diff --git a/src/components/proposals/version-history.vue b/src/components/proposals/version-history.vue
index 270b57264..0915dbfa5 100644
--- a/src/components/proposals/version-history.vue
+++ b/src/components/proposals/version-history.vue
@@ -25,7 +25,7 @@ export default {
return {
state: policy.details_state_s,
originalApprovedDate: policy.system_originalApprovedDate_t,
- masterpolicy: policy.masterpolicy
+ masterpolicy: policy?.masterpolicy
}
},
skip () { return !this.selectedDao?.docId || !this.proposalId },
@@ -43,29 +43,29 @@ export default {
}
-.version-history(v-if="versionHistory.state !== PROPOSAL_STATE.DRAFTED")
+.version-history(v-if="versionHistory?.state !== PROPOSAL_STATE.DRAFTED")
.text-grey.text-italic.q-mb-sm(:style="{ 'font-size': '12px' }") {{ $t('proposals.version-history.versionHistory') }}
.row
- .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-if="versionHistory.masterpolicy.length" :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': !versionHistory.masterpolicy[0].system_originalApprovedDate_t, 'rejected-card': versionHistory.masterpolicy[0].details_state_s === PROPOSAL_STATE.REJECTED }")
- q-icon.absolute(v-if="versionHistory.masterpolicy[0].system_originalApprovedDate_t" name="fas fa-arrow-right" :style="{ 'right': '20px', 'top': '28px' }")
- div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': !versionHistory.masterpolicy[0].system_originalApprovedDate_t }")
- q-icon(name="fas fa-check" :color="versionHistory.masterpolicy[0].system_originalApprovedDate_t ? 'white' : versionHistory.state === PROPOSAL_STATE.REJECTED ? 'negative' : 'primary'")
- .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': !versionHistory.masterpolicy[0].system_originalApprovedDate_t }") {{ $t('proposals.version-history.original') }}
- div {{ parsedDate(versionHistory.masterpolicy[0].system_originalApprovedDate_t) }}
- .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-else :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': !versionHistory.masterpolicy.length, 'rejected-card': versionHistory.state === PROPOSAL_STATE.REJECTED }")
- div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': !versionHistory.masterpolicy.length }")
- q-icon(name="fas fa-check" :color="versionHistory.masterpolicy.length ? 'white' : versionHistory.state === PROPOSAL_STATE.REJECTED ? 'negative' : 'primary'")
- .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': !versionHistory.masterpolicy.length }") {{ $t('proposals.version-history.original') }}
- div(v-if="versionHistory.state === PROPOSAL_STATE.PROPOSED") {{ $t('proposals.version-history.currentOnVoting') }}
- div(v-else-if="versionHistory.state === PROPOSAL_STATE.REJECTED") {{ $t('proposals.version-history.rejected') }}
- div(v-else) {{ parsedDate(versionHistory.originalApprovedDate) }}
- .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-if="versionHistory.masterpolicy.length" :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': versionHistory.masterpolicy[0].system_originalApprovedDate_t, 'rejected-card': versionHistory.state === PROPOSAL_STATE.REJECTED }")
- div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': versionHistory.masterpolicy[0].system_originalApprovedDate_t }")
+ .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-if="versionHistory?.masterpolicy.length" :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': !versionHistory?.masterpolicy[0].system_originalApprovedDate_t, 'rejected-card': versionHistory?.masterpolicy[0].details_state_s === PROPOSAL_STATE.REJECTED }")
+ q-icon.absolute(v-if="versionHistory?.masterpolicy[0].system_originalApprovedDate_t" name="fas fa-arrow-right" :style="{ 'right': '20px', 'top': '28px' }")
+ div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': !versionHistory?.masterpolicy[0].system_originalApprovedDate_t }")
+ q-icon(name="fas fa-check" :color="versionHistory?.masterpolicy[0].system_originalApprovedDate_t ? 'white' : versionHistory?.state === PROPOSAL_STATE.REJECTED ? 'negative' : 'primary'")
+ .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': !versionHistory?.masterpolicy[0].system_originalApprovedDate_t }") {{ $t('proposals.version-history.original') }}
+ div {{ parsedDate(versionHistory?.masterpolicy[0].system_originalApprovedDate_t) }}
+ .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-else :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': !versionHistory?.masterpolicy.length, 'rejected-card': versionHistory?.state === PROPOSAL_STATE.REJECTED }")
+ div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': !versionHistory?.masterpolicy.length }")
+ q-icon(name="fas fa-check" :color="versionHistory?.masterpolicy.length ? 'white' : versionHistory?.state === PROPOSAL_STATE.REJECTED ? 'negative' : 'primary'")
+ .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': !versionHistory?.masterpolicy.length }") {{ $t('proposals.version-history.original') }}
+ div(v-if="versionHistory?.state === PROPOSAL_STATE.PROPOSED") {{ $t('proposals.version-history.currentOnVoting') }}
+ div(v-else-if="versionHistory?.state === PROPOSAL_STATE.REJECTED") {{ $t('proposals.version-history.rejected') }}
+ div(v-else) {{ parsedDate(versionHistory?.originalApprovedDate) }}
+ .bg-internal-bg.q-mr-md.q-mb-md.rounded-border.q-pa-md(v-if="versionHistory?.masterpolicy.length" :style="{ 'min-width': '160px', 'position': 'relative' }" :class="{ 'selected-card': versionHistory?.masterpolicy[0].system_originalApprovedDate_t, 'rejected-card': versionHistory?.state === PROPOSAL_STATE.REJECTED }")
+ div(:style="{ 'border-radius': '50%', 'background': '#242F5D', 'width': '30px', 'height': '30px', 'display': 'flex', 'justify-content': 'center', 'align-items': 'center' }" :class="{ 'selected-icon': versionHistory?.masterpolicy[0].system_originalApprovedDate_t }")
q-icon(name="fas fa-check" :color="versionHistory.masterpolicy[0].system_originalApprovedDate_t ? 'primary' : 'white'")
- .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': versionHistory.masterpolicy[0].system_originalApprovedDate_t }") Version 2
- div(v-if="versionHistory.state === PROPOSAL_STATE.PROPOSED") {{ $t('proposals.version-history.currentOnVoting') }}
- div(v-else-if="versionHistory.state === PROPOSAL_STATE.REJECTED") {{ $t('proposals.version-history.rejected') }}
- div(v-else) {{ parsedDate(versionHistory.originalApprovedDate) }}
+ .h-h5.text-weight-700.q-mt-sm.q-mb-md(:class="{ 'selected-title': versionHistory?.masterpolicy[0].system_originalApprovedDate_t }") Version 2
+ div(v-if="versionHistory?.state === PROPOSAL_STATE.PROPOSED") {{ $t('proposals.version-history.currentOnVoting') }}
+ div(v-else-if="versionHistory?.state === PROPOSAL_STATE.REJECTED") {{ $t('proposals.version-history.rejected') }}
+ div(v-else) {{ parsedDate(versionHistory?.originalApprovedDate) }}
diff --git a/src/components/proposals/voter-list.vue b/src/components/proposals/voter-list.vue
index 9da9257d4..369083f17 100644
--- a/src/components/proposals/voter-list.vue
+++ b/src/components/proposals/voter-list.vue
@@ -63,22 +63,23 @@ export default {
this.voteCount = data?.getDocument?.voteAggregate?.count
},
fetchPolicy: 'no-cache',
- subscribeToMore: {
- document: gql`subscription proposalVotes($docId: String!, $first: Int, $offset: Int) { ${PROPOSAL_VOTES_QUERY} }`,
- skip () { return !this.proposalId },
- variables () { return { docId: this.proposalId } },
- updateQuery: (previousResult, { subscriptionData }) => {
- if (!subscriptionData.data) {
- return previousResult
- }
- if (!previousResult) {
- return undefined
- }
-
- return subscriptionData.data
- }
-
- }
+ pollInterval: 1000
+ // subscribeToMore: {
+ // document: gql`subscription proposalVotes($docId: String!, $first: Int, $offset: Int) { ${PROPOSAL_VOTES_QUERY} }`,
+ // skip () { return !this.proposalId },
+ // variables () { return { docId: this.proposalId } },
+ // updateQuery: (previousResult, { subscriptionData }) => {
+ // if (!subscriptionData.data) {
+ // return previousResult
+ // }
+ // if (!previousResult) {
+ // return undefined
+ // }
+
+ // return subscriptionData.data
+ // }
+
+ // }
}
},
diff --git a/src/const.js b/src/const.js
index b00dbaeff..bb2d171aa 100644
--- a/src/const.js
+++ b/src/const.js
@@ -88,3 +88,5 @@ export const PERIOD_NUMBERS = Object.freeze({
SECS_PER_YEAR: 31557600,
CYCLE_DURATION_SEC: 2629800
})
+
+export const DEFAULT_TIER = 'Custom Reward'
diff --git a/src/layouts/DhoSelector.vue b/src/layouts/DhoSelector.vue
index 8b127a2f4..6caa23721 100644
--- a/src/layouts/DhoSelector.vue
+++ b/src/layouts/DhoSelector.vue
@@ -1,6 +1,8 @@