From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B53EE9780A for ; Wed, 17 Apr 2024 10:53:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9227BD7D for ; Wed, 17 Apr 2024 10:53:05 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 17 Apr 2024 10:53:04 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D534941C0F for ; Wed, 17 Apr 2024 10:53:03 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Wed, 17 Apr 2024 10:53:02 +0200 Message-Id: <20240417085302.1754758-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.014 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [material.io, proxmox.com] Subject: [pve-devel] [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2024 08:53:35 -0000 move the confirm action to the right as mentioned in the material spec[0] also rewords the buttons to 'cancel' and 'shutdown/reboot' for that to work properly slightly rename the confirm message 0: https://m3.material.io/components/dialogs/guidelines#befd7f4d-1029-4957-b1b5-da13fc0bbf3c Signed-off-by: Dominik Csapak --- replaces v3 of my previous patch since v2 was applied: https://lists.proxmox.com/pipermail/pve-devel/2024-April/063106.html lib/widgets/pve_node_power_settings_widget.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/widgets/pve_node_power_settings_widget.dart b/lib/widgets/pve_node_power_settings_widget.dart index 2e4b9a8..2a0a6b1 100644 --- a/lib/widgets/pve_node_power_settings_widget.dart +++ b/lib/widgets/pve_node_power_settings_widget.dart @@ -31,7 +31,7 @@ class PveNodePowerSettings extends StatelessWidget { ), subtitle: const Text("Reboot Node"), onTap: () => confirmedAction(context, - PveClusterResourceAction.reboot, bloc, "reboot"), + PveClusterResourceAction.reboot, bloc, "Reboot"), ), ListTile( leading: const Icon(Icons.power_settings_new), @@ -41,7 +41,7 @@ class PveNodePowerSettings extends StatelessWidget { ), subtitle: const Text("Shutdown Node"), onTap: () => confirmedAction(context, - PveClusterResourceAction.shutdown, bloc, "shutdown"), + PveClusterResourceAction.shutdown, bloc, "Shutdown"), ), ], ), @@ -66,14 +66,14 @@ class PveNodePowerSettings extends StatelessWidget { ], ), content: Text( - "Are you sure you want to $actionText node '${bloc.nodeID}'?"), + "Are you sure you want to do action '$actionText' on node '${bloc.nodeID}'?"), actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(true), - child: const Text("Yes")), TextButton( onPressed: () => Navigator.of(context).pop(false), - child: const Text("No")) + child: const Text("Cancel")), + TextButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text(actionText)) ], ); }); -- 2.39.2