Skip to content

Commit

Permalink
chore(stage): 2.18.3 (#1831)
Browse files Browse the repository at this point in the history
* chore(develop): release 2.18.0

* fix(design): title margin in wallet widget component (#1648) (#1810)

* fix(design): active mode for support icon in multi-dho-layout (#1646) (#1811)

* fix(design): primary button styling on hover (#1640) (#1812)

* feat(subscriptions): add proposal list subscriptions (#1801)

* feat: encrypt data and call hypha token sales url  (#1789)

* feat: encrypt data and call hypha token sales url with daoactivation query parameter

* refactor: move const to enviroment

* fix: add correct env variable and remove token from data that is sent to widget

Co-authored-by: Arsenije Savic <[email protected]>

* fix: Update peg contract (#1825)

* fix: update peg contract
* fix: Add requestor param

* fix(create): minnor bugs (#1829)

* fix: remove top bar on dao creation
* fix: uploaded logo
* fix(create): add dashboard link
* fix(create): remove guest menu
* feat(create): add admin user validations
* fix(banner): background color
* fix(create): add image upload icon button

* fix: home banner colors

* fix(design): long names in voting widget

* fix(design): disabled dao settings for non admins (#1805) (#1818)

* fix(organizations): bug with displaying dhow in profile page and left-navigation (#1827)

* fix(proposals): preview card comment counter (#1828)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Evgeni B <[email protected]>
Co-authored-by: arsenije <[email protected]>
Co-authored-by: Alex <[email protected]>
  • Loading branch information
5 people authored Nov 17, 2022
1 parent ef48453 commit 701d919
Show file tree
Hide file tree
Showing 27 changed files with 863 additions and 126 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/'
MULTISIG_CONTRACT: 'msig.hypha'
HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }}
HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth'

- name: S3 sync
uses: jakejarvis/s3-sync-action@master
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/'
MULTISIG_CONTRACT: 'msigdhohypha'
HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }}
HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth'

- name: S3 sync
uses: jakejarvis/s3-sync-action@master
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/'
MULTISIG_CONTRACT: 'msigdhohypha'
HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }}
HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth'

- name: S3 sync
uses: jakejarvis/s3-sync-action@master
Expand Down
120 changes: 120 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dho-web-client",
"version": "2.17.0",
"version": "2.18.0",
"description": "Governance, payroll and treasury tools for distributed HUMAN organizations (DHO)",
"productName": "Hypha DHO",
"author": "Max <[email protected]>",
Expand Down Expand Up @@ -36,6 +36,7 @@
"quasar": "1.15.10",
"showdown": "^1.9.1",
"subscriptions-transport-ws": "^0.11.0",
"simple-crypto-js": "^3.0.1",
"turndown": "^7.0.0",
"ual-anchor": "^1.0.5",
"ual-seeds": "^1.1.2",
Expand Down
4 changes: 3 additions & 1 deletion quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ module.exports = function (ctx) {
ELASTIC_SEARCH_URL: process.env.ELASTIC_SEARCH_URL,
ELASTIC_SEARCH_API_KEY: process.env.ELASTIC_SEARCH_API_KEY,
MULTISIG_CONTRACT: process.env.MULTISIG_CONTRACT,
HYPHA_CONTRACT: process.env.HYPHA_CONTRACT
HYPHA_CONTRACT: process.env.HYPHA_CONTRACT,
HYPHA_TOKEN_SALES_ENCODE_KEY: process.env.HYPHA_TOKEN_SALES_ENCODE_KEY,
HYPHA_TOKEN_SALES_URL: process.env.HYPHA_TOKEN_SALES_URL
},
scopeHoisting: true,
vueRouterMode: 'history',
Expand Down
2 changes: 1 addition & 1 deletion src/apollo/apollo-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function (/* { app, router, store, ssrContext, urlPath, red
introspectionQueryResultData: schema
}),
dataIdFromObject: r => {
if (r.docId) {
if (r.docId && r.__typename) {
return `${r.__typename}:${r.docId}`
}
return defaultDataIdFromObject(r)
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/base-banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
</script>

<template lang="pug">
.base-banner.full-width.rounded-corners.relative-position.overflow-hidden(:style="{'background': getPaletteColor(color)}" :class="{'compact-banner' : compact}")
.base-banner.full-width.rounded-corners.relative-position.overflow-hidden(:style="{'background': color}" :class="{'compact-banner' : compact}")
#banner-pattern.absolute(:style="{'background': `url('${pattern}') repeat`, 'background-size': '200px' }" v-if="pattern")
#banner-image.absolute(:style="{'background': `url('${background}') no-repeat`, 'background-size': 'cover' }" v-if="background")
#linear-gradient.absolute.z-40(v-if="gradient")
Expand Down Expand Up @@ -101,7 +101,7 @@ export default {
#linear-gradient
width 100%
height 100%
background: linear-gradient(268deg, rgba(19,34,106, 0) 0%, rgba(24,30,78, 1) 100%)
background: linear-gradient(268deg,rgba(0,0,0,0),rgba(0,0,0,0.3))
opacity 0.7
#banner-pattern, #banner-image
Expand Down
4 changes: 2 additions & 2 deletions src/components/dashboard/support-widget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ widget(title="Need support?")
.h-b2.q-mt-md Please read our Documentation for more info. If you are stuck with a problem you can also reach out to us on discord in the "dao-support" channel.
.row.justify-between.flex.items-center.q-mb-sm
.col-auto
q-btn.q-mt-md.q-px-sm.text-white(noCaps rounded color="primary" type="a" :href="documentationURL" target="_blank") Documentation
q-btn.q-mt-md.q-px-sm.text-white(noCaps rounded color="primary" :href="documentationURL" target="_blank") Documentation
.col
q-btn.q-mt-md.q-ml-sm.discord-buttom(unelevated rounded color="primary" icon="fab fa-discord" size="0.7rem" type="a" :href="discordURL" target="_blank")
q-btn.q-mt-md.q-ml-sm.discord-buttom(unelevated rounded color="primary" icon="fab fa-discord" size="0.7rem" :href="discordURL" target="_blank")
</template>

<style lang="stylus" scoped>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ipfs/input-file-ipfs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
this.$emit('uploadedFile', this.typeCid)
const file = await BrowserIpfs.retrieve(this.typeCid)
this.file = file.payload
// this.imageURI = URL.createObjectURL(file.payload)
this.imageURI = URL.createObjectURL(file.payload)
},
chooseFile () {
this.$refs.qFile.pickFiles()
Expand Down
8 changes: 6 additions & 2 deletions src/components/navigation/left-navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
return null
},
disabledSelector () {
if (!this.dhos || this.dhos.length <= 1) {
if (!this.dhos) {
return true
}
return false
Expand All @@ -58,6 +58,10 @@ export default {
switchDao (url) {
this.expanded = false
this.$router.push({ name: this.activeTab || 'dashboard', params: { dhoname: url } })
},
expandSwitcher () {
this.expanded = this.dhos.length > 1 ? !this.expanded : this.expanded
}
}
}
Expand All @@ -69,7 +73,7 @@ export default {
.col.bg-external-bg(:class="{'col': expanded, 'overTop': expanded }")
.column
.col-auto.justify-center.q-pt-xl
dho-btn(:name="dho.name" :title="dho.title" :logo="dho.icon" :disable="disabledSelector" @click="expanded=!expanded")
dho-btn(:name="dho.name" :title="dho.title" :logo="dho.icon" :disable="disabledSelector" @click="expandSwitcher")
.col-auto.q-mt-xs
.column.dao-container(v-if="expanded")
.row.full-width(v-for="dao in dhos")
Expand Down
7 changes: 4 additions & 3 deletions src/components/profiles/profile-picture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export default {
badge: String,
detail: String,
limit: Boolean,
noWrapName: Boolean
noWrapName: Boolean,
ellipsisName: Boolean
},
data () {
Expand Down Expand Up @@ -140,8 +141,8 @@ export default {
:content-style="{ 'font-size': '1em' }"
)
div(v-html="nameTooltip")
div.q-my-xs.q-ml-xs(v-if="showName || showUsername || detail")
.h-label.text-bold(v-if="showName && !lightName" :class="{ 'one-line': limit, 'text-no-wrap': noWrapName }") {{ name }}
div.q-my-xs.q-ml-xs(v-if="showName || showUsername || detail" :style="{ 'display': 'grid' }")
.h-label.text-bold(v-if="showName && !lightName" :class="{ 'one-line': limit, 'text-no-wrap': noWrapName, 'ellipsis overflow-hidden': ellipsisName }") {{ name }}
q-tooltip {{name}}
.text-body2.text-italic.text-body.q-ml-xxs(v-if="showName && lightName") {{ name }}
q-tooltip {{name}}
Expand Down
1 change: 1 addition & 0 deletions src/components/profiles/voting-history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ widget(:more="more" title="Recent votes")
:name="item.name"
:username="item.creator"
noWrapName=true
ellipsisName=true
size="40px"
link
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/profiles/wallet-base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ export default {

<template lang="pug">
widget.wallet-base(:more="more" :no-title="noTitle" morePosition="top" title="Wallet" @more-clicked="$router.push({ path: `/${$route.params.dhoname}/@${username}/wallet` })")
.row.justify-center(v-if="!wallet || wallet.length === 0")
.row.justify-center.q-mb-md(v-if="!wallet || wallet.length === 0")
loading-spinner(v-if="loading" color="primary" size="40px")
.h-b2(v-else) No wallet found
q-list(v-else dense)
q-list.q-mt-md(v-else dense)
template(v-for="(item, index) in wallet")
q-item(v-if="item" :key="item.label" :class="index !== wallet.length - 1 ? 'q-mb-sm' : ''").wallet-item
q-item-section.icon-section(avatar)
Expand Down
38 changes: 21 additions & 17 deletions src/layouts/MultiDhoLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
},
computed: {
...mapGetters('accounts', ['account', 'isApplicant', 'isAuthenticated', 'isMember']),
...mapGetters('accounts', ['account', 'isApplicant', 'isAuthenticated', 'isMember', 'isAdmin']),
...mapGetters('dao', ['announcement', 'daoSettings', 'selectedDao', 'selectedDaoPlan']),
...mapGetters('search', ['search']),
Expand All @@ -132,7 +132,8 @@ export default {
return this.getDaos(member)
},
loadingAccount () { return localStorage?.getItem('autoLogin') && !this.account }
loadingAccount () { return localStorage?.getItem('autoLogin') && !this.account },
showTopBarItems () { return this.$route.name !== 'dao-launcher' }
},
methods: {
Expand Down Expand Up @@ -271,10 +272,13 @@ q-layout(:style="{ 'min-height': 'inherit' }" :view="'lHr Lpr lFr'" ref="layout"
router-link.text-primary.text-underline.text-weight-600(:to="breadcrumbs.tab.link") {{ breadcrumbs.tab.name }}
.row
.h-h3(v-if="title") {{ title }}
.col
.col(v-if="showTopBarItems")
.row.justify-end.items-center(v-if="$q.screen.gt.md")
q-btn.q-mr-xs(:to="{ name: 'configuration' }" unelevated rounded padding="12px" icon="fas fa-cog" size="sm" :color="isActiveRoute('configuration') ? 'primary' : 'white'" :text-color="isActiveRoute('configuration') ? 'white' : 'primary'" )
q-btn(:to="{ name: 'support' }" unelevated rounded padding="12px" icon="far fa-question-circle" size="sm" color="white" text-color="primary")
router-link(:to="{ name: isAdmin ? 'configuration' : '' }")
q-tooltip(v-if="!isAdmin") Only DAO admins can change the settings
q-btn.q-mr-xs(disabled=!isAdmin unelevated rounded padding="12px" icon="fas fa-cog" size="sm" :color="isActiveRoute('configuration') ? 'primary' : 'white'" :text-color="isActiveRoute('configuration') ? 'white' : 'primary'" )
router-link(:to="{ name: 'support' }")
q-btn(unelevated rounded padding="12px" icon="fas fa-question-circle" size="sm" :color="isActiveRoute('support') ? 'primary' : 'white'" :text-color="isActiveRoute('support') ? 'white' : 'primary'")
q-input.q-mx-md.search(
v-model="searchInput"
placeholder="Search the whole DAO"
Expand All @@ -284,22 +288,22 @@ q-layout(:style="{ 'min-height': 'inherit' }" :view="'lHr Lpr lFr'" ref="layout"
debounce="500"
@input="onSearch(searchInput)"
)
q-btn.q-px-xl.rounded-border.text-bold.q-mr-xs(
:to="{ name: 'plan-manager' }"
color="secondary"
label="Manage Plan"
no-caps
rounded
text-color="white"
unelevated
v-if="selectedDaoPlan.isActivated"
)
router-link(:to="{ name: 'plan-manager' }")
q-btn.q-px-xl.rounded-border.text-bold.q-mr-xs(
color="secondary"
label="Manage Plan"
no-caps
rounded
text-color="white"
unelevated
v-if="selectedDaoPlan.isActivated"
)
template(v-slot:prepend)
q-icon(size="xs" color="primary" name="fas fa-search")
template(v-slot:append v-if="searchInput")
q-icon(size="xs" name="fas fa-times" @click="clearSearchInput")
guest-menu.q-ml-md(v-if="!account && !loadingAccount" :daoName="daoName")
non-member-menu.q-ml-md(v-if="!isMember && !isApplicant && account && !loadingAccount" :registrationEnabled="daoSettings.registrationEnabled")
guest-menu.q-ml-md(v-if="!account && !loadingAccount && showTopBarItems" :daoName="daoName")
non-member-menu.q-ml-md(v-if="!isMember && !isApplicant && account && !loadingAccount && showTopBarItems" :registrationEnabled="daoSettings.registrationEnabled")
q-btn.q-ml-lg.q-mr-md(v-if="$q.screen.gt.md && !right && !loadingAccount" flat round @click="right = true")
profile-picture(v-bind="profile" size="36px" v-if="account")
profile-picture(username="g" size="36px" v-if="!account" textOnly)
Expand Down
30 changes: 17 additions & 13 deletions src/pages/dho/Home.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script>
import { mapGetters } from 'vuex'
import { date } from 'quasar'
import { date, colors } from 'quasar'
import ipfsy from '~/utils/ipfsy'
const { getPaletteColor } = colors
export default {
name: 'dho-home',
Expand Down Expand Up @@ -126,6 +127,7 @@ export default {
},
methods: {
getPaletteColor,
hidePlanBanner () {
localStorage.setItem('showPlanBanner', false)
this.isPlanBannerVisible = false
Expand All @@ -145,7 +147,7 @@ q-page.page-home
title="Your Plan has expired!"
description="We are allowing you a grace period of 7 days for you to resolve this issue before we will regrettably have to suspend your DAO account. Once suspended, you will not be able to perform any actions on the DAO until you renew your Plan, or downgrade to the Free Plan. Click the ‘Manage Plan’ button and renew your plan today."
:gradient="false"
color="negative"
:color="getPaletteColor('negative')"
:compact="!$q.screen.gt.sm"
v-if="selectedDaoPlan.isExpiring"
)
Expand All @@ -163,13 +165,14 @@ q-page.page-home
q-icon(name="fas fa-exclamation-triangle" size='sm')
span Action Required
template(v-slot:buttons)
q-btn.q-px-lg.h-btn1(no-caps rounded unelevated color="white" text-color="negative" :to="{ name: 'plan-manager' }") Manage Plan
router-link(:to="{ name: 'plan-manager' }")
q-btn.q-px-lg.h-btn1(no-caps rounded unelevated label="Manage Plan" color="white" text-color="negative")

base-banner.q-mb-md(
title="Get all the benefits of a Hypha DAO"
description="We’ve activated your DAO on a default free plan. This has limited features even though it’s a full fledged DAO. To benefit from the full potential of Hypha DAO modules, such as circles, badges, custom governance, additional users, and much more, click “Manage Plan” and subscribe to one of our pricing plans today."
:gradient="false"
color="secondary"
:color="getPaletteColor('secondary')"
:compact="!$q.screen.gt.sm"
@onClose="hidePlanBanner"
v-if="selectedDaoPlan.isActivated && isPlanBannerVisible"
Expand All @@ -183,7 +186,8 @@ q-page.page-home
.q-pl-sm(:class="{'q-pl-md': $q.screen.gt.sm }")
router-link.text-white(:to="{ name: 'plan-manager' }") Upgrade plan
template(v-slot:buttons)
q-btn.q-px-lg.h-btn1(no-caps rounded unelevated color="white" text-color="secondary" :to="{ name: 'plan-manager' }") Manage Plan
router-link(:to="{ name: 'plan-manager' }")
q-btn.q-px-lg.h-btn1(no-caps rounded unelevated label="Manage Plan" color="white" text-color="secondary")

base-banner(
:compact="!$q.screen.gt.sm"
Expand All @@ -193,14 +197,14 @@ q-page.page-home
v-if="isWelcomeBannerVisible"
)
template(v-slot:buttons)
q-btn.q-px-lg.h-btn1(
:to="{ name: 'organization' }"
color="secondary"
label="Discover More"
no-caps
rounded
unelevated
)
router-link(:to="{ name: 'organization' }")
q-btn.q-px-lg.h-btn1(
color="secondary"
label="Discover More"
no-caps
rounded
unelevated
)

//- Desktop
.row.full-width.q-mt-md(v-if="$q.screen.gt.md")
Expand Down
33 changes: 25 additions & 8 deletions src/pages/dho/Plan.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import { mapActions, mapGetters } from 'vuex'
import SimpleCrypto from 'simple-crypto-js'
const duration = {
data () {
Expand Down Expand Up @@ -121,6 +122,22 @@ export default {
}
},
async goToHyphaTokenSales () {
const simpleCrypto = new SimpleCrypto(process.env.HYPHA_TOKEN_SALES_ENCODE_KEY)
const data = {
account: this.account,
amount: parseFloat((this.selectedPlan.priceHypha - (this.selectedPlan.priceHypha * this.selectedBilling.discountPerc)) * this.selectedBilling.periods).toFixed(2),
accountType: 'hypha_telos',
disableGoBack: true
}
const cipher = await simpleCrypto.encrypt(JSON.stringify(data))
const activationSecret = encodeURIComponent(cipher)
window.open(`${process.env.HYPHA_TOKEN_SALES_URL}/?daoActivation=${activationSecret}`, '_blank')
},
async activatePlan () {
const data = {
account: this.account,
Expand Down Expand Up @@ -226,14 +243,14 @@ export default {
.col-12.col-sm-12.col-md-12.col-lg-6.row.justify-end
nav.col-md-12.col-lg-8.q-my-xl.row.q-col-gutter-sm
.col-12.col-sm-12.col-md-12.col-lg-6
a(href="https://tokensale.hypha.earth/" target="_tab").full-width
q-btn.q-px-xl.rounded-border.text-bold.q-mr-xs.full-width(
color="primary"
label="Buy Hypha Token"
no-caps
rounded
unelevated
)
q-btn.q-px-xl.rounded-border.text-bold.q-mr-xs.full-width(
color="primary"
label="Buy Hypha Token"
@click="goToHyphaTokenSales"
no-caps
rounded
unelevated
)
.col-12.col-sm-12.col-md-12.col-lg-6
q-btn.q-px-xl.rounded-border.text-bold.q-ml-xs.full-width(
:disable="!canActivate"
Expand Down
Loading

0 comments on commit 701d919

Please sign in to comment.