From fcc7909abfcc4027eb4ef4c1a984e1df26c35232 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Tue, 11 Nov 2025 14:13:56 +0100 Subject: [PATCH] added alexandria links to the menu --- src/components/NoteOptions/useMenuActions.tsx | 12 ++++++++++-- src/i18n/locales/ar.ts | 3 ++- src/i18n/locales/de.ts | 3 ++- src/i18n/locales/en.ts | 2 ++ src/i18n/locales/es.ts | 3 ++- src/i18n/locales/fa.ts | 3 ++- src/i18n/locales/fr.ts | 3 ++- src/i18n/locales/hi.ts | 3 ++- src/i18n/locales/it.ts | 3 ++- src/i18n/locales/ja.ts | 3 ++- src/i18n/locales/ko.ts | 3 ++- src/i18n/locales/pl.ts | 3 ++- src/i18n/locales/pt-BR.ts | 3 ++- src/i18n/locales/pt-PT.ts | 3 ++- src/i18n/locales/ru.ts | 3 ++- src/i18n/locales/th.ts | 3 ++- src/i18n/locales/zh.ts | 3 ++- src/lib/link.ts | 1 + 18 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/components/NoteOptions/useMenuActions.tsx b/src/components/NoteOptions/useMenuActions.tsx index af23ef9..7366d68 100644 --- a/src/components/NoteOptions/useMenuActions.tsx +++ b/src/components/NoteOptions/useMenuActions.tsx @@ -1,7 +1,7 @@ import { ExtendedKind } from '@/constants' import { getNoteBech32Id, isProtectedEvent, getRootEventHexId } from '@/lib/event' import { getLongFormArticleMetadataFromEvent } from '@/lib/event-metadata' -import { toNjump } from '@/lib/link' +import { toNjump, toAlexandria } from '@/lib/link' import logger from '@/lib/logger' import { pubkeyToNpub } from '@/lib/pubkey' import { normalizeUrl, simplifyUrl } from '@/lib/url' @@ -455,11 +455,19 @@ export function useMenuActions({ }, { icon: Link, - label: t('Copy share link'), + label: t('Share with Njump'), onClick: () => { navigator.clipboard.writeText(toNjump(getNoteBech32Id(event))) closeDrawer() } + }, + { + icon: BookOpen, + label: t('Share with Alexandria'), + onClick: () => { + navigator.clipboard.writeText(toAlexandria(getNoteBech32Id(event))) + closeDrawer() + } } ] diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 4643487..0290d6c 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -63,7 +63,8 @@ export default { Add: 'إضافة', 'n relays': '{{n}} ريلايات', Rename: 'إعادة تسمية', - 'Copy share link': 'نسخ رابط المشاركة', + 'Share with Njump': 'مشاركة مع Njump', + 'Share with Alexandria': 'مشاركة مع Alexandria', Delete: 'حذف', 'Relay already exists': 'الريلاي موجود بالفعل', 'invalid relay URL': 'عنوان URL للريلاي غير صالح', diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 5073c6b..52a7394 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -63,7 +63,8 @@ export default { Add: 'Hinzufügen', 'n relays': '{{n}} Relays', Rename: 'Umbenennen', - 'Copy share link': 'Freigabelink kopieren', + 'Share with Njump': 'Mit Njump teilen', + 'Share with Alexandria': 'Mit Alexandria teilen', Delete: 'Löschen', 'Relay already exists': 'Relay existiert bereits', 'invalid relay URL': 'Ungültige Relay-URL', diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 291f1f6..2bce890 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -66,6 +66,8 @@ export default { 'n relays': '{{n}} relays', Rename: 'Rename', 'Copy share link': 'Copy share link', + 'Share with Njump': 'Share with Njump', + 'Share with Alexandria': 'Share with Alexandria', Delete: 'Delete', 'Relay already exists': 'Relay already exists', 'invalid relay URL': 'invalid relay URL', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 818e232..77c8a3b 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -63,7 +63,8 @@ export default { Add: 'Agregar', 'n relays': '{{n}} relés', Rename: 'Renombrar', - 'Copy share link': 'Copiar enlace para compartir', + 'Share with Njump': 'Compartir con Njump', + 'Share with Alexandria': 'Compartir con Alexandria', Delete: 'Eliminar', 'Relay already exists': 'El relé ya existe', 'invalid relay URL': 'URL del relé inválida', diff --git a/src/i18n/locales/fa.ts b/src/i18n/locales/fa.ts index aed1ded..44c5496 100644 --- a/src/i18n/locales/fa.ts +++ b/src/i18n/locales/fa.ts @@ -62,7 +62,8 @@ export default { Add: 'افزودن', 'n relays': '{{n}} رله', Rename: 'تغییر نام', - 'Copy share link': 'کپی لینک اشتراک', + 'Share with Njump': 'اشتراک‌گذاری با Njump', + 'Share with Alexandria': 'اشتراک‌گذاری با Alexandria', Delete: 'حذف', 'Relay already exists': 'رله از قبل موجود است', 'invalid relay URL': 'آدرس رله نامعتبر', diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 5ceffa6..e4928ab 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -63,7 +63,8 @@ export default { Add: 'Ajouter', 'n relays': '{{n}} relais', Rename: 'Renommer', - 'Copy share link': 'Copier le lien de partage', + 'Share with Njump': 'Partager avec Njump', + 'Share with Alexandria': 'Partager avec Alexandria', Delete: 'Supprimer', 'Relay already exists': 'Le relais existe déjà', 'invalid relay URL': 'URL de relais invalide', diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts index 9df8bc3..276fe62 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -62,7 +62,8 @@ export default { Add: 'जोड़ें', 'n relays': '{{n}} रिले', Rename: 'नाम बदलें', - 'Copy share link': 'शेयर लिंक कॉपी करें', + 'Share with Njump': 'Njump के साथ शेयर करें', + 'Share with Alexandria': 'Alexandria के साथ शेयर करें', Delete: 'हटाएं', 'Relay already exists': 'रिले पहले से मौजूद है', 'invalid relay URL': 'अमान्य रिले URL', diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index 2974a63..726ef0c 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -62,7 +62,8 @@ export default { Add: 'Aggiungi', 'n relays': '{{n}} relays', Rename: 'Rinomina', - 'Copy share link': 'Copia collegamento da condividere', + 'Share with Njump': 'Condividi con Njump', + 'Share with Alexandria': 'Condividi con Alexandria', Delete: 'Cancella', 'Relay already exists': 'Relay già esistente', 'invalid relay URL': 'URL relay non valido', diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index fa2b88b..7cacf5e 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -63,7 +63,8 @@ export default { Add: '追加', 'n relays': '{{n}} 個のリレイ', Rename: '名前変更', - 'Copy share link': '共有リンクをコピー', + 'Share with Njump': 'Njumpで共有', + 'Share with Alexandria': 'Alexandriaで共有', Delete: '削除', 'Relay already exists': 'リレイは既に存在します', 'invalid relay URL': '無効なリレイURL', diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts index 0f4305e..db72398 100644 --- a/src/i18n/locales/ko.ts +++ b/src/i18n/locales/ko.ts @@ -62,7 +62,8 @@ export default { Add: '추가', 'n relays': '{{n}}개의 릴레이', Rename: '이름 변경', - 'Copy share link': '공유 링크 복사', + 'Share with Njump': 'Njump로 공유', + 'Share with Alexandria': 'Alexandria로 공유', Delete: '삭제', 'Relay already exists': '릴레이가 이미 존재합니다', 'invalid relay URL': '유효하지 않은 릴레이 주소', diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index c97f8c9..5f602c2 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -62,7 +62,8 @@ export default { Add: 'Dodaj', 'n relays': '{{n}} szt.', Rename: 'Zmień nazwę', - 'Copy share link': 'Kopiuj link', + 'Share with Njump': 'Udostępnij przez Njump', + 'Share with Alexandria': 'Udostępnij przez Alexandria', Delete: 'Usuń', 'Relay already exists': 'Transmiter już istnieje', 'invalid relay URL': 'Nieprawidłowy URL transmitera', diff --git a/src/i18n/locales/pt-BR.ts b/src/i18n/locales/pt-BR.ts index 81a7912..5c96ab4 100644 --- a/src/i18n/locales/pt-BR.ts +++ b/src/i18n/locales/pt-BR.ts @@ -62,7 +62,8 @@ export default { Add: 'Adicionar', 'n relays': '{{n}} relays', Rename: 'Renomear', - 'Copy share link': 'Copiar link de compartilhamento', + 'Share with Njump': 'Compartilhar com Njump', + 'Share with Alexandria': 'Compartilhar com Alexandria', Delete: 'Excluir', 'Relay already exists': 'Relay já existe', 'invalid relay URL': 'URL de relay inválida', diff --git a/src/i18n/locales/pt-PT.ts b/src/i18n/locales/pt-PT.ts index a2ff531..f77bad6 100644 --- a/src/i18n/locales/pt-PT.ts +++ b/src/i18n/locales/pt-PT.ts @@ -63,7 +63,8 @@ export default { Add: 'Adicionar', 'n relays': '{{n}} relés', Rename: 'Renomear', - 'Copy share link': 'Copiar link de compartilhamento', + 'Share with Njump': 'Compartilhar com Njump', + 'Share with Alexandria': 'Compartilhar com Alexandria', Delete: 'Excluir', 'Relay already exists': 'Relé já existe', 'invalid relay URL': 'URL de relé inválida', diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index cdee508..5fbd5b7 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -63,7 +63,8 @@ export default { Add: 'Добавить', 'n relays': '{{n}} ретрансляторов', Rename: 'Переименовать', - 'Copy share link': 'Скопировать ссылку для обмена', + 'Share with Njump': 'Поделиться через Njump', + 'Share with Alexandria': 'Поделиться через Alexandria', Delete: 'Удалить', 'Relay already exists': 'Ретранслятор уже существует', 'invalid relay URL': 'неверный URL ретранслятора', diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts index 864bade..6890f6e 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -62,7 +62,8 @@ export default { Add: 'เพิ่ม', 'n relays': '{{n}} รีเลย์', Rename: 'เปลี่ยนชื่อ', - 'Copy share link': 'คัดลอกลิงก์แชร์', + 'Share with Njump': 'แชร์ผ่าน Njump', + 'Share with Alexandria': 'แชร์ผ่าน Alexandria', Delete: 'ลบ', 'Relay already exists': 'รีเลย์มีอยู่แล้ว', 'invalid relay URL': 'URL รีเลย์ไม่ถูกต้อง', diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index eb818d8..112826f 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -62,7 +62,8 @@ export default { Add: '添加', 'n relays': '{{n}} 个服务器', Rename: '重命名', - 'Copy share link': '复制分享链接', + 'Share with Njump': '通过Njump分享', + 'Share with Alexandria': '通过Alexandria分享', Delete: '删除', 'Relay already exists': '服务器已存在', 'invalid relay URL': '无效的服务器地址', diff --git a/src/lib/link.ts b/src/lib/link.ts index ab69179..63647d2 100644 --- a/src/lib/link.ts +++ b/src/lib/link.ts @@ -79,3 +79,4 @@ export const toChachiChat = (relay: string, d: string) => { return `https://chachi.chat/${relay.replace(/^wss?:\/\//, '').replace(/\/$/, '')}/${d}` } export const toNjump = (id: string) => `https://njump.me/${id}` +export const toAlexandria = (id: string) => `https://next-alexandria.gitcitadel.eu/events?id=${encodeURIComponent(id)}`