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