diff --git a/lib/about_page.dart b/lib/about_page.dart index d979157b..88ab86ce 100755 --- a/lib/about_page.dart +++ b/lib/about_page.dart @@ -26,7 +26,7 @@ class AboutPage extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // TODO: Store the version number elsewhere - const Text('Yubico Authenticator: 6.0.0-alpha.1'), + const Text('Yubico Authenticator: 6.0.0-alpha.2'), if (isDesktop) Text('ykman version: ${ref.watch(rpcStateProvider).version}'), Text('Dart version: ${Platform.version}'), diff --git a/lib/fido/views/locked_page.dart b/lib/fido/views/locked_page.dart index 796e641f..bce35d5f 100755 --- a/lib/fido/views/locked_page.dart +++ b/lib/fido/views/locked_page.dart @@ -70,7 +70,7 @@ class FidoLockedPage extends ConsumerWidget { }, ), MenuAction( - text: 'Delete all data', + text: 'Reset FIDO', icon: const Icon(Icons.delete_outline), action: (context) { showDialog( diff --git a/lib/fido/views/rename_fingerprint_dialog.dart b/lib/fido/views/rename_fingerprint_dialog.dart index d960843a..acb7db7f 100755 --- a/lib/fido/views/rename_fingerprint_dialog.dart +++ b/lib/fido/views/rename_fingerprint_dialog.dart @@ -29,6 +29,14 @@ class _RenameAccountDialogState extends ConsumerState { _label = widget.fingerprint.name ?? ''; } + _submit() async { + final renamed = await ref + .read(fingerprintProvider(widget.devicePath).notifier) + .renameFingerprint(widget.fingerprint, _label); + Navigator.of(context).pop(renamed); + showMessage(context, 'Fingerprint renamed'); + } + @override Widget build(BuildContext context) { // If current device changes, we need to pop back to the main Page. @@ -36,14 +44,12 @@ class _RenameAccountDialogState extends ConsumerState { Navigator.of(context).pop(); }); - final fingerprint = widget.fingerprint; - return ResponsiveDialog( title: const Text('Rename fingerprint'), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Rename ${fingerprint.label}?'), + Text('Rename ${widget.fingerprint.label}?'), const Text('This will change the label of the fingerprint.'), TextFormField( initialValue: _label, @@ -57,6 +63,11 @@ class _RenameAccountDialogState extends ConsumerState { _label = value.trim(); }); }, + onFieldSubmitted: (_) { + if (_label.isNotEmpty) { + _submit(); + } + }, ), ] .map((e) => Padding( @@ -67,15 +78,7 @@ class _RenameAccountDialogState extends ConsumerState { ), actions: [ TextButton( - onPressed: _label.isNotEmpty - ? () async { - final renamed = await ref - .read(fingerprintProvider(widget.devicePath).notifier) - .renameFingerprint(fingerprint, _label); - Navigator.of(context).pop(renamed); - showMessage(context, 'Fingerprint renamed'); - } - : null, + onPressed: _label.isNotEmpty ? _submit : null, child: const Text('Save'), ), ], diff --git a/lib/oath/views/account_dialog.dart b/lib/oath/views/account_dialog.dart index efcdee38..ec7ad93a 100755 --- a/lib/oath/views/account_dialog.dart +++ b/lib/oath/views/account_dialog.dart @@ -71,10 +71,10 @@ class AccountDialog extends ConsumerWidget with AccountMixin { children: [ Text(subtitle ?? ''), const SizedBox(height: 8.0), - Center(child: buildCodeView(ref, big: true)), + Center(child: FittedBox(child: buildCodeView(ref, big: true))), ], ), - actions: _buildActions(context, ref), + actions: [FittedBox(child: Row(children: _buildActions(context, ref)))], ), ); } diff --git a/lib/oath/views/oath_screen.dart b/lib/oath/views/oath_screen.dart index 39538217..79efe190 100755 --- a/lib/oath/views/oath_screen.dart +++ b/lib/oath/views/oath_screen.dart @@ -142,7 +142,7 @@ class _UnlockedView extends ConsumerWidget { }, ), MenuAction( - text: 'Delete all data', + text: 'Reset OATH', icon: const Icon(Icons.delete_outline), action: (context) { showDialog(