From 99d733b52455f98ad06510fdede6acd4b35ec36b Mon Sep 17 00:00:00 2001
From: vjrj <vjrj@comunes.org>
Date: Sun, 5 Mar 2023 15:34:44 +0100
Subject: [PATCH] New messages to terminal card

---
 assets/translations/en.json                          |  5 +++--
 assets/translations/es.json                          |  5 +++--
 .../widgets/second_screen/card_terminal_screen.dart  | 12 +++++++-----
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/assets/translations/en.json b/assets/translations/en.json
index 3f2cad4b..c3c24ea7 100644
--- a/assets/translations/en.json
+++ b/assets/translations/en.json
@@ -20,7 +20,7 @@
   "code_card_title": "Code repository",
   "intro_1_title": "Welcome to our Äž1 wallet!",
   "intro_1_description": "With this wallet, you can easily and securely store, send, and receive Äž1 currency (also known as 'June').",
-  "intro_2_title": "A digital currency created by the people, for the people",
+  "intro_2_title": "A digital free/libre currency created by the people, for the people",
   "intro_2_description": "Äž1 does not depend on any government or corporation and is eco-friendly (as it is low-energy consumption), transparent, and fair to all.",
   "intro_3_title": "Äž1 currency works on the Duniter network",
   "intro_3_description": "Duniter is a decentralized cryptocurrency network that enables people to create their own Äž1 currency.",
@@ -36,7 +36,8 @@
   "offline": "You are Offline!",
   "online-terminal": "Online",
   "offline-terminal": "Offline",
-  "show-qr-to-client": "Show this QR to your client",
+  "show-qr-to-client": "Show your public key to your client",
+  "show-qr-to-client-amount": "Show your QR with this amount",
   "keys-tooltip": "Public and private keys in Äž1 and Duniter are like a lock and key system, where the public key acts as the lock that can be opened by anyone with the corresponding private key, providing a secure way to authenticate and verify transactions",
   "card-validity": "Validity",
   "card-validity-tooltip": "Please note that this wallet is only accessible while using this specific browser and device. If you delete or reset the browser, you will lose access to this wallet and the funds stored in it.",
diff --git a/assets/translations/es.json b/assets/translations/es.json
index 0f1bd817..1ede909f 100644
--- a/assets/translations/es.json
+++ b/assets/translations/es.json
@@ -20,7 +20,7 @@
   "code_card_title": "Repositorio de código",
   "intro_1_title": "¡Bienvenido a nuestro monedero Ğ1!",
   "intro_1_description": "Con este monedero, puede almacenar, enviar y recibir fácil y seguramente la moneda Ğ1 (también conocida como 'Juna').",
-  "intro_2_title": "Una moneda digital creada por la gente, para la gente",
+  "intro_2_title": "Una moneda digital libre creada por la gente, para la gente",
   "intro_2_description": "La moneda Ğ1 no depende de ningún gobierno o corporación, es eco-amigable (debido a su bajo consumo de energía), transparente y justa para tod@s.",
   "intro_3_title": "La moneda Äž1 funciona en la red Duniter",
   "intro_3_description": "Duniter es una red de criptomonedas descentralizada que permite a las personas crear su propia moneda Äž1.",
@@ -36,7 +36,8 @@
   "offline": "¡Está desconectad@!",
   "online-terminal": "En línea",
   "offline-terminal": "Fuera de línea",
-  "show-qr-to-client": "Muestre este código QR a su clientæ",
+  "show-qr-to-client": "Muestre su clave pública a su clientæ",
+  "show-qr-to-client-amount": "Muestre su QR con esa cantidad",
   "keys-tooltip": "Las claves públicas y privadas en Ğ1 y Duniter son como un sistema de cerradura y llave, donde la clave pública actúa como la cerradura que puede ser abierta por cualquiera que tenga la clave privada correspondiente, proporcionando una forma segura de autenticar y verificar transacciones.",
   "card-validity": "Validez",
   "card-validity-tooltip": "Tenga en cuenta que este monedero solo es accesible mientras utiliza este navegador y este dispositivo específico. Si borra o restablece el navegador, perderá el acceso a este monedero y los fondos almacenados en el.",
diff --git a/lib/ui/widgets/second_screen/card_terminal_screen.dart b/lib/ui/widgets/second_screen/card_terminal_screen.dart
index fb909b96..e37742fd 100644
--- a/lib/ui/widgets/second_screen/card_terminal_screen.dart
+++ b/lib/ui/widgets/second_screen/card_terminal_screen.dart
@@ -7,9 +7,9 @@ import '../../../shared_prefs.dart';
 import 'card_terminal_status.dart';
 
 class CardTerminalScreen extends StatelessWidget {
-  const CardTerminalScreen({super.key, required this.text});
+  const CardTerminalScreen({super.key, required this.amount});
 
-  final String text;
+  final String amount;
 
   @override
   Widget build(BuildContext context) {
@@ -56,7 +56,7 @@ class CardTerminalScreen extends StatelessWidget {
                           child: CardTerminalStatus(online: true)),
                       Padding(
                           padding: const EdgeInsets.symmetric(horizontal: 10),
-                          child: Text(text,
+                          child: Text(amount,
                               textAlign: TextAlign.right,
                               style: TextStyle(
                                 fontFamily: 'LCDMono',
@@ -74,7 +74,7 @@ class CardTerminalScreen extends StatelessWidget {
             Expanded(
                 child: Column(children: <Widget>[
               QrImage(
-                data: _getQrUi(SharedPreferencesHelper().getPubKey(), text),
+                data: _getQrUi(SharedPreferencesHelper().getPubKey(), amount),
                 size: 160.0,
               )
             ])),
@@ -106,7 +106,9 @@ class CardTerminalScreen extends StatelessWidget {
                         ),
                         decoration: InputDecoration(
                           border: InputBorder.none,
-                          hintText: tr('show-qr-to-client'),
+                          hintText: amount.isNotEmpty
+                              ? tr('show-qr-to-client-amount')
+                              : tr('show-qr-to-client'),
                           hintStyle: const TextStyle(
                             fontFamily: 'Roboto Mono',
                             color: Colors.grey,
-- 
GitLab