From 6bc4f799ee0d64936bbba9fe3ae65181ed471e38 Mon Sep 17 00:00:00 2001 From: koalasat Date: Sun, 20 Jul 2025 15:25:07 +0200 Subject: [PATCH] Styles --- .../src/basic/SettingsPage/Coordinators.tsx | 1 + frontend/src/components/Dialogs/Profile.tsx | 3 +- frontend/src/components/RobotInfo/index.tsx | 49 ------------------- frontend/static/locales/ca.json | 1 - frontend/static/locales/cs.json | 1 - frontend/static/locales/de.json | 1 - frontend/static/locales/en.json | 1 - frontend/static/locales/es.json | 1 - frontend/static/locales/eu.json | 1 - frontend/static/locales/fr.json | 1 - frontend/static/locales/it.json | 1 - frontend/static/locales/ja.json | 1 - frontend/static/locales/pl.json | 1 - frontend/static/locales/pt.json | 1 - frontend/static/locales/ru.json | 1 - frontend/static/locales/sv.json | 1 - frontend/static/locales/sw.json | 1 - frontend/static/locales/th.json | 1 - frontend/static/locales/zh-SI.json | 1 - frontend/static/locales/zh-TR.json | 1 - 20 files changed, 3 insertions(+), 67 deletions(-) diff --git a/frontend/src/basic/SettingsPage/Coordinators.tsx b/frontend/src/basic/SettingsPage/Coordinators.tsx index ab667dab..096ed574 100644 --- a/frontend/src/basic/SettingsPage/Coordinators.tsx +++ b/frontend/src/basic/SettingsPage/Coordinators.tsx @@ -28,6 +28,7 @@ const Coordinators = (): React.JSX.Element => { }} aria-labelledby='recovery-dialog-title' aria-describedby='recovery-description' + fullWidth > diff --git a/frontend/src/components/Dialogs/Profile.tsx b/frontend/src/components/Dialogs/Profile.tsx index fd080772..9c19998a 100644 --- a/frontend/src/components/Dialogs/Profile.tsx +++ b/frontend/src/components/Dialogs/Profile.tsx @@ -47,8 +47,9 @@ const ProfileDialog = ({ open = false, onClose }: Props): React.JSX.Element => { onClose={onClose} aria-labelledby='profile-title' aria-describedby='profile-description' + fullWidth > - + {t('Your Robot')} diff --git a/frontend/src/components/RobotInfo/index.tsx b/frontend/src/components/RobotInfo/index.tsx index d43d2e4c..0c883167 100644 --- a/frontend/src/components/RobotInfo/index.tsx +++ b/frontend/src/components/RobotInfo/index.tsx @@ -28,7 +28,6 @@ import { useTranslation } from 'react-i18next'; import { EnableTelegramDialog } from '../Dialogs'; import { UserNinjaIcon } from '../Icons'; -import { getWebln } from '../../utils'; import { signCleartextMessage } from '../../pgp'; import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext'; import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext'; @@ -54,7 +53,6 @@ const RobotInfo: React.FC = ({ coordinator, onClose }: Props) => { const [withdrawn, setWithdrawn] = useState(false); const [badInvoice, setBadInvoice] = useState(''); const [openClaimRewards, setOpenClaimRewards] = useState(false); - const [weblnEnabled, setWeblnEnabled] = useState(false); const [openEnableTelegram, setOpenEnableTelegram] = useState(false); const [openOptions, setOpenOptions] = useState(false); const [disabled, setDisable] = useState(false); @@ -69,33 +67,6 @@ const RobotInfo: React.FC = ({ coordinator, onClose }: Props) => { setDisable(Boolean(robot?.loading)); }, [robot?.loading]); - const handleWebln = async (): Promise => { - void getWebln() - .then(() => { - setWeblnEnabled(true); - }) - .catch(() => { - setWeblnEnabled(false); - console.log('WebLN not available'); - }); - }; - - useEffect(() => { - void handleWebln(); - }, []); - - const handleWeblnInvoiceClicked = async (e: MouseEvent): void => { - e.preventDefault(); - if (robot != null && robot.earnedRewards > 0) { - const webln = await getWebln(); - const invoice = webln.makeInvoice(robot.earnedRewards).then(() => { - if (invoice != null) { - handleSubmitInvoiceClicked(e, invoice.paymentRequest); - } - }); - } - }; - const handleSubmitInvoiceClicked = (e: Event, rewardInvoice: string): void => { setBadInvoice(''); setShowRewardsSpinner(true); @@ -347,26 +318,6 @@ const RobotInfo: React.FC = ({ coordinator, onClose }: Props) => { - {weblnEnabled ? ( - - - - - - ) : ( - <> - )} )} diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index c1d1fff5..5babf425 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -513,7 +513,6 @@ "Claim": "Retirar", "Enable Telegram Notifications": "Habilita notificacions a Telegram", "Finished order": "Finished order", - "Generate with Webln": "Generar amb Webln", "Inactive order": "Ordre inactiva", "Invoice for {{amountSats}} Sats": "Factura per {{amountSats}} Sats", "No active orders": "No hi ha ordres actives", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index f7e3d8c5..1cfa43fc 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -513,7 +513,6 @@ "Claim": "Vybrat", "Enable Telegram Notifications": "Povolit Telegram notifikace", "Finished order": "Finished order", - "Generate with Webln": "Generovat s Webln", "Inactive order": "Neaktivní objednávka", "Invoice for {{amountSats}} Sats": "Faktura pro {{amountSats}} Satů", "No active orders": "Žádné aktivní objednávky", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index e165106a..330934dd 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -513,7 +513,6 @@ "Claim": "Erhalten", "Enable Telegram Notifications": "Telegram-Benachrichtigungen aktivieren", "Finished order": "Finished order", - "Generate with Webln": "Mit Webln generieren", "Inactive order": "Inaktive Bestellung", "Invoice for {{amountSats}} Sats": "Rechnung für {{amountSats}} Sats", "No active orders": "Keine aktive Bestellung", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index 1091d827..038bf4cf 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -513,7 +513,6 @@ "Claim": "Claim", "Enable Telegram Notifications": "Enable Telegram Notifications", "Finished order": "Finished order", - "Generate with Webln": "Generate with Webln", "Inactive order": "Inactive order", "Invoice for {{amountSats}} Sats": "Invoice for {{amountSats}} Sats", "No active orders": "No active orders", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index 85f8ab7c..c1a3081a 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -513,7 +513,6 @@ "Claim": "Reclamar", "Enable Telegram Notifications": "Activar Notificaciones de Telegram", "Finished order": "Finished order", - "Generate with Webln": "Generar con Webln", "Inactive order": "Orden inactiva", "Invoice for {{amountSats}} Sats": "Factura de {{amountSats}} Sats", "No active orders": "No hay órdenes activas", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index 88b603ec..6484e6c5 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -513,7 +513,6 @@ "Claim": "Eskatu", "Enable Telegram Notifications": "Baimendu Telegram Jakinarazpenak", "Finished order": "Finished order", - "Generate with Webln": "Sortu Webln Laketa", "Inactive order": "Eskaera ez aktiboa", "Invoice for {{amountSats}} Sats": "{{amountSats}} Sateko faktura", "No active orders": "Ez dago eskaera aktiboak", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index b20e75be..8a75cc3b 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -513,7 +513,6 @@ "Claim": "Réclamer", "Enable Telegram Notifications": "Activer les notifications Telegram", "Finished order": "Finished order", - "Generate with Webln": "Générer avec Webln", "Inactive order": "Ordre inactif", "Invoice for {{amountSats}} Sats": "Facture pour {{amountSats}} Sats", "No active orders": "Aucun ordre actif", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index 1624c9b2..3fed4f1d 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -513,7 +513,6 @@ "Claim": "Richiedi", "Enable Telegram Notifications": "Abilita Notifiche Telegram", "Finished order": "Finished order", - "Generate with Webln": "Genera con Webln", "Inactive order": "Ordine inattivo", "Invoice for {{amountSats}} Sats": "Fattura per {{amountSats}} Sats", "No active orders": "Nessun ordine attivo", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 5858b9b9..c3b4750d 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -513,7 +513,6 @@ "Claim": "請求する", "Enable Telegram Notifications": "Telegram通知を有効にする", "Finished order": "Finished order", - "Generate with Webln": "Weblnで生成", "Inactive order": "非アクティブなオーダー", "Invoice for {{amountSats}} Sats": " {{amountSats}} Satsのインボイス", "No active orders": "アクティブなオーダーはありません", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index a03efe77..1c678251 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -513,7 +513,6 @@ "Claim": "Odebrać", "Enable Telegram Notifications": "Włącz powiadomienia Telegram", "Finished order": "Finished order", - "Generate with Webln": "Generuj z Webln", "Inactive order": "Nieaktywne zamówienie", "Invoice for {{amountSats}} Sats": "Faktura za {{amountSats}} Sats", "No active orders": "Brak aktywnych zamówień", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index 1919866f..39d78dad 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -513,7 +513,6 @@ "Claim": "Reivindicar", "Enable Telegram Notifications": "Habilitar notificações do Telegram", "Finished order": "Finished order", - "Generate with Webln": "Gerar com Webln", "Inactive order": "Ordem inativa", "Invoice for {{amountSats}} Sats": "Fatura para {{amountSats}} Sats", "No active orders": "Nenhuma ordem ativa", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index 6e05abd1..6167134f 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -513,7 +513,6 @@ "Claim": "Запросить", "Enable Telegram Notifications": "Включить уведомления Telegram", "Finished order": "Finished order", - "Generate with Webln": "Генерировать с помощью Webln", "Inactive order": "Неактивный ордер", "Invoice for {{amountSats}} Sats": "Инвойс на {{amountSats}} Сатоши", "No active orders": "Нет активных ордеров", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index d0437c27..38a2b65a 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -513,7 +513,6 @@ "Claim": "Anspråk", "Enable Telegram Notifications": "Aktivera Telegram-aviseringar", "Finished order": "Finished order", - "Generate with Webln": "Generera med Webln", "Inactive order": "Inaktiv order", "Invoice for {{amountSats}} Sats": "Faktura för {{amountSats}} sats", "No active orders": "Inga aktiva ordrar", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index 14478d19..9c7e6d02 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -513,7 +513,6 @@ "Claim": "Dai", "Enable Telegram Notifications": "Washa Arifa za Telegram", "Finished order": "Finished order", - "Generate with Webln": "Zalisha kwa Webln", "Inactive order": "Agizo lisilo hai", "Invoice for {{amountSats}} Sats": "Ankara kwa {{amountSats}} Sats", "No active orders": "Hakuna maagizo yanayofanya kazi", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index 6215ef00..abfb64b5 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -513,7 +513,6 @@ "Claim": "รับรางวัล", "Enable Telegram Notifications": "เปิดใช้การแจ้งเตือน Telegram", "Finished order": "Finished order", - "Generate with Webln": "สร้างด้วย Webln", "Inactive order": "คำสั่งซื้อที่ไม่ใช้งาน", "Invoice for {{amountSats}} Sats": "ใบแจ้งหนี้สำหรับ {{amountSats}} Sats", "No active orders": "ไม่มีคำสั่งซื้อที่ใช้งานอยู่", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index 86feb476..a2141fa4 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -513,7 +513,6 @@ "Claim": "领取", "Enable Telegram Notifications": "开启电报通知", "Finished order": "Finished order", - "Generate with Webln": "使用 Webln 生成", "Inactive order": "不活跃订单", "Invoice for {{amountSats}} Sats": "{{amountSats}}聪的发票", "No active orders": "没有活跃的订单", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index 134159b8..a094f9e3 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -513,7 +513,6 @@ "Claim": "索取", "Enable Telegram Notifications": "啟用 Telegram 通知", "Finished order": "Finished order", - "Generate with Webln": "使用 Webln 生成", "Inactive order": "不活躍的訂單", "Invoice for {{amountSats}} Sats": "{{amountSats}} 聰的發票", "No active orders": "沒有活躍的訂單",