aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/features/messages.js26
-rw-r--r--src/i18n.js1
-rw-r--r--src/locales/ar.json3
-rw-r--r--src/locales/bn.json3
-rw-r--r--src/locales/de.json3
-rw-r--r--src/locales/es.json3
-rw-r--r--src/locales/fr.json3
-rw-r--r--src/locales/hi.json3
-rw-r--r--src/locales/id.json3
-rw-r--r--src/locales/ja.json3
-rw-r--r--src/locales/ko.json3
-rw-r--r--src/locales/mr.json3
-rw-r--r--src/locales/pt.json3
-rw-r--r--src/locales/ru.json3
-rw-r--r--src/locales/sw.json3
-rw-r--r--src/locales/ta.json3
-rw-r--r--src/locales/te.json3
-rw-r--r--src/locales/tr.json3
-rw-r--r--src/locales/ur.json3
-rw-r--r--src/locales/vi.json3
-rw-r--r--src/locales/zh.json3
-rw-r--r--src/style.css12
22 files changed, 53 insertions, 43 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 8c01cbe..2b8365b 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -3145,7 +3145,7 @@ export function messagesFeature(ctx) {
// for the other direction (a note row tapped on a profile page).
ui.profOverThread = !!ui.noteThread;
ui.profEdit = null; ui.profEditFilled = false; ui.logoutConfirm = null; ui.profCompose = null;
- ui.profPeople = null;
+ ui.profPeople = null; ui.npubShown = null;
render();
try { window.scrollTo(0, 0); } catch {}
fetchFullProfile(pk);
@@ -4580,9 +4580,14 @@ export function messagesFeature(ctx) {
type: 'button', class: 'social-count' + (ui.profPeople === which ? ' on' : ''), 'aria-expanded': String(ui.profPeople === which),
onClick: () => pick(which),
}, h('b', {}, n == null ? '–' : compactNum(n)), ' ', label);
+ const shown = ui.npubShown === pk;
return h('div', { class: 'row social-line' },
btn('following', follows, t('profFollowing')),
- btn('followers', c?.followers, t('profFollowers')));
+ btn('followers', c?.followers, t('profFollowers')),
+ h('button', {
+ type: 'button', class: 'social-count npub-toggle' + (shown ? ' on' : ''), style: 'margin-left:auto', 'aria-expanded': String(shown),
+ onClick: () => { ui.npubShown = shown ? null : pk; render(); },
+ }, t('profKeyLink')));
}
function socialList(pk) {
const which = ui.profPeople;
@@ -8141,18 +8146,13 @@ export function messagesFeature(ctx) {
: null,
ui.profEdit ? null : socialLine(pk),
ui.profEdit ? null : socialList(pk),
- // A readable public-ID preview; copying always uses the full npub.
- // It only steps aside while the (long) edit form is open.
- ui.profEdit ? null : h('button', {
- type: 'button', class: 'profile-key', title: npub,
- 'aria-label': t('copy') + ': ' + t('profPublicKey'),
+ // The npub in full, monospace, tap to copy — behind the "Public key"
+ // link on the line above, so it costs no room until it's asked for.
+ ui.profEdit || ui.npubShown !== pk ? null : h('button', {
+ type: 'button', class: 'addr-box break npub-box', title: t('copy'),
+ style: 'font-size:11px;cursor:pointer;text-align:left;width:100%',
onClick: async () => { try { await navigator.clipboard.writeText(npub); toast(t('copied')); } catch {} },
- },
- h('span', { class: 'profile-key-content' },
- h('span', { class: 'profile-key-label' }, t('profPublicKey')),
- h('bdi', { class: 'profile-key-value', dir: 'ltr' }, npub.slice(0, 12) + '…' + npub.slice(-8))),
- h('span', { class: 'profile-key-copy', 'aria-hidden': 'true', html:
- '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="8" width="12" height="12" rx="3"/><path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"/></svg>' })),
+ }, npub),
ui.profEdit
? h('div', { class: 'col', style: 'gap:8px' },
// the username IS the payment address and NIP-05 — the frozen
diff --git a/src/i18n.js b/src/i18n.js
index a7bc987..8ca3269 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -104,6 +104,7 @@ const STR = {
profUploadPic: 'Upload photo',
profDisplayName: 'Display name',
profPublicKey: 'Nostr public key',
+ profKeyLink: 'Public key',
followHistTitle: 'Follow list',
followHistDesc: 'You follow {n} people. If another app replaced your follow list, an older copy may still be on a relay that keeps history. Restoring adds everyone from it back; nobody is removed.',
followHistLook: 'Look for older copies',
diff --git a/src/locales/ar.json b/src/locales/ar.json
index a3693d5..22aa848 100644
--- a/src/locales/ar.json
+++ b/src/locales/ar.json
@@ -880,5 +880,6 @@
"followHistNothing": "كل من في تلك النسخة موجود في قائمتك بالفعل.",
"followHistRestored": "تمت استعادة {n} متابَعًا.",
"securityTitle": "الأمان",
- "arkCoinsNone": "لا توجد عملات في الإنفاق بعد."
+ "arkCoinsNone": "لا توجد عملات في الإنفاق بعد.",
+ "profKeyLink": "المفتاح العام"
}
diff --git a/src/locales/bn.json b/src/locales/bn.json
index 07c7fe2..7427bf4 100644
--- a/src/locales/bn.json
+++ b/src/locales/bn.json
@@ -880,5 +880,6 @@
"followHistNothing": "ওই কপির সবাই ইতিমধ্যে আপনার তালিকায় আছেন।",
"followHistRestored": "{n} জনকে আবার ফলো করা হয়েছে।",
"securityTitle": "নিরাপত্তা",
- "arkCoinsNone": "স্পেন্ডিং-এ এখনও কোনো কয়েন নেই।"
+ "arkCoinsNone": "স্পেন্ডিং-এ এখনও কোনো কয়েন নেই।",
+ "profKeyLink": "পাবলিক কী"
}
diff --git a/src/locales/de.json b/src/locales/de.json
index 75cbf74..f9608dd 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -880,5 +880,6 @@
"followHistNothing": "Alle aus dieser Kopie sind schon in deiner Liste.",
"followHistRestored": "{n} Follows wiederhergestellt.",
"securityTitle": "Sicherheit",
- "arkCoinsNone": "Noch keine Coins in Ausgaben."
+ "arkCoinsNone": "Noch keine Coins in Ausgaben.",
+ "profKeyLink": "Öffentlicher Schlüssel"
}
diff --git a/src/locales/es.json b/src/locales/es.json
index 21adaa2..0fd53b7 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -880,5 +880,6 @@
"followHistNothing": "Todos los de esa copia ya están en tu lista.",
"followHistRestored": "Se restauraron {n} seguidos.",
"securityTitle": "Seguridad",
- "arkCoinsNone": "Aún no hay monedas en Gastos."
+ "arkCoinsNone": "Aún no hay monedas en Gastos.",
+ "profKeyLink": "Clave pública"
}
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 899a586..d254b0c 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -880,5 +880,6 @@
"followHistNothing": "Tout le monde dans cette copie est déjà dans votre liste.",
"followHistRestored": "{n} abonnements restaurés.",
"securityTitle": "Sécurité",
- "arkCoinsNone": "Aucune pièce dans Dépenses pour l’instant."
+ "arkCoinsNone": "Aucune pièce dans Dépenses pour l’instant.",
+ "profKeyLink": "Clé publique"
}
diff --git a/src/locales/hi.json b/src/locales/hi.json
index b26525c..6af771e 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -880,5 +880,6 @@
"followHistNothing": "उस कॉपी के सभी लोग पहले से आपकी सूची में हैं।",
"followHistRestored": "{n} फ़ॉलो बहाल किए गए।",
"securityTitle": "सुरक्षा",
- "arkCoinsNone": "स्पेंडिंग में अभी कोई कॉइन नहीं।"
+ "arkCoinsNone": "स्पेंडिंग में अभी कोई कॉइन नहीं।",
+ "profKeyLink": "पब्लिक की"
}
diff --git a/src/locales/id.json b/src/locales/id.json
index cff81be..a5b4f32 100644
--- a/src/locales/id.json
+++ b/src/locales/id.json
@@ -216,5 +216,6 @@
"followHistNothing": "Semua orang di salinan itu sudah ada di daftarmu.",
"followHistRestored": "{n} ikutan dipulihkan.",
"securityTitle": "Keamanan",
- "arkCoinsNone": "Belum ada koin di Belanja."
+ "arkCoinsNone": "Belum ada koin di Belanja.",
+ "profKeyLink": "Kunci publik"
}
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 58a188e..151782b 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -880,5 +880,6 @@
"followHistNothing": "そのコピーの全員がすでにリストにいます。",
"followHistRestored": "{n}人のフォローを復元しました。",
"securityTitle": "セキュリティ",
- "arkCoinsNone": "支出にはまだコインがありません。"
+ "arkCoinsNone": "支出にはまだコインがありません。",
+ "profKeyLink": "公開鍵"
}
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 84da178..1c204c2 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -879,5 +879,6 @@
"followHistNothing": "그 사본의 모든 사람이 이미 목록에 있습니다.",
"followHistRestored": "팔로우 {n}명을 복원했습니다.",
"securityTitle": "보안",
- "arkCoinsNone": "지출에 아직 코인이 없습니다."
+ "arkCoinsNone": "지출에 아직 코인이 없습니다.",
+ "profKeyLink": "공개 키"
}
diff --git a/src/locales/mr.json b/src/locales/mr.json
index 66239cd..6d443bb 100644
--- a/src/locales/mr.json
+++ b/src/locales/mr.json
@@ -216,5 +216,6 @@
"followHistNothing": "त्या प्रतीतील सर्वजण आधीच तुमच्या यादीत आहेत.",
"followHistRestored": "{n} फॉलो पुनर्संचयित केले.",
"securityTitle": "सुरक्षा",
- "arkCoinsNone": "स्पेंडिंगमध्ये अद्याप कोणतेही कॉइन नाहीत."
+ "arkCoinsNone": "स्पेंडिंगमध्ये अद्याप कोणतेही कॉइन नाहीत.",
+ "profKeyLink": "सार्वजनिक की"
}
diff --git a/src/locales/pt.json b/src/locales/pt.json
index 3723f3f..51ed6ab 100644
--- a/src/locales/pt.json
+++ b/src/locales/pt.json
@@ -880,5 +880,6 @@
"followHistNothing": "Todos dessa cópia já estão na sua lista.",
"followHistRestored": "{n} seguidos restaurados.",
"securityTitle": "Segurança",
- "arkCoinsNone": "Ainda não há moedas em Gastos."
+ "arkCoinsNone": "Ainda não há moedas em Gastos.",
+ "profKeyLink": "Chave pública"
}
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 66fb170..86a6f15 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -880,5 +880,6 @@
"followHistNothing": "Все из этой копии уже есть в вашем списке.",
"followHistRestored": "Восстановлено подписок: {n}.",
"securityTitle": "Безопасность",
- "arkCoinsNone": "В расходах пока нет монет."
+ "arkCoinsNone": "В расходах пока нет монет.",
+ "profKeyLink": "Открытый ключ"
}
diff --git a/src/locales/sw.json b/src/locales/sw.json
index b357408..efaad77 100644
--- a/src/locales/sw.json
+++ b/src/locales/sw.json
@@ -216,5 +216,6 @@
"followHistNothing": "Wote kwenye nakala hiyo tayari wamo kwenye orodha yako.",
"followHistRestored": "Umerejesha unaowafuata {n}.",
"securityTitle": "Usalama",
- "arkCoinsNone": "Bado hakuna sarafu kwenye Matumizi."
+ "arkCoinsNone": "Bado hakuna sarafu kwenye Matumizi.",
+ "profKeyLink": "Ufunguo wa umma"
}
diff --git a/src/locales/ta.json b/src/locales/ta.json
index 82dfb0a..bc210a3 100644
--- a/src/locales/ta.json
+++ b/src/locales/ta.json
@@ -216,5 +216,6 @@
"followHistNothing": "அந்த நகலில் உள்ள அனைவரும் ஏற்கனவே உங்கள் பட்டியலில் உள்ளனர்.",
"followHistRestored": "{n} பின்தொடர்வுகள் மீட்டெடுக்கப்பட்டன.",
"securityTitle": "பாதுகாப்பு",
- "arkCoinsNone": "செலவுக் கணக்கில் இன்னும் நாணயங்கள் இல்லை."
+ "arkCoinsNone": "செலவுக் கணக்கில் இன்னும் நாணயங்கள் இல்லை.",
+ "profKeyLink": "பொது விசை"
}
diff --git a/src/locales/te.json b/src/locales/te.json
index 5c4751d..44d7017 100644
--- a/src/locales/te.json
+++ b/src/locales/te.json
@@ -214,5 +214,6 @@
"followHistNothing": "ఆ కాపీలోని అందరూ ఇప్పటికే మీ జాబితాలో ఉన్నారు.",
"followHistRestored": "{n} ఫాలోలు పునరుద్ధరించబడ్డాయి.",
"securityTitle": "భద్రత",
- "arkCoinsNone": "ఖర్చు ఖాతాలో ఇంకా నాణేలు లేవు."
+ "arkCoinsNone": "ఖర్చు ఖాతాలో ఇంకా నాణేలు లేవు.",
+ "profKeyLink": "పబ్లిక్ కీ"
}
diff --git a/src/locales/tr.json b/src/locales/tr.json
index 6150425..2b83d38 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -879,5 +879,6 @@
"followHistNothing": "O kopyadaki herkes zaten listende.",
"followHistRestored": "{n} takip geri yüklendi.",
"securityTitle": "Güvenlik",
- "arkCoinsNone": "Harcama’da henüz coin yok."
+ "arkCoinsNone": "Harcama’da henüz coin yok.",
+ "profKeyLink": "Açık anahtar"
}
diff --git a/src/locales/ur.json b/src/locales/ur.json
index 458a0f4..a018085 100644
--- a/src/locales/ur.json
+++ b/src/locales/ur.json
@@ -216,5 +216,6 @@
"followHistNothing": "اس کاپی کے سب لوگ پہلے سے آپ کی فہرست میں ہیں۔",
"followHistRestored": "{n} فالو بحال ہو گئے۔",
"securityTitle": "سیکیورٹی",
- "arkCoinsNone": "خرچ میں ابھی کوئی کوائن نہیں۔"
+ "arkCoinsNone": "خرچ میں ابھی کوئی کوائن نہیں۔",
+ "profKeyLink": "پبلک کی"
}
diff --git a/src/locales/vi.json b/src/locales/vi.json
index 06916ab..fefac38 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -216,5 +216,6 @@
"followHistNothing": "Mọi người trong bản đó đã có trong danh sách của bạn.",
"followHistRestored": "Đã khôi phục {n} người theo dõi.",
"securityTitle": "Bảo mật",
- "arkCoinsNone": "Chưa có coin nào trong Chi tiêu."
+ "arkCoinsNone": "Chưa có coin nào trong Chi tiêu.",
+ "profKeyLink": "Khóa công khai"
}
diff --git a/src/locales/zh.json b/src/locales/zh.json
index d6ea3f7..9693637 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -880,5 +880,6 @@
"followHistNothing": "该副本中的所有人都已在你的列表中。",
"followHistRestored": "已恢复 {n} 个关注。",
"securityTitle": "安全",
- "arkCoinsNone": "支出账户中还没有币。"
+ "arkCoinsNone": "支出账户中还没有币。",
+ "profKeyLink": "公钥"
}
diff --git a/src/style.css b/src/style.css
index 6a8af53..2addd9c 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1057,16 +1057,6 @@ html.no-scroll { overflow: hidden; scrollbar-gutter: auto; }
box-shadow: 0 0 0 2px var(--bg);
}
.chat-avatar.header-ava { width: 30px; height: 30px; font-size: 11px; }
-.profile-key {
- display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 16px;
- border: 0; border-radius: 12px; background: var(--surface2);
- font-family: var(--sans); text-align: start;
-}
-.profile-key:hover { background: var(--accent-soft); }
-.profile-key-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
-.profile-key-label { color: var(--muted); font-size: 12px; font-weight: 500; }
-.profile-key-value { font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
-.profile-key-copy { display: flex; flex-shrink: 0; color: var(--muted); }
.composer-options { margin-inline-start: auto; flex-shrink: 0; }
.compose-preview-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); }
.copy-ico { flex-shrink: 0; background: none; border: none; padding: 2px; color: var(--muted); cursor: pointer; display: flex; }
@@ -1342,7 +1332,7 @@ body::after {
.chat-quote-text .cemoji { height: 1.25em; vertical-align: -0.3em; }
/* "116 Following · 572 Followers" on a profile; each opens its list below */
-.social-line { gap: 16px; align-items: center; }
+.social-line { gap: 6px 16px; align-items: center; flex-wrap: wrap; }
.social-count {
width: auto; margin: 0; padding: 2px 0; border: 0; background: none; color: var(--muted);
font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; border-radius: 0;