Skip to content

Commit

Permalink
Update import file dialog UI
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Jan 22, 2025
1 parent 8317a7f commit 671d6d7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
"to_slot": {}
}
},
"p_password_protected_file": "The selected file is password protected. Enter the password to proceed.",
"p_password_protected_file": "The selected file is password protected.",
"p_import_items_desc": "The following item(s) will be imported into PIV slot {slot}.",
"@p_import_items_desc": {
"placeholders": {
Expand Down
45 changes: 31 additions & 14 deletions lib/piv/views/import_file_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class _ImportFileDialogState extends ConsumerState<ImportFileDialog> {
labelText: l10n.s_password,
errorText: _passwordIsWrong ? l10n.s_wrong_password : null,
errorMaxLines: 3,
prefixIcon: const Icon(Symbols.password),
icon: const Icon(Symbols.password),
suffixIcon: IconButton(
icon: Icon(_isObscure
? Symbols.visibility
Expand Down Expand Up @@ -264,11 +264,16 @@ class _ImportFileDialogState extends ConsumerState<ImportFileDialog> {
),
],
if (keyType != null) ...[
Text(
l10n.s_private_key,
style: textTheme.bodyLarge,
softWrap: true,
textAlign: TextAlign.center,
Row(
children: [
const Icon(Symbols.key),
const SizedBox(width: 8),
Text(
l10n.s_private_key,
style: textTheme.bodyLarge,
softWrap: true,
),
],
),
Row(
mainAxisSize: MainAxisSize.min,
Expand All @@ -294,11 +299,17 @@ class _ImportFileDialogState extends ConsumerState<ImportFileDialog> {
),
],
if (certInfo != null) ...[
Text(
l10n.s_certificate,
style: textTheme.bodyLarge,
softWrap: true,
textAlign: TextAlign.center,
Row(
children: [
const Icon(Symbols.id_card),
const SizedBox(width: 8.0),
Text(
l10n.s_certificate,
style: textTheme.bodyLarge,
softWrap: true,
textAlign: TextAlign.center,
),
],
),
SizedBox(
height:
Expand All @@ -307,9 +318,15 @@ class _ImportFileDialogState extends ConsumerState<ImportFileDialog> {
),
],
if (keyType != null && !unsupportedKey && widget.showMatch) ...[
Text(
l10n.s_options,
style: textTheme.bodyLarge,
Row(
children: [
const Icon(Symbols.tune),
const SizedBox(width: 8.0),
Text(
l10n.s_options,
style: textTheme.bodyLarge,
),
],
),
Text(l10n.p_key_options_bio_desc),
FilterChip(
Expand Down

0 comments on commit 671d6d7

Please sign in to comment.