mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 18:22:39 +03:00
Misc UI fixes
This commit is contained in:
parent
63bb6292a5
commit
b5b5804f3a
@ -60,9 +60,13 @@ class CredentialDialog extends ConsumerWidget {
|
|||||||
top: 48, bottom: 32, left: 16, right: 16),
|
top: 48, bottom: 32, left: 16, right: 16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
Padding(
|
||||||
padding: EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Icon(Symbols.passkey, size: 72),
|
child: Icon(
|
||||||
|
Symbols.passkey,
|
||||||
|
size: 100,
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
CredentialInfoTable(credential),
|
CredentialInfoTable(credential),
|
||||||
],
|
],
|
||||||
|
@ -81,7 +81,11 @@ class FingerprintDialog extends ConsumerWidget {
|
|||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
const Icon(Symbols.fingerprint, size: 72),
|
Icon(
|
||||||
|
Symbols.fingerprint,
|
||||||
|
size: 100,
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -278,7 +278,8 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
|||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
color: Theme.of(context).hoverColor,
|
color: Theme.of(context).hoverColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 24, horizontal: 16),
|
||||||
// TODO: Reuse from fingerprint_dialog
|
// TODO: Reuse from fingerprint_dialog
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -442,7 +442,8 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
|||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
color: Theme.of(context).hoverColor,
|
color: Theme.of(context).hoverColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 24, horizontal: 16),
|
||||||
child: CredentialInfoTable(credential),
|
child: CredentialInfoTable(credential),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -27,6 +27,7 @@ import '../../app/views/action_list.dart';
|
|||||||
import '../../app/views/fs_dialog.dart';
|
import '../../app/views/fs_dialog.dart';
|
||||||
import '../../core/models.dart';
|
import '../../core/models.dart';
|
||||||
import '../../core/state.dart';
|
import '../../core/state.dart';
|
||||||
|
import '../../widgets/tooltip_if_truncated.dart';
|
||||||
import '../features.dart' as features;
|
import '../features.dart' as features;
|
||||||
import '../models.dart';
|
import '../models.dart';
|
||||||
import '../state.dart';
|
import '../state.dart';
|
||||||
@ -132,26 +133,25 @@ class AccountDialog extends ConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
TooltipIfTruncated(
|
||||||
helper.title,
|
text: helper.title,
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
style: TextStyle(
|
||||||
softWrap: true,
|
fontSize: Theme.of(context)
|
||||||
textAlign: TextAlign.center,
|
.textTheme
|
||||||
|
.headlineSmall
|
||||||
|
?.fontSize),
|
||||||
),
|
),
|
||||||
if (subtitle != null)
|
if (subtitle != null)
|
||||||
Text(
|
TooltipIfTruncated(
|
||||||
subtitle,
|
text: subtitle,
|
||||||
softWrap: true,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
// This is what ListTile uses for subtitle
|
// This is what ListTile uses for subtitle
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodyMedium!
|
.bodyMedium!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.textTheme
|
.colorScheme
|
||||||
.bodySmall!
|
.onSurfaceVariant,
|
||||||
.color,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -40,6 +40,7 @@ import '../../widgets/app_input_decoration.dart';
|
|||||||
import '../../widgets/app_text_form_field.dart';
|
import '../../widgets/app_text_form_field.dart';
|
||||||
import '../../widgets/file_drop_overlay.dart';
|
import '../../widgets/file_drop_overlay.dart';
|
||||||
import '../../widgets/list_title.dart';
|
import '../../widgets/list_title.dart';
|
||||||
|
import '../../widgets/tooltip_if_truncated.dart';
|
||||||
import '../features.dart' as features;
|
import '../features.dart' as features;
|
||||||
import '../keys.dart' as keys;
|
import '../keys.dart' as keys;
|
||||||
import '../models.dart';
|
import '../models.dart';
|
||||||
@ -303,13 +304,11 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
|||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
color: Theme.of(context).hoverColor,
|
color: Theme.of(context).hoverColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 24, horizontal: 16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Row(
|
||||||
padding:
|
|
||||||
const EdgeInsets.symmetric(vertical: 16),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -325,28 +324,26 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 16),
|
||||||
Text(
|
TooltipIfTruncated(
|
||||||
helper.title,
|
text: helper.title,
|
||||||
style:
|
style: TextStyle(
|
||||||
Theme.of(context).textTheme.headlineSmall,
|
fontSize: Theme.of(context)
|
||||||
softWrap: true,
|
.textTheme
|
||||||
textAlign: TextAlign.center,
|
.headlineSmall
|
||||||
|
?.fontSize),
|
||||||
),
|
),
|
||||||
if (subtitle != null)
|
if (subtitle != null)
|
||||||
Text(
|
TooltipIfTruncated(
|
||||||
subtitle,
|
text: subtitle,
|
||||||
softWrap: true,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
// This is what ListTile uses for subtitle
|
// This is what ListTile uses for subtitle
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodyMedium!
|
.bodyMedium!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.textTheme
|
.colorScheme
|
||||||
.bodySmall!
|
.onSurfaceVariant,
|
||||||
.color,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -109,7 +109,8 @@ class _OtpScreenState extends ConsumerState<OtpScreen> {
|
|||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
color: Theme.of(context).hoverColor,
|
color: Theme.of(context).hoverColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 24, horizontal: 16.0),
|
||||||
// TODO: Reuse from fingerprint_dialog
|
// TODO: Reuse from fingerprint_dialog
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -128,9 +129,19 @@ class _OtpScreenState extends ConsumerState<OtpScreen> {
|
|||||||
size: 100.0,
|
size: 100.0,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(selected.isConfigured
|
Text(
|
||||||
|
selected.isConfigured
|
||||||
? l10n.l_otp_slot_configured
|
? l10n.l_otp_slot_configured
|
||||||
: l10n.l_otp_slot_empty)
|
: l10n.l_otp_slot_empty,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyMedium!
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -63,7 +63,7 @@ class SlotDialog extends ConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 48, bottom: 16),
|
padding: const EdgeInsets.only(top: 48, bottom: 32),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -73,14 +73,24 @@ class SlotDialog extends ConsumerWidget {
|
|||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
const Icon(
|
Icon(
|
||||||
Symbols.touch_app,
|
Symbols.touch_app,
|
||||||
size: 100.0,
|
size: 100.0,
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(otpSlot.isConfigured
|
Text(
|
||||||
|
otpSlot.isConfigured
|
||||||
? l10n.l_otp_slot_configured
|
? l10n.l_otp_slot_configured
|
||||||
: l10n.l_otp_slot_empty)
|
: l10n.l_otp_slot_empty,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyMedium
|
||||||
|
?.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurfaceVariant),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -131,7 +131,8 @@ class _PivScreenState extends ConsumerState<PivScreen> {
|
|||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
color: Theme.of(context).hoverColor,
|
color: Theme.of(context).hoverColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16, vertical: 24),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -149,7 +150,8 @@ class _PivScreenState extends ConsumerState<PivScreen> {
|
|||||||
alwaysIncludePrivate:
|
alwaysIncludePrivate:
|
||||||
pivState.supportsMetadata,
|
pivState.supportsMetadata,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
if (selected.certInfo == null)
|
||||||
|
const SizedBox(height: 16)
|
||||||
],
|
],
|
||||||
if (selected.certInfo == null)
|
if (selected.certInfo == null)
|
||||||
Text(
|
Text(
|
||||||
|
@ -71,40 +71,38 @@ class SlotDialog extends ConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 48, bottom: 16),
|
padding: const EdgeInsets.only(top: 48, bottom: 32),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: Text(
|
||||||
pivSlot.getDisplayName(l10n),
|
pivSlot.getDisplayName(l10n),
|
||||||
style: textTheme.headlineSmall,
|
style: textTheme.headlineSmall,
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16.0),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if (certInfo != null || metadata != null) ...[
|
if (certInfo != null || metadata != null) ...[
|
||||||
Padding(
|
CertInfoTable(
|
||||||
padding: const EdgeInsets.only(bottom: 16),
|
|
||||||
child: CertInfoTable(
|
|
||||||
certInfo,
|
certInfo,
|
||||||
metadata,
|
metadata,
|
||||||
alwaysIncludePrivate:
|
alwaysIncludePrivate: pivState.supportsMetadata,
|
||||||
pivState.supportsMetadata,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
if (certInfo == null) const SizedBox(height: 16),
|
||||||
],
|
],
|
||||||
if (certInfo == null) ...[
|
if (certInfo == null) ...[
|
||||||
Padding(
|
Text(
|
||||||
padding: const EdgeInsets.only(bottom: 16),
|
|
||||||
child: Text(
|
|
||||||
l10n.l_no_certificate,
|
l10n.l_no_certificate,
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: subtitleStyle,
|
style: subtitleStyle,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -112,7 +110,6 @@ class SlotDialog extends ConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
|
||||||
ActionListSection.fromMenuActions(
|
ActionListSection.fromMenuActions(
|
||||||
context,
|
context,
|
||||||
l10n.s_actions,
|
l10n.s_actions,
|
||||||
|
Loading…
Reference in New Issue
Block a user