From d2b4f362a75b74e384a2c7c9e5a9e597d7cf2be4 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Wed, 7 Jun 2023 16:58:54 -0400 Subject: [PATCH] add message about humanbound address token holder requirement --- vue-app/src/api/core.ts | 4 +++- vue-app/src/locales/cn.json | 4 +++- vue-app/src/locales/en.json | 4 +++- vue-app/src/locales/es.json | 4 +++- vue-app/src/plugins/round/criteria.ts | 13 +++++++++---- vue-app/src/views/JoinView.vue | 15 ++++++++++++++- 6 files changed, 35 insertions(+), 9 deletions(-) diff --git a/vue-app/src/api/core.ts b/vue-app/src/api/core.ts index dbe101a95..b5bc0f49b 100644 --- a/vue-app/src/api/core.ts +++ b/vue-app/src/api/core.ts @@ -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' diff --git a/vue-app/src/locales/cn.json b/vue-app/src/locales/cn.json index a25200c07..1690753d9 100644 --- a/vue-app/src/locales/cn.json +++ b/vue-app/src/locales/cn.json @@ -536,7 +536,9 @@ "p2": "有意的捐献者可能有兴趣知道您的用款计划。 支持 Markdown。", "input2": "例如: 在我们的路线图上。。。", "error2": "让捐献者了解您的用款计划。", - "preview1": "预览:" + "preview1": "预览:", + "address_must_hold_humanbound_sbt": "这个地址必须持有", + "humanbound_sbt_link": "humanbound SBT" }, "step2": { "h2": "团队", diff --git a/vue-app/src/locales/en.json b/vue-app/src/locales/en.json index 25737351a..9a6f658c7 100644 --- a/vue-app/src/locales/en.json +++ b/vue-app/src/locales/en.json @@ -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", diff --git a/vue-app/src/locales/es.json b/vue-app/src/locales/es.json index 3e9caf231..bed594d92 100644 --- a/vue-app/src/locales/es.json +++ b/vue-app/src/locales/es.json @@ -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", diff --git a/vue-app/src/plugins/round/criteria.ts b/vue-app/src/plugins/round/criteria.ts index 6da5d35d6..04e988a3f 100644 --- a/vue-app/src/plugins/round/criteria.ts +++ b/vue-app/src/plugins/round/criteria.ts @@ -1,3 +1,5 @@ +import { useHumanbound, humanboundWebsiteUrl } from '@/api/core' + export interface Criterion { emoji: string translationKey: string @@ -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] diff --git a/vue-app/src/views/JoinView.vue b/vue-app/src/views/JoinView.vue index b5f5a1eff..41f06fa3a 100644 --- a/vue-app/src/views/JoinView.vue +++ b/vue-app/src/views/JoinView.vue @@ -238,6 +238,10 @@

{{ $t('join.step1.p1') }}

+
+ {{ $t('join.step1.address_must_hold_humanbound_sbt') }} + {{ $t('join.step1.humanbound_sbt_link') }} +
{ font-size: 0.875rem; margin-top: 0.25rem; } + +.warning { + color: var(--error-color); + + a { + color: var(--error-color); + text-decoration-line: underline; + } +}