mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 18:22:39 +03:00
Fix logging levels for Helper.
This commit is contained in:
parent
3e9338395a
commit
579c71d910
@ -36,7 +36,9 @@ class AboutPage extends ConsumerWidget {
|
||||
const LoggingPanel(),
|
||||
if (isDesktop) ...[
|
||||
const Divider(),
|
||||
OutlinedButton(
|
||||
OutlinedButton.icon(
|
||||
icon: const Icon(Icons.healing),
|
||||
label: const Text('Run diagnostics...'),
|
||||
onPressed: () async {
|
||||
_log.info('Running diagnostics...');
|
||||
final response =
|
||||
@ -51,7 +53,6 @@ class AboutPage extends ConsumerWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
child: const Text('Run diagnostics...'),
|
||||
),
|
||||
]
|
||||
],
|
||||
@ -85,8 +86,9 @@ class LoggingPanel extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 8.0),
|
||||
OutlinedButton(
|
||||
child: const Text('Copy log'),
|
||||
OutlinedButton.icon(
|
||||
icon: const Icon(Icons.copy),
|
||||
label: const Text('Copy log'),
|
||||
onPressed: () async {
|
||||
_log.info('Copying log to clipboard ($version)...');
|
||||
final logs = await ref.read(logLevelProvider.notifier).getLogs();
|
||||
|
@ -114,7 +114,18 @@ Future<Widget> initialize(List<String> argv) async {
|
||||
fingerprintProvider.overrideWithProvider(desktopFingerprintProvider),
|
||||
credentialProvider.overrideWithProvider(desktopCredentialProvider),
|
||||
],
|
||||
child: const YubicoAuthenticatorApp(page: MainPage()),
|
||||
child: YubicoAuthenticatorApp(
|
||||
page: Consumer(
|
||||
builder: ((_, ref, child) {
|
||||
// keep RPC log level in sync with app
|
||||
ref.listen<Level>(logLevelProvider, (_, level) {
|
||||
rpc.setLogLevel(level);
|
||||
});
|
||||
|
||||
return const MainPage();
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user