Fix. Connection, 2FA dialog, esc & enter (#6946)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-01-21 21:44:10 -08:00 committed by GitHub
parent 2576b46f34
commit b1a946ec20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 4 additions and 45 deletions

View File

@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -429,7 +428,6 @@ class Dialog2FaField extends ValidationField {
this.autoFocus = true,
this.reRequestFocus = false,
this.title,
this.helperText,
this.hintText,
this.errorText,
this.readyCallback,
@ -440,7 +438,6 @@ class Dialog2FaField extends ValidationField {
final bool autoFocus;
final bool reRequestFocus;
final String? title;
final String? helperText;
final String? hintText;
final String? errorText;
final VoidCallback? readyCallback;
@ -457,7 +454,6 @@ class Dialog2FaField extends ValidationField {
reRequestFocus: reRequestFocus,
hintText: hintText,
readyCallback: readyCallback,
helperText: helperText ?? translate('2fa_tip'),
onChanged: _onChanged,
keyboardType: TextInputType.number,
inputFormatters: [
@ -1860,6 +1856,8 @@ void enter2FaDialog(
'OK',
onPressed: submitReady.isTrue ? submit : null,
)),
]);
],
onSubmit: submit,
onCancel: cancel);
});
}

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "交换Control键和Command键"),
("swap-left-right-mouse", "交换鼠标左右键"),
("2FA code", "双重认证代码"),
("2fa_tip", "请输入授权 app 中的双重认证代码"),
("More", "更多"),
("enable-2fa-title", "启用双重认证"),
("enable-2fa-desc", "现在请设置身份验证器。您可以在手机或台式电脑上使用 Authy、Microsoft 或 Google Authenticator 等验证器。用验证器扫描二维码,然后输入显示的验证码以启用双重认证。"),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Prohození klávesy control-command"),
("swap-left-right-mouse", "Prohodit levé a pravé tlačítko myši"),
("2FA code", "2FA kód"),
("2fa_tip", "Zadejte svůj kód 2FA do ověřovací aplikace."),
("More", "Více"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Steuerungs- und Befehlstasten tauschen"),
("swap-left-right-mouse", "Linke und rechte Maustaste tauschen"),
("2FA code", "2FA-Code"),
("2fa_tip", "Bitte geben Sie Ihren 2FA-Code in der Authentifizierungs-App ein."),
("More", "Mehr"),
("enable-2fa-title", "Zwei-Faktor-Authentifizierung aktivieren"),
("enable-2fa-desc", "Bitte richten Sie jetzt Ihren Authentifikator ein. Sie können eine Authentifizierungs-App wie Authy, Microsoft oder Google Authenticator auf Ihrem Telefon oder Desktop verwenden.\n\nScannen Sie den QR-Code mit Ihrer App und geben Sie den Code ein, den Ihre App anzeigt, um die Zwei-Faktor-Authentifizierung zu aktivieren."),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Εναλλαγή κουμπιών control-command"),
("swap-left-right-mouse", "Εναλλαγή αριστερό-δεξί κουμπί του ποντικιού"),
("2FA code", "κωδικός 2FA"),
("2fa_tip", "Παρακαλώ εισάγεται τον κωδικό 2FA στην εφαρμογή πιστοποίησης"),
("More", "Περισσότερα"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -211,7 +211,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("capture_display_elevated_connections_tip", "Capturing multiple displays is not supported in the elevated user mode. Please try again after installation if you want to control multiple displays."),
("swap-left-right-mouse", "Swap left-right mouse button"),
("2FA code", "2FA code"),
("2fa_tip", "Please enter your 2FA code in the authentication app."),
("enable-2fa-title", "Enable two-factor authentication"),
("enable-2fa-desc", "Please set up your authenticator now. You can use an authenticator app such as Authy, Microsoft or Google Authenticator on your phone or desktop.\n\nScan the QR code with your app and enter the code that your app shows to enable two-factor authentication."),
("wrong-2fa-code", "Can't verify the code. Check that code and local time settings are correct"),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Intercambiar teclas control-comando"),
("swap-left-right-mouse", "Intercambiar botones derecho-izquierdo del ratón"),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", "Vaheta vasak ja parem hiirenupp"),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "گرفتن چندین نمایشگر در حالت کاربر زیاد پشتیبانی نمی شود. اگر می‌خواهید چند نمایشگر را کنترل کنید، لطفاً پس از نصب دوباره امتحان کنید."),
("swap-left-right-mouse", "دکمه چپ و راست ماوس را عوض کنید"),
("2FA code", "کد ورود 2 مرحله ای"),
("2fa_tip", "لطفا کد ورود 2 مرحله ای خود را در برنامه احراز هویت وارد کنید"),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Échanger la touche de controle-commande"),
("swap-left-right-mouse", "Intervertir le bouton gauche et droit de la souris"),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Scambia tasto controllo-comando"),
("swap-left-right-mouse", "Scambia pulsante sinistro-destro mouse"),
("2FA code", "Codice 2FA"),
("2fa_tip", "Inserisci il codice 2FA nell'app di autenticazione."),
("More", "Altro"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Apmainīt vadības un komandas taustiņu"),
("swap-left-right-mouse", "Apmainīt kreiso un labo peles pogu"),
("2FA code", "2FA kods"),
("2fa_tip", "Lūdzu, ievadiet savu 2FA kodu autentifikācijas lietotnē."),
("More", "Vairāk"),
("enable-2fa-title", "Iespējot divu faktoru autentifikāciju"),
("enable-2fa-desc", "Lūdzu, iestatiet savu autentifikatoru tūlīt. Tālrunī vai darbvirsmā varat izmantot autentifikācijas lietotni, piemēram, Authy, Microsoft vai Google Authenticator.\n\nIzmantojot lietotni, skenējiet QR kodu un ievadiet lietotnē parādīto kodu, lai iespējotu divu faktoru autentifikāciju."),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Wissel controle-commando toets"),
("swap-left-right-mouse", "wissel-links-rechts-muis"),
("2FA code", "2FA-code"),
("2fa_tip", "Geef je 2FA-code op in de verificatie-app."),
("More", "Meer"),
("enable-2fa-title", "activeer-2fa-titel"),
("enable-2fa-desc", "activeer-2fa-desc"),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Zamiana przycisków sterujących myszki"),
("swap-left-right-mouse", "Zamień przyciski myszki (lewy - prawy)"),
("2FA code", "Kod 2FA"),
("2fa_tip", "Proszę wprowadzić swój kod 2FA w aplikacji do autoryzacji."),
("More", "Więcej"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Поменять кнопки управления и команд"),
("swap-left-right-mouse", "Поменять левую и правую кнопки мыши"),
("2FA code", "Код 2FA"),
("2fa_tip", "Введите код двухфакторной аутентификации из приложения для аутентификации."),
("More", "Ещё"),
("enable-2fa-title", "Использовать двухфакторную аутентификацию"),
("enable-2fa-desc", "Настройте приложение аутентификации. Используйте, например, Authy, Microsoft или Google Authenticator, на телефоне или компьютере.\n\nОтсканируйте QR-код с помощью приложения аутентификации и введите код, который отобразит это приложение, чтобы включить двухфакторную аутентификацию."),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Vymeniť kláves ovládania a príkazu"),
("swap-left-right-mouse", "Prehodiť ľavé a pravé tlačidlo myši"),
("2FA code", "2FA kód"),
("2fa_tip", "Zadajte svoj kód 2FA do aplikácie na overovanie."),
("More", "Viac"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", "Поміняти місцями клавіші Control та Command"),
("swap-left-right-mouse", "Поміняти місцями ліву та праву кнопки миші"),
("2FA code", "Код двофакторної автентифікації"),
("2fa_tip", "Будь ласка, введіть код двофакторної автентифікації в застосунку для автентифікації."),
("More", "Більше"),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -579,7 +579,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Swap control-command key", ""),
("swap-left-right-mouse", ""),
("2FA code", ""),
("2fa_tip", ""),
("More", ""),
("enable-2fa-title", ""),
("enable-2fa-desc", ""),

View File

@ -1249,7 +1249,7 @@ function on_2fa_check(last_msg) {
msgbox("custom-2fa-verification-code", translate('Verification code'), <div .form .set-password>
{ isEmailCheck && <div><span>{translate('Email')}:</span><span>{emailHint}</span></div> }
<div><span>{translate(isEmailCheck ? 'Verification code' : '2FA code')}:</span><input|text name="verification_code" .outline-focus /></div>
<div style="font-size:0.9em; margin-bottom:1em;">{translate(isEmailCheck ? 'verification_tip' : '2fa_tip')}</div>
{ isEmailCheck && <div style="font-size:0.9em; margin-bottom:1em;">{translate('verification_tip')}</div> }
</div>, "",
function(res=null, show_progress) {
if (!res) return;