Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"Common": {
"copyAddress": "Copy {label}",
"copied": "Copied",
"viewOnExplorer": "View {label} on Stellar Expert"
},
"Nav": {
"explore": "Explore",
"how": "How it works",
Expand All @@ -19,6 +24,7 @@
"demoSession": "Demo session"
},
"Footer": {
"trustLinks": "Trust links",
"verify": "Verify everything",
"risk": "Risk disclosure",
"learn": "Learn",
Expand Down Expand Up @@ -235,6 +241,8 @@
"actionSave": "Save"
},
"Creator": {
"title": "Creator space",
"description": "Apply for the whitelist, build your project page, and watch the pool fund it. The oracle scores your credit quality and green impact, and we show you exactly what moves them.",
"h1": "Creator space",
"subtitle": "Apply for the whitelist, build your project page, and watch the pool fund it. The oracle scores your credit quality and green impact, and we show you exactly what moves them.",
"tabApply": "Apply",
Expand Down
6 changes: 6 additions & 0 deletions messages/fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"Common": {
"copyAddress": "Copier {label}",
"copied": "Copié",
"viewOnExplorer": "Voir {label} sur Stellar Expert"
},
"Nav": {
"explore": "Explorer",
"how": "Comment ça marche",
Expand All @@ -19,6 +24,7 @@
"demoSession": "Session démo"
},
"Footer": {
"trustLinks": "Liens de confiance",
"verify": "Tout vérifier",
"risk": "Avertissement sur les risques",
"learn": "Comprendre",
Expand Down
8 changes: 6 additions & 2 deletions src/components/AddressChip.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'use client'

import { useState, type CSSProperties } from 'react'
import { useTranslations } from 'next-intl'

/**
* Heliobond AddressChip — a Stellar address or tx hash, truncated in the
Expand All @@ -22,6 +25,7 @@ export function AddressChip({
label = 'address',
style,
}: AddressChipProps) {
const t = useTranslations('Common')
const [copied, setCopied] = useState(false)
const [hover, setHover] = useState(false)

Expand Down Expand Up @@ -66,7 +70,7 @@ export function AddressChip({
</span>
<button
type="button"
aria-label={copied ? 'Copied' : `Copy ${label}`}
aria-label={copied ? t('copied') : t('copyAddress', { label })}
onClick={copy}
style={iconBtn}
>
Expand All @@ -77,7 +81,7 @@ export function AddressChip({
href={explorerUrl}
target="_blank"
rel="noreferrer"
aria-label={`View ${label} on Stellar Expert`}
aria-label={t('viewOnExplorer', { label })}
style={iconBtn}
>
<ExternalIcon />
Expand Down
18 changes: 5 additions & 13 deletions src/screens/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,13 @@ export function Landing({ onConnect, onNav }: LandingProps) {
}}
>
<div style={counterCell}>
<StatBlock
label={t('poolValue')}
value="$4,862,014"
decimals=".55"
size="lg"
href="#"
/>
<StatBlock label={t('poolValue')} value="$4,862,014" decimals=".55" size="lg" />
</div>
<div style={counterCell}>
<StatBlock label={t('projectsFunded')} value="14" size="lg" href="#" />
<StatBlock label={t('projectsFunded')} value="14" size="lg" />
</div>
<div style={counterCell}>
<StatBlock label={t('returnRate')} value="7.4" unit="%" size="lg" href="#" />
<StatBlock label={t('returnRate')} value="7.4" unit="%" size="lg" />
</div>
</div>
<p
Expand Down Expand Up @@ -258,9 +252,7 @@ export function Landing({ onConnect, onNav }: LandingProps) {
padding: '16px 18px',
}}
>
<span
style={{ fontFamily: 'var(--font-body)', fontSize: 14.5, color: 'var(--ink-60)' }}
>
<span style={{ fontFamily: 'var(--font-body)', fontSize: 14.5, color: 'var(--ink-60)' }}>
{k}
</span>
<span style={{ fontFamily: 'var(--font-data)', fontSize: 13.5, color: 'var(--ink)' }}>
Expand All @@ -274,4 +266,4 @@ export function Landing({ onConnect, onNav }: LandingProps) {
)
}

const counterCell = { background: 'var(--surface)', padding: '28px 24px' } as const
const counterCell = { background: 'var(--surface)', padding: '28px 24px' } as const
15 changes: 11 additions & 4 deletions src/screens/admin/OracleForms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function OracleForms({ projects, liquid, onPushScores, onFund }: OracleFo
{/* Push score update */}
<Panel title={t('panelPushTitle')} hint={t('panelPushHint')}>
<Field label={t('fieldProject')}>
<Select value={scoreId} onChange={setScoreId} projects={projects} />
<Select value={scoreId} onChange={setScoreId} projects={projects} label={t('fieldProject')} />
</Field>
<div style={{ display: 'flex', gap: 12 }}>
<Field label={t('fieldCredit')} style={{ flex: 1 }}>
Expand Down Expand Up @@ -110,7 +110,7 @@ export function OracleForms({ projects, liquid, onPushScores, onFund }: OracleFo
{/* Fund a project */}
<Panel title={t('panelFundTitle')} hint={t('panelFundHint')}>
<Field label={t('fieldProject')}>
<Select value={fundId} onChange={setFundId} projects={projects} />
<Select value={fundId} onChange={setFundId} projects={projects} label={t('fieldProject')} />
</Field>
<Field label={t('fieldAmount')}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
Expand Down Expand Up @@ -196,13 +196,20 @@ function Select({
value,
onChange,
projects,
label,
}: {
value: number
onChange: (id: number) => void
projects: RegistryEntry[]
label: string
}) {
return (
<select value={value} onChange={(e) => onChange(Number(e.target.value))} style={selectStyle}>
<select
aria-label={label}
value={value}
onChange={(e) => onChange(Number(e.target.value))}
style={selectStyle}
>
{projects.map((p) => (
<option key={p.id} value={p.id}>
{p.name}
Expand Down Expand Up @@ -277,4 +284,4 @@ const helpText: CSSProperties = {
fontSize: 12.5,
lineHeight: 1.5,
color: 'var(--ink-60)',
}
}
77 changes: 55 additions & 22 deletions src/shell/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Mark } from '../brand/Mark'
*/
export function Footer() {
const t = useTranslations('Footer')
const links = [t('verify'), t('risk'), t('learn')]
return (
<footer style={{ borderTop: '1px solid var(--ink-12)', background: 'var(--surface)' }}>
<div
Expand Down Expand Up @@ -38,7 +37,7 @@ export function Footer() {
heliobond
</span>
</div>
<div
<nav
style={{
display: 'flex',
gap: 22,
Expand All @@ -48,25 +47,58 @@ export function Footer() {
color: 'var(--ink-60)',
flexWrap: 'wrap',
}}
aria-label={t('trustLinks')}
>
{links.map((l) => (
<button
key={l}
className="hb-textlink"
style={{
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
fontFamily: 'inherit',
fontSize: 'inherit',
color: 'var(--ink-60)',
}}
>
{l}
</button>
))}
<button
<a
href="/verify"
className="hb-textlink"
style={{
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
fontFamily: 'inherit',
fontSize: 'inherit',
color: 'var(--ink-60)',
textDecoration: 'none',
}}
>
{t('verify')}
</a>
<a
href="/risk"
className="hb-textlink"
style={{
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
fontFamily: 'inherit',
fontSize: 'inherit',
color: 'var(--ink-60)',
textDecoration: 'none',
}}
>
{t('risk')}
</a>
<a
href="/learn"
className="hb-textlink"
style={{
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
fontFamily: 'inherit',
fontSize: 'inherit',
color: 'var(--ink-60)',
textDecoration: 'none',
}}
>
{t('learn')}
</a>
<a
href="/talk"
className="hb-textlink"
style={{
background: 'none',
Expand All @@ -77,10 +109,11 @@ export function Footer() {
fontSize: 'inherit',
color: 'var(--ink)',
fontWeight: 600,
textDecoration: 'none',
}}
>
{t('talk')}
</button>
</a>
<Link
href="/admin"
className="hb-textlink"
Expand All @@ -93,7 +126,7 @@ export function Footer() {
>
{t('admin')}
</Link>
</div>
</nav>
</div>
</footer>
)
Expand Down
Loading