diff --git a/lib/Pages/login_screen/login_screen.dart b/lib/Pages/login_screen/login_screen.dart index b1949ee..8ecc71b 100644 --- a/lib/Pages/login_screen/login_screen.dart +++ b/lib/Pages/login_screen/login_screen.dart @@ -31,7 +31,7 @@ class _LoginScreenState extends State { TextEditingController usernameController = new TextEditingController(); TextEditingController passwordController = new TextEditingController(); TextEditingController urlController = - new TextEditingController(text: 'http://localhost:3000'); + new TextEditingController(text: 'https://yourserver.xirvik.com'); final _formKey = GlobalKey(); late int themeIndex; @@ -100,7 +100,7 @@ class _LoginScreenState extends State { labelText: l10n.login_screen_url, prefixIcon: Icons.link, themeIndex: themeIndex, - trailingIconButton: Align( + trailingIconButton1: Align( alignment: Alignment.centerRight, child: IconButton( onPressed: () { @@ -120,6 +120,23 @@ class _LoginScreenState extends State { ), ), ), + trailingIconButton2: Align( + alignment: Alignment.centerRight, + child: Tooltip( + triggerMode: TooltipTriggerMode.tap, + message: + "URL for your Flood instance (local, seedbox...).", + showDuration: Duration(seconds: 3), + child: Icon( + Icons.info_outline, + color: ThemeBloc.theme(themeIndex) + .textTheme + .bodyLarge! + .color!, + size: 20, + ), + ), + ), ), SizedBox( height: hp * 0.01, @@ -141,7 +158,7 @@ class _LoginScreenState extends State { prefixIcon: Icons.lock_outline, themeIndex: themeIndex, obscureText: showPass, - trailingIconButton: Align( + trailingIconButton1: Align( alignment: Alignment.centerRight, child: IconButton( onPressed: () { diff --git a/lib/Pages/login_screen/widgets/login_screen_textfield.dart b/lib/Pages/login_screen/widgets/login_screen_textfield.dart index 9d5e3b1..d6b8e96 100644 --- a/lib/Pages/login_screen/widgets/login_screen_textfield.dart +++ b/lib/Pages/login_screen/widgets/login_screen_textfield.dart @@ -7,7 +7,8 @@ class LoginScreenTextField extends StatelessWidget { final String labelText; final IconData prefixIcon; final bool obscureText; - final Widget? trailingIconButton; + final Widget? trailingIconButton1; + final Widget? trailingIconButton2; final int themeIndex; const LoginScreenTextField({ @@ -15,7 +16,8 @@ class LoginScreenTextField extends StatelessWidget { required this.labelText, required this.prefixIcon, required this.themeIndex, - this.trailingIconButton, + this.trailingIconButton1, + this.trailingIconButton2, this.obscureText = false, Key? key, }) : super(key: key); @@ -73,7 +75,13 @@ class LoginScreenTextField extends StatelessWidget { ), ), ), - trailingIconButton ?? Container() + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + trailingIconButton1 ?? Container(), + trailingIconButton2 ?? Container(), + ], + ) ], ), ); diff --git a/lib/l10n/arb/app_ar.arb b/lib/l10n/arb/app_ar.arb index 2955c29..618217e 100644 --- a/lib/l10n/arb/app_ar.arb +++ b/lib/l10n/arb/app_ar.arb @@ -322,6 +322,7 @@ "notification_downloading": "جاري التنزيل", "notification_error": "خطأ في التنزيل", "notification_finished": "تم التنزيل", + "login_field_tooltip_message": "عنوان URL للمثيل الخاص بك في Flood (محلي، seedbox...)" "tag_selection_heading": "تفضيلات محدد الوسوم", "single_selection_radio_button": "اختيار واحد", "multi_selection_radio_button": "اختيار متعدد", diff --git a/lib/l10n/arb/app_cs.arb b/lib/l10n/arb/app_cs.arb index 00f716a..81ccac7 100644 --- a/lib/l10n/arb/app_cs.arb +++ b/lib/l10n/arb/app_cs.arb @@ -322,6 +322,7 @@ "notification_downloading": "Stahování", "notification_error": "Chyba při stahování", "notification_finished": "Stahování dokončeno", + "login_field_tooltip_message": "URL pro vaši Flood instanci (lokální, seedbox...)" "tag_selection_heading": "Předvolba výběru značek", "single_selection_radio_button": "Jednoduchý výběr", "multi_selection_radio_button": "Více výběrů", diff --git a/lib/l10n/arb/app_de.arb b/lib/l10n/arb/app_de.arb index 9487b93..4724d9a 100644 --- a/lib/l10n/arb/app_de.arb +++ b/lib/l10n/arb/app_de.arb @@ -324,5 +324,6 @@ "sort_by_uploaded": "Hochgeladen", "sort_by_upload_speed": "Upload-Geschwindigkeit", "sort_by_file_size": "Dateigröße", + "login_field_tooltip_message": "URL für Ihre Flood-Instanz (lokal, seedbox...)" "sort_by_percent_completed": "Prozent abgeschlossen","show_progress_bar_option": "Fortschrittsbalken anzeigen" } \ No newline at end of file diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index e15fda3..cd2d1f7 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -336,6 +336,7 @@ "notification_downloading": "Downloading", "notification_error": "Download Error", "notification_finished": "Download Finished", + "login_field_tooltip_message" : "URL for your Flood instance (local, seedbox...)." "tag_selection_heading": "Tag Selector Preference", "single_selection_radio_button":"Single Selection", "multi_selection_radio_button":"Multi Selection", diff --git a/lib/l10n/arb/app_es.arb b/lib/l10n/arb/app_es.arb index 38dbde3..e0fb031 100644 --- a/lib/l10n/arb/app_es.arb +++ b/lib/l10n/arb/app_es.arb @@ -322,6 +322,7 @@ "notification_downloading": "Descargando", "notification_error": "Error de descarga", "notification_finished": "Descarga finalizada", + "login_field_tooltip_message": "URL para su instancia de Flood (local, seedbox...)" "tag_selection_heading": "Preferencia del selector de etiquetas", "single_selection_radio_button": "Selección única", "multi_selection_radio_button": "Selección múltiple", diff --git a/lib/l10n/arb/app_fi.arb b/lib/l10n/arb/app_fi.arb index c3d3fc6..a59c67e 100644 --- a/lib/l10n/arb/app_fi.arb +++ b/lib/l10n/arb/app_fi.arb @@ -322,6 +322,7 @@ "notification_downloading": "Lataaminen", "notification_error": "Latausvirhe", "notification_finished": "Lataus valmis", + "login_field_tooltip_message": "URL Flood-instanssillesi (paikallinen, seedbox...)" "tag_selection_heading": "Tunnistevalitsimen asetukset", "single_selection_radio_button": "Yksittäinen valinta", "multi_selection_radio_button": "Useita valintoja", diff --git a/lib/l10n/arb/app_fr.arb b/lib/l10n/arb/app_fr.arb index e251e75..1b33496 100644 --- a/lib/l10n/arb/app_fr.arb +++ b/lib/l10n/arb/app_fr.arb @@ -323,9 +323,9 @@ "notification_downloading": "Téléchargement", "notification_error": "Erreur de téléchargement", "notification_finished": "Téléchargement terminé", + "login_field_tooltip_message": "URL pour votre instance de Flood (locale, seedbox...)" "tag_selection_heading": "Préférence du sélecteur de balises", "single_selection_radio_button": "Sélection unique", "multi_selection_radio_button": "Sélection multiple", "show_progress_bar_option": "Afficher la barre de progression" - } \ No newline at end of file diff --git a/lib/l10n/arb/app_hi.arb b/lib/l10n/arb/app_hi.arb index ef2de17..9b90d7b 100644 --- a/lib/l10n/arb/app_hi.arb +++ b/lib/l10n/arb/app_hi.arb @@ -322,6 +322,7 @@ "notification_downloading": "डाउनलोड हो रहा है", "notification_error": "डाउनलोड त्रुटि", "notification_finished": "डाउनलोड समाप्त", + "login_field_tooltip_message": "आपके फ्लड इंस्टेंस के लिए URL (स्थानीय, सीडबॉक्स...)" "tag_selection_heading": "टैग सिलेक्शन प्राथमिकता", "single_selection_radio_button": "एकल चयन", "multi_selection_radio_button": "बहुविकल्पी चयन", diff --git a/lib/l10n/arb/app_hu.arb b/lib/l10n/arb/app_hu.arb index 95fd95f..c163ba9 100644 --- a/lib/l10n/arb/app_hu.arb +++ b/lib/l10n/arb/app_hu.arb @@ -322,6 +322,7 @@ "notification_downloading": "Letöltés", "notification_error": "Letöltési hiba", "notification_finished": "Letöltés kész", + "login_field_tooltip_message": "URL a Flood példányához (helyi, seedbox...)" "tag_selection_heading": "Címkeválasztó előnyben részesítése", "single_selection_radio_button": "Egyszeres kiválasztás", "multi_selection_radio_button": "Többszörös kiválasztás", diff --git a/lib/l10n/arb/app_it.arb b/lib/l10n/arb/app_it.arb index 42e4808..bde7e2a 100644 --- a/lib/l10n/arb/app_it.arb +++ b/lib/l10n/arb/app_it.arb @@ -322,6 +322,7 @@ "notification_downloading": "Download", "notification_error": "Errore di download", "notification_finished": "Download completato", + "login_field_tooltip_message": "URL per la tua istanza di Flood (locale, seedbox...)" "tag_selection_heading": "Preferenza del selettore di tag", "single_selection_radio_button": "Selezione singola", "multi_selection_radio_button": "Selezione multipla", diff --git a/lib/l10n/arb/app_ja.arb b/lib/l10n/arb/app_ja.arb index db609ef..9b5e6fc 100644 --- a/lib/l10n/arb/app_ja.arb +++ b/lib/l10n/arb/app_ja.arb @@ -323,6 +323,7 @@ "notification_downloading": "ダウンロード中", "notification_error": "ダウンロードエラー", "notification_finished": "ダウンロード完了", + "login_field_tooltip_message": "Flood インスタンスの URL(ローカル、シードボックス...)" "tag_selection_heading": "タグセレクターの設定", "single_selection_radio_button": "単一選択", "multi_selection_radio_button": "複数選択", diff --git a/lib/l10n/arb/app_ko.arb b/lib/l10n/arb/app_ko.arb index 22126fa..35ce963 100644 --- a/lib/l10n/arb/app_ko.arb +++ b/lib/l10n/arb/app_ko.arb @@ -322,6 +322,7 @@ "notification_downloading": "다운로드 중", "notification_error": "다운로드 오류", "notification_finished": "다운로드 완료", + "login_field_tooltip_message": "귀하의 Flood 인스턴스 URL (로컬, 시드박스...)" "tag_selection_heading": "태그 선택기 기본 설정", "single_selection_radio_button": "단일 선택", "multi_selection_radio_button": "다중 선택", diff --git a/lib/l10n/arb/app_nl.arb b/lib/l10n/arb/app_nl.arb index d2efeea..bbd934b 100644 --- a/lib/l10n/arb/app_nl.arb +++ b/lib/l10n/arb/app_nl.arb @@ -322,6 +322,7 @@ "notification_downloading": "Downloaden", "notification_error": "Downloadfout", "notification_finished": "Download voltooid", + "login_field_tooltip_message": "URL voor uw Flood-instantie (lokaal, seedbox...)" "tag_selection_heading": "Voorkeur voor tagselectie", "single_selection_radio_button": "Enkele selectie", "multi_selection_radio_button": "Meervoudige selectie", diff --git a/lib/l10n/arb/app_no.arb b/lib/l10n/arb/app_no.arb index 972c180..fccf64c 100644 --- a/lib/l10n/arb/app_no.arb +++ b/lib/l10n/arb/app_no.arb @@ -322,6 +322,7 @@ "notification_downloading": "Laster ned", "notification_error": "Nedlastingsfeil", "notification_finished": "Nedlasting fullført", + "login_field_tooltip_message": "URL for din Flood-instans (lokal, seedbox...)" "tag_selection_heading": "Foretrukket tagvelger", "single_selection_radio_button": "Enkeltvalg", "multi_selection_radio_button": "Flervalg", diff --git a/lib/l10n/arb/app_pl.arb b/lib/l10n/arb/app_pl.arb index ea9e153..1f7395d 100644 --- a/lib/l10n/arb/app_pl.arb +++ b/lib/l10n/arb/app_pl.arb @@ -322,6 +322,7 @@ "notification_downloading": "Pobieranie", "notification_error": "Błąd pobierania", "notification_finished": "Pobieranie zakończone", + "login_field_tooltip_message": "URL do twojej instancji Flood (lokalnie, seedbox...)" "tag_selection_heading": "Preferencje wyboru tagów", "single_selection_radio_button": "Pojedynczy wybór", "multi_selection_radio_button": "Wielokrotny wybór", diff --git a/lib/l10n/arb/app_pt.arb b/lib/l10n/arb/app_pt.arb index e8a43bb..8e07e68 100644 --- a/lib/l10n/arb/app_pt.arb +++ b/lib/l10n/arb/app_pt.arb @@ -322,6 +322,7 @@ "notification_downloading": "Download", "notification_error": "Erro de download", "notification_finished": "Download concluído", + "login_field_tooltip_message": "URL para a sua instância do Flood (local, seedbox...)" "tag_selection_heading": "Preferência do seletor de tags", "single_selection_radio_button": "Seleção única", "multi_selection_radio_button": "Seleção múltipla", diff --git a/lib/l10n/arb/app_ro.arb b/lib/l10n/arb/app_ro.arb index 34aecf0..df2a121 100644 --- a/lib/l10n/arb/app_ro.arb +++ b/lib/l10n/arb/app_ro.arb @@ -322,6 +322,7 @@ "notification_downloading": "Descărcare", "notification_error": "Eroare de descărcare", "notification_finished": "Descărcare finalizată", + "login_field_tooltip_message": "URL pentru instanța ta Flood (locală, seedbox...)" "tag_selection_heading": "Preferință pentru selector de etichete", "single_selection_radio_button": "Selecție unică", "multi_selection_radio_button": "Selecție multiplă", diff --git a/lib/l10n/arb/app_ru.arb b/lib/l10n/arb/app_ru.arb index 05feb66..026fa73 100644 --- a/lib/l10n/arb/app_ru.arb +++ b/lib/l10n/arb/app_ru.arb @@ -322,6 +322,7 @@ "sort_by_upload_speed": "Prędkość wysyłania", "sort_by_file_size": "Rozmiar pliku", "sort_by_percent_completed": "Procent ukończony", + "login_field_tooltip_message": "URL для вашего экземпляра Flood (локальный, seedbox...)" "tag_selection_heading": "Предпочтение селектора тегов", "single_selection_radio_button": "Одиночный выбор", "multi_selection_radio_button": "Множественный выбор", diff --git a/lib/l10n/arb/app_sv.arb b/lib/l10n/arb/app_sv.arb index d3d96a4..1218dde 100644 --- a/lib/l10n/arb/app_sv.arb +++ b/lib/l10n/arb/app_sv.arb @@ -323,6 +323,7 @@ "notification_downloading": "Laddar ner", "notification_error": "Nedladdningsfel", "notification_finished": "Nedladdning klar", + "login_field_tooltip_message": "URL för din Flood-instans (lokal, seedbox...)" "tag_selection_heading": "Taggväljarinställning", "single_selection_radio_button": "Enkelval", "multi_selection_radio_button": "Flerval", diff --git a/lib/l10n/arb/app_uk.arb b/lib/l10n/arb/app_uk.arb index 9b75017..82a6a31 100644 --- a/lib/l10n/arb/app_uk.arb +++ b/lib/l10n/arb/app_uk.arb @@ -323,6 +323,7 @@ "notification_downloading": "Завантаження", "notification_error": "Помилка завантаження", "notification_finished": "Завантаження завершено", + "login_field_tooltip_message": "URL для вашого екземпляра Flood (локальний, seedbox...)" "tag_selection_heading": "Пріоритет вибору тегів", "single_selection_radio_button": "Одиночний вибір", "multi_selection_radio_button": "Множинний вибір", diff --git a/lib/l10n/arb/app_zh.arb b/lib/l10n/arb/app_zh.arb index 275c107..c782a2b 100644 --- a/lib/l10n/arb/app_zh.arb +++ b/lib/l10n/arb/app_zh.arb @@ -322,7 +322,8 @@ "notification_stopped": "已停止", "notification_downloading": "下載中", "notification_error": "下載錯誤", - "notification_finished": "下載完成" , + "notification_finished": "下載完成", + "login_field_tooltip_message": "您的 Flood 实例 URL(本地,种子盒...)" "tag_selection_heading": "标签选择器优先级", "single_selection_radio_button": "单选", "multi_selection_radio_button": "多选", diff --git a/test/widget_test/login_screen_widget_test.dart b/test/widget_test/login_screen_widget_test.dart index 3a26fb2..9f12c23 100644 --- a/test/widget_test/login_screen_widget_test.dart +++ b/test/widget_test/login_screen_widget_test.dart @@ -33,11 +33,16 @@ void main() { expect(find.text('Sign in to your account'), findsOneWidget); expect(find.byKey(Key('Url TextField')), findsOneWidget); expect(find.byIcon(Icons.link), findsOneWidget); + expect(find.byIcon(Icons.info_outline), findsOneWidget); + await tester.tap(find.byIcon(Icons.info_outline)); + await tester.pumpAndSettle(); + expect(find.text('URL for your Flood instance (local, seedbox...).'), + findsOneWidget); expect(find.byIcon(Icons.paste), findsOneWidget); final urlControllerFinder = find.byKey(Key('Url TextField')); var urlController = tester.firstWidget(urlControllerFinder) as LoginScreenTextField; - expect(urlController.controller.text, 'http://localhost:3000'); + expect(urlController.controller.text, 'https://yourserver.xirvik.com'); expect(find.byKey(Key('Username TextField')), findsOneWidget); expect(find.byIcon(Icons.person), findsOneWidget); expect(find.text('Username'), findsOneWidget);