More visual tweaks.

This commit is contained in:
Dain Nilsson 2021-12-07 14:22:28 +01:00
parent da14b36364
commit ffc7f5d4c2
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
2 changed files with 27 additions and 16 deletions

View File

@ -56,22 +56,26 @@ class MainPage extends ConsumerWidget {
},
),
actions: [
Padding(
padding: const EdgeInsets.only(
right: 4.0,
),
child: InkWell(
InkWell(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: currentDevice == null
? const Icon(Icons.info, size: 44)
? SizedBox.square(
dimension: 44,
child: Icon(
Icons.usb_off,
color: Theme.of(context).colorScheme.background,
),
)
: DeviceAvatar(currentDevice, selected: true),
onTap: () {
showDialog(
context: context,
builder: (context) => const MainActionsDialog(),
);
},
),
)
onTap: () {
showDialog(
context: context,
builder: (context) => const MainActionsDialog(),
);
},
),
],
),
drawer: const MainPageDrawer(),

View File

@ -14,11 +14,17 @@ class OathScreen extends ConsumerWidget {
final state = ref.watch(oathStateProvider(device.path));
if (state == null) {
return const CircularProgressIndicator();
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Center(child: CircularProgressIndicator()),
],
);
}
if (state.locked) {
return Center(
return Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -37,8 +43,9 @@ class OathScreen extends ConsumerWidget {
final accounts = ref.watch(credentialListProvider(device.path));
if (accounts == null) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text('Reading...'),
Center(child: CircularProgressIndicator()),
],
);
}