Skip to content

Commit

Permalink
Merge pull request #673 from clrfund/feat/humanbound-holder
Browse files Browse the repository at this point in the history
Add message about humanbound address token holder requirement
  • Loading branch information
yuetloo authored Jun 7, 2023
2 parents 2af856a + d2b4f36 commit 2120f31
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
4 changes: 3 additions & 1 deletion vue-app/src/api/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ export type LeaderboardRound = {
}

const leaderboardRounds = historicalRounds as LeaderboardRound[]

export { leaderboardRounds }

export const useHumanbound = /^yes$/i.test(import.meta.env.VITE_USE_HUMANBOUND)
export const humanboundWebsiteUrl = 'https://app.humanbound.xyz'
4 changes: 3 additions & 1 deletion vue-app/src/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@
"p2": "有意的捐献者可能有兴趣知道您的用款计划。 支持 Markdown。",
"input2": "例如: 在我们的路线图上。。。",
"error2": "让捐献者了解您的用款计划。",
"preview1": "预览:"
"preview1": "预览:",
"address_must_hold_humanbound_sbt": "这个地址必须持有",
"humanbound_sbt_link": "humanbound SBT"
},
"step2": {
"h2": "团队",
Expand Down
4 changes: 3 additions & 1 deletion vue-app/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@
"p2": "Potential contributors might convert based on your specific funding plans. Markdown supported.",
"input2": "ex: on our roadmap...",
"error2": "Let potential contributors know what plans you have for their donations.",
"preview1": "Preview:"
"preview1": "Preview:",
"address_must_hold_humanbound_sbt": "The address must hold a ",
"humanbound_sbt_link": "humanbound SBT"
},
"step2": {
"h2": "Team details",
Expand Down
4 changes: 3 additions & 1 deletion vue-app/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@
"p2": "Los posibles contribuyentes pueden decidir según tus planes de financiamiento específicos. Soporte de Markdown.",
"input2": "ej: en nuestro plan de desarrollo...",
"error2": "Informa a los posibles contribuyentes sobre tus planes para sus donaciones.",
"preview1": "Vista previa:"
"preview1": "Vista previa:",
"address_must_hold_humanbound_sbt": "La dirección debe tener un ",
"humanbound_sbt_link": "SBT vinculado a un humano"
},
"step2": {
"h2": "Detalles del equipo",
Expand Down
13 changes: 9 additions & 4 deletions vue-app/src/plugins/round/criteria.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useHumanbound, humanboundWebsiteUrl } from '@/api/core'

export interface Criterion {
emoji: string
translationKey: string
Expand All @@ -21,11 +23,14 @@ const CRITERIA: Criterion[] = [
emoji: '👺',
translationKey: 'no_scams',
},
{
]

if (useHumanbound) {
CRITERIA.push({
emoji: '🛡️',
translationKey: 'humanbound',
link: 'https://app.humanbound.xyz',
},
]
link: humanboundWebsiteUrl,
})
}

export const criteria: Criterion[] = [...CRITERIA]
15 changes: 14 additions & 1 deletion vue-app/src/views/JoinView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@
<p class="input-description">
{{ $t('join.step1.p1') }}
</p>
<div class="warning input-description" v-if="useHumanbound">
{{ $t('join.step1.address_must_hold_humanbound_sbt') }}
<links :to="humanboundWebsiteUrl">{{ $t('join.step1.humanbound_sbt_link') }}</links>
</div>
<input
id="fund-address"
:placeholder="$t('join.step1.input1')"
Expand Down Expand Up @@ -715,7 +719,7 @@ import { required, requiredIf, email, maxLength, url, helpers } from '@vuelidate
import { type RecipientApplicationData, formToProjectInterface } from '@/api/recipient-registry-optimistic'
import type { Project } from '@/api/projects'
import { recipientExists } from '@/api/projects'
import { chain } from '@/api/core'
import { chain, humanboundWebsiteUrl, useHumanbound } from '@/api/core'
import { DateTime } from 'luxon'
import { useRecipientStore, useAppStore, useUserStore } from '@/stores'
import { waitForTransactionAndCheck } from '@/utils/contracts'
Expand Down Expand Up @@ -1477,4 +1481,13 @@ async function checkEns(): Promise<void> {
font-size: 0.875rem;
margin-top: 0.25rem;
}
.warning {
color: var(--error-color);
a {
color: var(--error-color);
text-decoration-line: underline;
}
}
</style>

0 comments on commit 2120f31

Please sign in to comment.