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: [ actions: [
Padding( InkWell(
padding: const EdgeInsets.only( child: Padding(
right: 4.0, padding: const EdgeInsets.all(4.0),
),
child: InkWell(
child: currentDevice == null 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), : DeviceAvatar(currentDevice, selected: true),
onTap: () {
showDialog(
context: context,
builder: (context) => const MainActionsDialog(),
);
},
), ),
) onTap: () {
showDialog(
context: context,
builder: (context) => const MainActionsDialog(),
);
},
),
], ],
), ),
drawer: const MainPageDrawer(), drawer: const MainPageDrawer(),

View File

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