diff --git a/src/boot/api.js b/src/boot/api.js index 1ec38a8cc..9c79c721a 100644 --- a/src/boot/api.js +++ b/src/boot/api.js @@ -42,7 +42,7 @@ const signTransaction = async function (actions, options = {}) { transactionId = await this.$lightWallet.sendTransaction(actions) } } catch (e) { - error = this.$type === 'inApp' ? e.message : e.cause.message + error = this.$type === 'inApp' ? e?.message : e?.cause.message console.error(e) // eslint-disable-line no-console console.error(error) // eslint-disable-line no-console console.error(actions) // eslint-disable-line no-console diff --git a/src/components/login/login-view.vue b/src/components/login/login-view.vue index 108e7fdea..1351b2b08 100644 --- a/src/components/login/login-view.vue +++ b/src/components/login/login-view.vue @@ -110,11 +110,6 @@ export default { q-item-section.cursor-pointer(avatar @click="onLoginWallet(idx)") img(:src="wallet.getStyle().icon" width="20") q-item-section.cursor-pointer.text-center(@click="onLoginWallet(idx)") {{ $t('login.login-view.login1', { '1': wallet.getStyle().text, '2': wallet.getStyle().text === 'Seeds' ? '(beta)' : '' }) }} - q-item-section(avatar) - .flex - loading-spinner(v-if="loading === wallet.getStyle().text" :color="wallet.getStyle().textColor" size="2em") - q-btn(v-else :color="wallet.getStyle().textColor" icon="fas fa-cloud-download-alt" @click="openUrl(wallet.getOnboardingLink())" target="_blank" dense flat size="10px") - q-tooltip {{ $t('login.login-view.getApp') }} .row.flex.items-center .col-7.q-mr-sm q-select.q-mt-md(:options="authenticators" dense dropdown-icon="fas fa-chevron-down" hide-bottom-space options-dense outlined rounded v-model="selectedAuthenticator") diff --git a/src/components/login/register-user-with-captcha-view.vue b/src/components/login/register-user-with-captcha-view.vue index 06c774ed2..b7b3dd5cb 100644 --- a/src/components/login/register-user-with-captcha-view.vue +++ b/src/components/login/register-user-with-captcha-view.vue @@ -137,7 +137,7 @@ export default { return this.form.title && this.form.description && this.form.logo }, canPublish() { - return this.canNextStep + return (this.canNextStep && (this.form.email)) || (this.skipEmailStep && this.canNextStep) } }, watch: { @@ -231,7 +231,9 @@ export default { }, isDraft }) - await this.updateProfile({ data: { email: this.form.email, affiliate: this.form.affiliate } }) + if (this.form.affiliate && this.form.email) { + await this.updateProfile({ data: { email: this.form.email, affiliate: this.form.affiliate } }) + } this.$emit('stepChanged', this.steps.loading.name) this.showLoadingModal = true await this.updateProgressBar() @@ -410,8 +412,8 @@ export default { .col q-input.rounded-border.bg-internal-bg(dense disable outlined v-model="form.title") nav.row.justify-end.q-mt-xl.q-gutter-xs - q-btn.q-px-xl(:disable="!!form.email || !!form.affiliate" @click="skipEmailStep = true, clearEmailFields()" v-if="$q.screen.gt.md && !skipEmailStep" color="primary" :label="$t('login.register-user-with-captcha-view.skipForNow')" no-caps rounded unelevated outline) - q-btn.q-px-xl(:disable="canPublish && !skipEmailStep" v-if="$q.screen.gt.md" @click="onSubmit" color="primary" :label="$t('login.register-user-with-captcha-view.publishYourDao')" no-caps rounded unelevated) + q-btn.q-px-xl(@click="skipEmailStep = true, clearEmailFields()" v-if="$q.screen.gt.md && !skipEmailStep" color="primary" :label="$t('login.register-user-with-captcha-view.skipForNow')" no-caps rounded unelevated outline) + q-btn.q-px-xl(:disable="!canPublish" v-if="$q.screen.gt.md" @click="onSubmit" color="primary" :label="$t('login.register-user-with-captcha-view.publishYourDao')" no-caps rounded unelevated) #form5.flex.items-center.justify-center.no-wrap(v-show="step === this.steps.loading.name") q-dialog(v-if="$q.screen.gt.md" :value="showLoadingModal" persistent) widget.bg-white.q-pa-xxxl.width-auto.col-auto.full-width(:style="'border-radius: 25px; box-shadow: 0px 0px 26px 0px rgba(0, 0, 41, 0.2); max-width: 1180px;'") diff --git a/src/pages/dho/Explore.vue b/src/pages/dho/Explore.vue index 8e9b0fd09..f6e4ed989 100644 --- a/src/pages/dho/Explore.vue +++ b/src/pages/dho/Explore.vue @@ -3,6 +3,7 @@ import { mapGetters } from 'vuex' import { EXPLORE_BY } from '~/const' import ipfsy from '~/utils/ipfsy' import { dateToString } from '~/utils/TimeUtils' +import lodash from 'lodash' export default { name: 'page-explore', @@ -19,6 +20,7 @@ export default { data () { return { + lodash, dateToString, EXPLORE_BY, mobileFilterOpen: false, @@ -249,7 +251,7 @@ q-page.page-explore(:style="'overflow-x: hidden'") .col-sm-12.col-md-12.col-lg-9(ref="scrollContainer" v-if="exploreBy === EXPLORE_BY.DAOS") q-infinite-scroll(@load="onLoad" :offset="250" :scroll-target="$refs.scrollContainer" ref="scroll") .row - .col-4.q-mb-md(v-for="(dho,index) in dhos" :key="dho.name" :class="{'col-6': $q.screen.lt.lg, 'q-pr-md': $q.screen.lt.sm ? false : $q.screen.gt.md ? true : index % 2 === 0, 'full-width': view === 'list' || $q.screen.lt.sm}") + .col-4.q-mb-md(v-for="(dho,index) in lodash.uniqBy(dhos, 'name')" :key="dho.name" :class="{'col-6': $q.screen.lt.lg, 'q-pr-md': $q.screen.lt.sm ? false : $q.screen.gt.md ? true : index % 2 === 0, 'full-width': view === 'list' || $q.screen.lt.sm}") dho-card.full-width(v-bind="dho" :view="view" useIpfsy ellipsis) template(v-slot:footer) footer.full-width.row.items-center diff --git a/src/pages/dho/Organization.vue b/src/pages/dho/Organization.vue index 987d596c5..198f2773c 100644 --- a/src/pages/dho/Organization.vue +++ b/src/pages/dho/Organization.vue @@ -193,7 +193,7 @@ export default { recentPayouts: { query: require('~/query/payouts/dao-recent-payouts.gql'), update: data => { - const { count } = data.getDao.payoutAggregate + const { count } = data.queryDao?.[0].treasury?.[0].redemptionAggregate return count.toString() }, skip () { diff --git a/src/query/payouts/dao-recent-payouts.gql b/src/query/payouts/dao-recent-payouts.gql index f9b545665..f49bf792f 100644 --- a/src/query/payouts/dao-recent-payouts.gql +++ b/src/query/payouts/dao-recent-payouts.gql @@ -1,10 +1,9 @@ -query recentPayouts ($daoId: String!, $filter: PayoutFilter) { - getDao (docId: $daoId) { - docId - payoutAggregate ( - filter: $filter - ) { - count +query recentPayouts ($daoId: String!) { + queryDao (filter: { docId: { eq: $daoId } }) { + treasury { + redemptionAggregate { + count + } } } }