mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 12:22:52 +03:00
Merge PR 1457
This commit is contained in:
commit
e99c2312b2
@ -655,6 +655,7 @@
|
|||||||
"s_no_export": null,
|
"s_no_export": null,
|
||||||
"s_export": null,
|
"s_export": null,
|
||||||
"l_export_configuration_file": null,
|
"l_export_configuration_file": null,
|
||||||
|
"l_exported_can_be_uploaded_at": null,
|
||||||
|
|
||||||
"@_otp_slot_actions": {},
|
"@_otp_slot_actions": {},
|
||||||
"s_delete_slot": null,
|
"s_delete_slot": null,
|
||||||
|
@ -655,6 +655,7 @@
|
|||||||
"s_no_export": "No export",
|
"s_no_export": "No export",
|
||||||
"s_export": "Export",
|
"s_export": "Export",
|
||||||
"l_export_configuration_file": "Export configuration to file",
|
"l_export_configuration_file": "Export configuration to file",
|
||||||
|
"l_exported_can_be_uploaded_at": "Exported credentials can be uploaded at",
|
||||||
|
|
||||||
"@_otp_slot_actions": {},
|
"@_otp_slot_actions": {},
|
||||||
"s_delete_slot": "Delete credential",
|
"s_delete_slot": "Delete credential",
|
||||||
|
@ -655,6 +655,7 @@
|
|||||||
"s_no_export": null,
|
"s_no_export": null,
|
||||||
"s_export": null,
|
"s_export": null,
|
||||||
"l_export_configuration_file": null,
|
"l_export_configuration_file": null,
|
||||||
|
"l_exported_can_be_uploaded_at": null,
|
||||||
|
|
||||||
"@_otp_slot_actions": {},
|
"@_otp_slot_actions": {},
|
||||||
"s_delete_slot": null,
|
"s_delete_slot": null,
|
||||||
|
@ -655,6 +655,7 @@
|
|||||||
"s_no_export": null,
|
"s_no_export": null,
|
||||||
"s_export": null,
|
"s_export": null,
|
||||||
"l_export_configuration_file": null,
|
"l_export_configuration_file": null,
|
||||||
|
"l_exported_can_be_uploaded_at": null,
|
||||||
|
|
||||||
"@_otp_slot_actions": {},
|
"@_otp_slot_actions": {},
|
||||||
"s_delete_slot": null,
|
"s_delete_slot": null,
|
||||||
|
@ -655,6 +655,7 @@
|
|||||||
"s_no_export": "Brak eksportu",
|
"s_no_export": "Brak eksportu",
|
||||||
"s_export": "Eksportuj",
|
"s_export": "Eksportuj",
|
||||||
"l_export_configuration_file": "Eksportuj konfigurację do pliku",
|
"l_export_configuration_file": "Eksportuj konfigurację do pliku",
|
||||||
|
"l_exported_can_be_uploaded_at": null,
|
||||||
|
|
||||||
"@_otp_slot_actions": {},
|
"@_otp_slot_actions": {},
|
||||||
"s_delete_slot": "Usuń poświadczenie",
|
"s_delete_slot": "Usuń poświadczenie",
|
||||||
|
@ -18,11 +18,13 @@ import 'dart:io';
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
import '../../app/logging.dart';
|
import '../../app/logging.dart';
|
||||||
import '../../app/message.dart';
|
import '../../app/message.dart';
|
||||||
@ -365,6 +367,17 @@ class _ConfigureYubiOtpDialogState
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text: l10n.l_exported_can_be_uploaded_at,
|
||||||
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||||
|
children: [
|
||||||
|
const TextSpan(text: ' '),
|
||||||
|
_createUploadOtpLink(context)
|
||||||
|
],
|
||||||
|
),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
.map((e) => Padding(
|
.map((e) => Padding(
|
||||||
@ -376,4 +389,21 @@ class _ConfigureYubiOtpDialogState
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextSpan _createUploadOtpLink(BuildContext context) {
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
final uploadOtpUri = Uri.parse('https://upload.yubico.com');
|
||||||
|
return TextSpan(
|
||||||
|
text: uploadOtpUri.host,
|
||||||
|
style:
|
||||||
|
theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.primary),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () async {
|
||||||
|
await launchUrl(uploadOtpUri, mode: LaunchMode.externalApplication);
|
||||||
|
},
|
||||||
|
children: const [
|
||||||
|
TextSpan(text: ' ') // without this the recognizer takes over whole row
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user