Skip to content

Commit

Permalink
feat: text field hints
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Nov 22, 2023
1 parent 8448f08 commit db0f77a
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
6 changes: 4 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rtspPort": "RTSP Port",
"serverName": "Server Name",
"username": "Username",
"usernameHint": "Admin",
"password": "Password",
"savePassword": "Save password",
"showPassword": "Show password",
Expand Down Expand Up @@ -203,8 +204,9 @@
"multipleView": "Multiple view",
"compactView": "Compact view",
"createNewLayout": "Create new layout",
"layoutNameHint": "Layout name",
"layoutTypeHint": "Layout type",
"layoutName": "Layout name",
"layoutNameHint": "First floor",
"layoutTypeLabel": "Layout type",
"@Downloads": {},
"downloads": "Downloads",
"download": "Download",
Expand Down
6 changes: 4 additions & 2 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rtspPort": "RTSP Port",
"serverName": "Server Name",
"username": "Nom d'utilisateur",
"usernameHint": "Admin",
"password": "Mot de passe",
"savePassword": "Sauvegarder mot de passe",
"showPassword": "Afficher mot de passe",
Expand Down Expand Up @@ -193,8 +194,9 @@
"multipleView": "Vue multiple",
"compactView": "Vue compacte",
"createNewLayout": "Créer une nouvelle disposition",
"layoutNameHint": "Nom de la disposition",
"layoutTypeHint": "Type de disposition",
"layoutName": "Nom de la disposition",
"layoutNameHint": "First floor",
"layoutTypeLabel": "Type de disposition",
"@Downloads": {},
"downloads": "Téléchargements",
"download": "Télécharger",
Expand Down
6 changes: 4 additions & 2 deletions lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rtspPort": "RTSP Port",
"serverName": "Server Name",
"username": "Nazwa użytkownika",
"usernameHint": "Admin",
"password": "Hasło",
"savePassword": "Zapisz hasło",
"showPassword": "Show password",
Expand Down Expand Up @@ -203,8 +204,9 @@
"multipleView": "Widok wielokrotny",
"compactView": "Widok kompaktowy",
"createNewLayout": "Utwórz nowy układ",
"layoutNameHint": "Nazwa układu",
"layoutTypeHint": "Typ układu",
"layoutName": "Nazwa układu",
"layoutNameHint": "First floor",
"layoutTypeLabel": "Typ układu",
"@Downloads": {},
"downloads": "Pobrania",
"download": "Pobierz",
Expand Down
6 changes: 4 additions & 2 deletions lib/l10n/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rtspPort": "Porta RTSP",
"serverName": "Nome do servidor",
"username": "Nome de usuário",
"usernameHint": "Admin",
"password": "Senha",
"savePassword": "Salvar senha",
"showPassword": "Mostrar senha",
Expand Down Expand Up @@ -203,8 +204,9 @@
"multipleView": "Múltiplas câmeras",
"compactView": "Visualização compacta",
"createNewLayout": "Criar novo layout",
"layoutNameHint": "Nome do layout",
"layoutTypeHint": "Tipo do layout",
"layoutName": "Nome do layout",
"layoutNameHint": "Primeiro andar",
"layoutTypeLabel": "Tipo do layout",
"@Downloads": {},
"downloads": "Downloads",
"download": "Baixar",
Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/device_grid/desktop/layout_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,11 @@ class _NewLayoutDialogState extends State<NewLayoutDialog> {
controller: controller,
decoration: InputDecoration(
hintText: loc.layoutNameHint,
label: Text(loc.layoutNameHint),
label: Text(loc.layoutName),
),
textInputAction: TextInputAction.none,
),
SubHeader(loc.layoutTypeHint, padding: EdgeInsetsDirectional.zero),
SubHeader(loc.layoutTypeLabel, padding: EdgeInsetsDirectional.zero),
_LayoutTypeChooser(
selected: selected,
onSelect: (index) {
Expand Down Expand Up @@ -588,11 +588,11 @@ class _EditLayoutDialogState extends State<EditLayoutDialog> {
controller: controller,
decoration: InputDecoration(
hintText: loc.layoutNameHint,
label: Text(loc.layoutNameHint),
label: Text(loc.layoutName),
),
textInputAction: TextInputAction.none,
),
SubHeader(loc.layoutTypeHint, padding: EdgeInsetsDirectional.zero),
SubHeader(loc.layoutName, padding: EdgeInsetsDirectional.zero),
_LayoutTypeChooser(
selected: selected,
onSelect: (index) {
Expand Down
1 change: 1 addition & 0 deletions lib/widgets/servers/add_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ class _ConfigureDVRServerScreenState extends State<ConfigureDVRServerScreen> {
textInputAction: TextInputAction.next,
decoration: InputDecoration(
label: Text(loc.username),
hintText: loc.usernameHint,
border: const OutlineInputBorder(),
),
);
Expand Down
5 changes: 5 additions & 0 deletions lib/widgets/servers/edit_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import 'package:bluecherry_client/api/api.dart';
import 'package:bluecherry_client/models/server.dart';
import 'package:bluecherry_client/providers/server_provider.dart';
import 'package:bluecherry_client/utils/constants.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

Expand Down Expand Up @@ -123,6 +124,7 @@ class _EditServerState extends State<EditServer> {
style: theme.textTheme.headlineMedium,
decoration: InputDecoration(
label: Text(loc.hostname),
hintText: loc.serverHostnameExample,
border: const OutlineInputBorder(),
),
),
Expand All @@ -145,6 +147,7 @@ class _EditServerState extends State<EditServer> {
style: theme.textTheme.headlineMedium,
decoration: InputDecoration(
label: Text(loc.port),
hintText: '$kDefaultPort',
border: const OutlineInputBorder(),
),
),
Expand All @@ -167,6 +170,7 @@ class _EditServerState extends State<EditServer> {
style: theme.textTheme.headlineMedium,
decoration: InputDecoration(
label: Text(loc.rtspPort),
hintText: '$kDefaultRTSPPort',
border: const OutlineInputBorder(),
),
),
Expand Down Expand Up @@ -208,6 +212,7 @@ class _EditServerState extends State<EditServer> {
style: theme.textTheme.headlineMedium,
decoration: InputDecoration(
label: Text(loc.username),
hintText: loc.usernameHint,
border: const OutlineInputBorder(),
),
),
Expand Down

0 comments on commit db0f77a

Please sign in to comment.