Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Auto focus++

vishnukvmdad1bca596f92
diff --git a/mobile/apps/locker/lib/ui/pages/account_credentials_page.dart b/mobile/apps/locker/lib/ui/pages/account_credentials_page.dart
index d295bd7026..4aedafdde7 100644
--- a/mobile/apps/locker/lib/ui/pages/account_credentials_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/account_credentials_page.dart
@@ -70,7 +70,10 @@ class _AccountCredentialsPageState
@override
String get pageTitle {
if (isInEditMode) {
- return context.l10n.editSecret;
+ if (widget.existingFile != null || currentData != null) {
+ return context.l10n.editSecret;
+ }
+ return context.l10n.accountCredentials;
}
final controllerName = _nameController.text.trim();
@@ -122,6 +125,7 @@ class _AccountCredentialsPageState
hintText: context.l10n.credentialNameHint,
controller: _nameController,
shouldUseTextInputWidget: false,
+ autofocus: true,
validator: (value) {
if (value == null || value.trim().isEmpty) {
return context.l10n.pleaseEnterAccountName;
diff --git a/mobile/apps/locker/lib/ui/pages/personal_note_page.dart b/mobile/apps/locker/lib/ui/pages/personal_note_page.dart
index fabf74de45..c7c23d25f8 100644
--- a/mobile/apps/locker/lib/ui/pages/personal_note_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/personal_note_page.dart
@@ -154,6 +154,7 @@ class _PersonalNotePageState
},
keyboardType: TextInputType.multiline,
textCapitalization: TextCapitalization.sentences,
+ autofocus: true,
maxLines: null,
minLines: null,
expands: true,
diff --git a/mobile/apps/locker/lib/ui/pages/physical_records_page.dart b/mobile/apps/locker/lib/ui/pages/physical_records_page.dart
index 0ab1af163f..7fccca9939 100644
--- a/mobile/apps/locker/lib/ui/pages/physical_records_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/physical_records_page.dart
@@ -57,7 +57,10 @@ class _PhysicalRecordsPageState
@override
String get pageTitle {
if (isInEditMode) {
- return context.l10n.editLocation;
+ if (widget.existingFile != null || currentData != null) {
+ return context.l10n.editLocation;
+ }
+ return context.l10n.physicalRecords;
}
final controllerName = _nameController.text.trim();
@@ -110,6 +113,7 @@ class _PhysicalRecordsPageState
hintText: context.l10n.recordNameHint,
controller: _nameController,
shouldUseTextInputWidget: false,
+ autofocus: true,
validator: (value) {
if (value == null || value.trim().isEmpty) {
return context.l10n.pleaseEnterRecordName;