mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
Change elevated permissions view for FIDO on Windows.
This commit is contained in:
parent
e7d9e823a8
commit
1e11690e51
@ -22,6 +22,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../desktop/models.dart';
|
||||
import '../../desktop/state.dart';
|
||||
import '../../management/models.dart';
|
||||
import '../message.dart';
|
||||
import '../state.dart';
|
||||
import 'message_page.dart';
|
||||
@ -39,6 +40,9 @@ class AppFailurePage extends ConsumerWidget {
|
||||
Icon(Icons.error, size: 96, color: Theme.of(context).colorScheme.error);
|
||||
String? header = l10n.l_error_occurred;
|
||||
String? message = reason.toString();
|
||||
String? title;
|
||||
bool centered = true;
|
||||
List<Capability>? capabilities;
|
||||
List<Widget> actions = [];
|
||||
|
||||
if (reason is RpcError) {
|
||||
@ -57,10 +61,13 @@ class AppFailurePage extends ConsumerWidget {
|
||||
case 'fido':
|
||||
if (Platform.isWindows &&
|
||||
!ref.watch(rpcStateProvider.select((state) => state.isAdmin))) {
|
||||
graphic = Icon(Icons.stop,
|
||||
size: 96, color: Theme.of(context).colorScheme.primary);
|
||||
header = null;
|
||||
final currentApp = ref.read(currentAppProvider);
|
||||
title = currentApp.getDisplayName(l10n);
|
||||
capabilities = currentApp.getCapabilities();
|
||||
header = l10n.s_admin_privileges_required;
|
||||
message = l10n.p_webauthn_elevated_permissions_required;
|
||||
centered = false;
|
||||
graphic = null;
|
||||
actions = [
|
||||
FilledButton.icon(
|
||||
label: Text(l10n.s_unlock),
|
||||
@ -98,7 +105,9 @@ class AppFailurePage extends ConsumerWidget {
|
||||
}
|
||||
|
||||
return MessagePage(
|
||||
centered: true,
|
||||
centered: centered,
|
||||
title: title,
|
||||
capabilities: capabilities,
|
||||
graphic: graphic,
|
||||
header: header,
|
||||
message: message,
|
||||
|
@ -37,13 +37,11 @@ class DeviceErrorScreen extends ConsumerWidget {
|
||||
if (pid.usbInterfaces == UsbInterface.fido.value) {
|
||||
if (Platform.isWindows &&
|
||||
!ref.watch(rpcStateProvider.select((state) => state.isAdmin))) {
|
||||
final currentApp = ref.read(currentAppProvider);
|
||||
return MessagePage(
|
||||
centered: true,
|
||||
graphic: Icon(
|
||||
Icons.do_not_disturb_on_outlined,
|
||||
size: 96,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
title: currentApp.getDisplayName(l10n),
|
||||
capabilities: currentApp.getCapabilities(),
|
||||
header: l10n.s_admin_privileges_required,
|
||||
message: l10n.p_elevated_permissions_required,
|
||||
actionsBuilder: (context, expanded) => [
|
||||
FilledButton.icon(
|
||||
|
@ -616,6 +616,7 @@
|
||||
"s_permission_denied": "Zugriff verweigert",
|
||||
"l_elevating_permissions": "Erhöhe Berechtigungen\u2026",
|
||||
"s_review_permissions": "Berechtigungen überprüfen",
|
||||
"s_admin_privileges_required": null,
|
||||
"p_elevated_permissions_required": "Die Verwaltung dieses Geräts benötigt erhöhte Berechtigungen.",
|
||||
"p_webauthn_elevated_permissions_required": "WebAuthn-Verwaltung benötigt erhöhte Berechtigungen.",
|
||||
"p_need_camera_permission": "Yubico Authenticator benötigt Zugriff auf die Kamera um QR-Codes aufnehmen zu können.",
|
||||
|
@ -616,6 +616,7 @@
|
||||
"s_permission_denied": "Permission denied",
|
||||
"l_elevating_permissions": "Elevating permissions\u2026",
|
||||
"s_review_permissions": "Review permissions",
|
||||
"s_admin_privileges_required": "Admin privileges required",
|
||||
"p_elevated_permissions_required": "Managing this device requires elevated privileges.",
|
||||
"p_webauthn_elevated_permissions_required": "WebAuthn management requires elevated privileges.",
|
||||
"p_need_camera_permission": "Yubico Authenticator needs Camera permissions for scanning QR codes.",
|
||||
|
@ -616,6 +616,7 @@
|
||||
"s_permission_denied": "Permission refusée",
|
||||
"l_elevating_permissions": "Élevation des permissions\u2026",
|
||||
"s_review_permissions": "Révision des permissions",
|
||||
"s_admin_privileges_required": null,
|
||||
"p_elevated_permissions_required": "Gérer cet appareil demande des privilèges plus élevés.",
|
||||
"p_webauthn_elevated_permissions_required": "La gestion WebAuthn demande des privilèges plus élevés.",
|
||||
"p_need_camera_permission": "Yubico Authenticator a besoin des permission d'utiliser la caméra pour scanner les QR code.",
|
||||
|
@ -616,6 +616,7 @@
|
||||
"s_permission_denied": "権限がありません",
|
||||
"l_elevating_permissions": "権限の昇格\u2026",
|
||||
"s_review_permissions": "権限の確認",
|
||||
"s_admin_privileges_required": null,
|
||||
"p_elevated_permissions_required": "このデバイスを管理するには権限の昇格が必要です",
|
||||
"p_webauthn_elevated_permissions_required": "WebAuthn管理には権限の昇格が必要です",
|
||||
"p_need_camera_permission": "Yubico AuthenticatorにはQRコードをスキャンするためのカメラ権限が必要です",
|
||||
|
@ -616,6 +616,7 @@
|
||||
"s_permission_denied": "Odmowa dostępu",
|
||||
"l_elevating_permissions": "Podnoszenie uprawnień\u2026",
|
||||
"s_review_permissions": "Przegląd uprawnień",
|
||||
"s_admin_privileges_required": null,
|
||||
"p_elevated_permissions_required": "Zarządzanie tym urządzeniem wymaga podwyższonych uprawnień.",
|
||||
"p_webauthn_elevated_permissions_required": "Zarządzanie WebAuthn wymaga podwyższonych uprawnień.",
|
||||
"p_need_camera_permission": "Yubico Authenticator wymaga dostępu do aparatu w celu skanowania kodów QR.",
|
||||
|
Loading…
Reference in New Issue
Block a user