Change elevated permissions view for FIDO on Windows.

This commit is contained in:
Elias Bonnici 2024-01-29 11:13:05 +01:00
parent e7d9e823a8
commit 1e11690e51
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
7 changed files with 22 additions and 10 deletions

View File

@ -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,

View File

@ -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(

View File

@ -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.",

View File

@ -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.",

View File

@ -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.",

View File

@ -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コードをスキャンするためのカメラ権限が必要です",

View File

@ -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.",