Improve Robot recovery buttons

This commit is contained in:
koalasat 2024-10-20 02:36:45 +02:00
parent 1eac225853
commit e83afea51b
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
21 changed files with 18 additions and 41 deletions

View File

@ -323,8 +323,7 @@ const RobotProfile = ({
<Grid item>
<Button
size='small'
color='secondary'
variant='contained'
color='primary'
onClick={() => {
setOpen((open) => {
return { ...open, recovery: true };

View File

@ -100,8 +100,7 @@ const Welcome = ({ setView, width, setInputToken }: WelcomeProps): JSX.Element =
<Grid item>
<Button
size='small'
color='secondary'
variant='contained'
color='primary'
onClick={() => {
setOpen((open) => {
return { ...open, recovery: true };

View File

@ -1,5 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Key, Add } from '@mui/icons-material';
import {
Dialog,
DialogTitle,
@ -8,6 +9,7 @@ import {
DialogContentText,
Button,
} from '@mui/material';
import { useNavigate } from 'react-router-dom';
interface Props {
open: boolean;
@ -21,6 +23,7 @@ const NoRobotDialog = ({
onClickGenerateRobot = () => null,
}: Props): JSX.Element => {
const { t } = useTranslation();
const navigate = useNavigate();
return (
<Dialog open={open} onClose={onClose}>
@ -33,13 +36,22 @@ const NoRobotDialog = ({
</DialogContent>
<DialogActions>
<Button
onClick={() => {
navigate('/garage');
}}
>
<Key /> <div style={{ width: '0.5em' }} />
{t('Recovery')}
</Button>
<Button
onClick={() => {
onClickGenerateRobot();
onClose();
}}
>
{t('Generate Robot')}
<Add /> <div style={{ width: '0.5em' }} />
{t('Add Robot')}
</Button>
</DialogActions>
</Dialog>

View File

@ -56,8 +56,9 @@ const RecoveryDialog = ({ setInputToken, setView }: Props): JSX.Element => {
{t('Enter your robot token to re-build your robot and gain access to its trades.')}
</Typography>
</Grid>
<Grid item>
<Grid item style={{ width: '100%' }}>
<TokenInput
fullWidth
showCopy={false}
inputToken={recoveryToken}
setInputToken={setRecoveryToken}
@ -74,7 +75,7 @@ const RecoveryDialog = ({ setInputToken, setView }: Props): JSX.Element => {
onClick={onClickRecover}
>
<Key /> <div style={{ width: '0.5em' }} />
{t('Recover')}
{t('Recovery')}
</Button>
</Grid>
</Grid>

View File

@ -305,7 +305,6 @@
"Back": "Tornar",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Visitaràs la pàgina Learn RoboSats. Ha estat construïda per la comunitat i conté tutorials i documentació que t'ajudarà a aprendre como s'utilitza RoboSats i a entendre com funciona.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generar Robot",
"Generate a robot avatar first. Then create your own order.": "Primer genera un avatar de robot. A continuació, crea la teva pròpia oferta.",
"You do not have a robot avatar": "No tens un avatar robot",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Introdueix el teu token per reconstruir el teu robot i accedir a les seves operacions.",
"Paste token here": "Enganxa el token aquí",
"Recover": "Recuperar",
"Robot recovery": "Recuperació de Robots",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Guarda-ho!",

View File

@ -305,7 +305,6 @@
"Back": "Zpět",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Chystáš se navštívit výukovou stránku RoboSats. Stránka obsahuje tutoriály a dokumentaci, které ti pomohou pochopit jak funguje RoboSats.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generovat Robota",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "Nemáš robota a avatar",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Zálohuj to!",

View File

@ -305,7 +305,6 @@
"Back": "Zurück",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Du bist dabei die Website 'lerne RoboSats kennen' zu besuchen. Hier findest du Tutorials und Dokumentationen, die dir helfen RoboSats zu benutzen und zu verstehen wie es funktioniert.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Roboter generieren",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "Du hast keinen Roboter-Avatar",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Speicher ihn ab!",

View File

@ -305,7 +305,6 @@
"Back": "Back",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generate Robot",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "You do not have a robot avatar",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Back it up!",

View File

@ -305,7 +305,6 @@
"Back": "Volver",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Vas a visitar la página Learn RoboSats. Ha sido construida por la comunidad y contiene tutoriales y documentación que te ayudará a aprender cómo se usa RoboSats y a entender cómo funciona.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generar Robot",
"Generate a robot avatar first. Then create your own order.": "Primero genera un robot avatar. Después crea tu propia orden.",
"You do not have a robot avatar": "No tienes un avatar robot",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Escribe o pega el token de tu robot token para reconstruirlo y acceder a tus operaciones.",
"Paste token here": "Pega aquí el token",
"Recover": "Recuperar",
"Robot recovery": "Recupera tu robot",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "¡Guárdalo!",

View File

@ -305,7 +305,6 @@
"Back": "Atzera",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Learn Robosats bisitatu behar duzu. Bertan, Robosats erabiltzen ikasteko eta nola dabilen ulertzeko tutorialak eta dokumentazioa aurkituko dituzu.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Robota sortu",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "Ez daukazu robot avatarrik",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Gorde ezazu!",

View File

@ -305,7 +305,6 @@
"Back": "Retour",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Vous êtes sur le point de visiter Learn RoboSats. Il héberge des tutoriels et de la documentation pour vous aider à apprendre à utiliser RoboSats et à comprendre son fonctionnement.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Générer un robot",
"Generate a robot avatar first. Then create your own order.": "Créez d'abord un avatar de robot. Créez ensuite votre propre commande.",
"You do not have a robot avatar": "Vous n'avez pas d'avatar robot",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Saisissez votre jeton de robot pour reconstruire votre robot et accéder à ses transactions.",
"Paste token here": "Coller le jeton ici",
"Recover": "Récupérer",
"Robot recovery": "Récupération du robot",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Sauvegardez!",

View File

@ -305,7 +305,6 @@
"Back": "Indietro",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Stai per visitare la pagina Learn RoboSats. Troverai tutorial e documentazione per aiutarti ad imparare a usare RoboSats e capire come funziona.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Genera un Robot",
"Generate a robot avatar first. Then create your own order.": "Genera prima un avatar per il tuo robot. Poi crea il tuo ordine.",
"You do not have a robot avatar": "Non hai un avatar per il tuo robot",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Inserisci il token del tuo robot per ricostruirlo ed ottenere l'accesso ai suoi scambi.",
"Paste token here": "Incolla il token qui",
"Recover": "Recupera",
"Robot recovery": "Recupera robot",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Salvalo!",

View File

@ -305,7 +305,6 @@
"Back": "戻る",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "「Learn RoboSats」学習ページにアクセスしようとしています。RoboSatsの使い方を学び、動作原理を理解するためのチュートリアルとドキュメントが提供されています。",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "ロボットを生成する",
"Generate a robot avatar first. Then create your own order.": "最初にロボットアバターを生成してください。次に自分のオーダーを作成してください。",
"You do not have a robot avatar": "ロボットのアバターがありません",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "取引にアクセスするために、ロボットのトークンを入力してロボットを再生成してください。",
"Paste token here": "ここにトークンを貼り付けてください",
"Recover": "復元する",
"Robot recovery": "ロボットの復元",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "バックアップを取ってください!",

View File

@ -305,7 +305,6 @@
"Back": "Z powrotem",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generuj robota",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "You do not have a robot avatar",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Utwórz kopię zapasową!",

View File

@ -305,7 +305,6 @@
"Back": "Voltar",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Você está prestes a visitar o \"Learn RoboSats\"(Aprender sobre o RoboSats). Ele hospeda tutoriais e documentação para ajudá-lo a aprender como usar o RoboSats e entender como funciona.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Gerar robô",
"Generate a robot avatar first. Then create your own order.": "Gerar um avatar de robô primeiro. Em seguida, crie sua própria ordem.",
"You do not have a robot avatar": "Você não tem um avatar de robô",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Entre com seu token de robô para reconstruir seu robô e ganhar acesso às suas negociações.",
"Paste token here": "Cole o token aqui",
"Recover": "Recuperar",
"Robot recovery": "Recuperação de robô",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Apóia-la!",

View File

@ -305,7 +305,6 @@
"Back": "Назад",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Вы собираетесь посетить Learn RoboSats. На нём размещены учебные пособия и документация, которые помогут Вам научиться использовать RoboSats и понять, как он работает.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Создать Робота",
"Generate a robot avatar first. Then create your own order.": "Сначала создайте аватар робота. Затем создайте свой ордер.",
"You do not have a robot avatar": "У Вас нет аватара робота",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Введите токен своего робота, чтобы восстанавить своего робота и получить доступ к его сделкам.",
"Paste token here": "Вставте токен сюда",
"Recover": "Восстановить",
"Robot recovery": "Восстановление робота",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Сохраните его!",

View File

@ -305,7 +305,6 @@
"Back": "Tillbaka",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Du är på på väg att besöka Learn RoboSats. Där finns guider och dokumentation som hjälper dig att använda RoboSats och förstå hur det fungerar.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Generera Robot",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "Du har ingen robotavatar",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Spara den!",

View File

@ -305,7 +305,6 @@
"Back": "Nyuma",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "Unaenda kutembelea Jifunze RoboSats. Ina mafunzo na nyaraka za kukusaidia kujifunza jinsi ya kutumia RoboSats na kuelewa jinsi inavyofanya kazi.",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "Zalisha Roboti",
"Generate a robot avatar first. Then create your own order.": "Zalisha picha ya mwakilishi wa roboti kwanza. Kisha tengeneza amri yako mwenyewe.",
"You do not have a robot avatar": "Huna picha ya mwakilishi wa roboti",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Ingiza alama ya roboti yako ili kuirekebisha roboti yako na kupata ufikiaji wa biashara zake.",
"Paste token here": "Bandika alama hapa",
"Recover": "Rejesha",
"Robot recovery": "Kurejesha roboti",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "Fanya nakala rudufu!",

View File

@ -305,7 +305,6 @@
"Back": "กลับ",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "คุณกำลังเข้าสู่หน้าการเรียนรู้การใช้งาน RoboSats คุณสามารถศึกษาวิธีการใช้งานแพล้ตฟอร์มและทำความเข้าใจการทำงานของแพล้ตฟอร์มได้ที่นี่",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "สร้างโรบอทใหม่",
"Generate a robot avatar first. Then create your own order.": "Generate a robot avatar first. Then create your own order.",
"You do not have a robot avatar": "คุณไม่มีโรบอท",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"Robot recovery": "Robot recovery",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "อย่าลืมบันทึก!",

View File

@ -305,7 +305,6 @@
"Back": "返回",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "你即将访问学习 RoboSats 页面。此页面提供教程和说明书,以帮助你学习如何使用 RoboSats 并了解它的功能。",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "生成机器人",
"Generate a robot avatar first. Then create your own order.": "请先生成一个机器人头像,然后创建你自己的订单。",
"You do not have a robot avatar": "你没有机器人头像",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "输入你的机器人令牌来重造你的机器人并访问它的交易。",
"Paste token here": "在此粘贴令牌",
"Recover": "恢复",
"Robot recovery": "恢复机器人",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "请备份!",

View File

@ -305,7 +305,6 @@
"Back": "返回",
"You are about to visit Learn RoboSats. It hosts tutorials and documentation to help you learn how to use RoboSats and understand how it works.": "你即將訪問學習 RoboSats 頁面。此頁面提供教程和說明書,以幫助你學習如何使用 RoboSats 並了解它的功能。",
"#27": "Phrases in components/Dialogs/NoRobot.tsx",
"Generate Robot": "生成機器人",
"Generate a robot avatar first. Then create your own order.": "請先生成一個機器人頭像,然後創建你自己的訂單。",
"You do not have a robot avatar": "你沒有機器人頭像",
"#28": "Phrases in components/Dialogs/Profile.tsx",
@ -315,7 +314,6 @@
"#29": "Phrases in components/Dialogs/Recovery.tsx",
"Enter your robot token to re-build your robot and gain access to its trades.": "輸入你的機器人領牌來重造你的機器人並訪問它的交易。",
"Paste token here": "在此粘貼領牌",
"Recover": "恢復",
"Robot recovery": "恢復機器人",
"#30": "Phrases in components/Dialogs/StoreToken.tsx",
"Back it up!": "請備份!",