Skip to content

Commit

Permalink
Merge pull request #253 from amitamrutiya2210/xirvik
Browse files Browse the repository at this point in the history
Add changes in login screen url hint textfield
  • Loading branch information
Akshatji800 committed Sep 15, 2023
2 parents 873cda7 + df7ae4c commit 1926381
Show file tree
Hide file tree
Showing 24 changed files with 59 additions and 9 deletions.
23 changes: 20 additions & 3 deletions lib/Pages/login_screen/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class _LoginScreenState extends State<LoginScreen> {
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<FormState>();
late int themeIndex;

Expand Down Expand Up @@ -100,7 +100,7 @@ class _LoginScreenState extends State<LoginScreen> {
labelText: l10n.login_screen_url,
prefixIcon: Icons.link,
themeIndex: themeIndex,
trailingIconButton: Align(
trailingIconButton1: Align(
alignment: Alignment.centerRight,
child: IconButton(
onPressed: () {
Expand All @@ -120,6 +120,23 @@ class _LoginScreenState extends State<LoginScreen> {
),
),
),
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,
Expand All @@ -141,7 +158,7 @@ class _LoginScreenState extends State<LoginScreen> {
prefixIcon: Icons.lock_outline,
themeIndex: themeIndex,
obscureText: showPass,
trailingIconButton: Align(
trailingIconButton1: Align(
alignment: Alignment.centerRight,
child: IconButton(
onPressed: () {
Expand Down
14 changes: 11 additions & 3 deletions lib/Pages/login_screen/widgets/login_screen_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ 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({
required this.controller,
required this.labelText,
required this.prefixIcon,
required this.themeIndex,
this.trailingIconButton,
this.trailingIconButton1,
this.trailingIconButton2,
this.obscureText = false,
Key? key,
}) : super(key: key);
Expand Down Expand Up @@ -73,7 +75,13 @@ class LoginScreenTextField extends StatelessWidget {
),
),
),
trailingIconButton ?? Container()
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
trailingIconButton1 ?? Container(),
trailingIconButton2 ?? Container(),
],
)
],
),
);
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_ar.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "اختيار متعدد",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_cs.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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ů",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_fi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/arb/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

}
1 change: 1 addition & 0 deletions lib/l10n/arb/app_hi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "बहुविकल्पी चयन",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_hu.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "複数選択",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_ko.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "다중 선택",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_nl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_no.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_ro.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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ă",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Множественный выбор",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_sv.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/arb/app_uk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Множинний вибір",
Expand Down
3 changes: 2 additions & 1 deletion lib/l10n/arb/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": "多选",
Expand Down
7 changes: 6 additions & 1 deletion test/widget_test/login_screen_widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1926381

Please sign in to comment.