all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons
Date: Wed, 17 Apr 2024 10:53:02 +0200	[thread overview]
Message-ID: <20240417085302.1754758-1-d.csapak@proxmox.com> (raw)

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 <d.csapak@proxmox.com>
---
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





             reply	other threads:[~2024-04-17  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  8:53 Dominik Csapak [this message]
2024-04-17 13:44 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417085302.1754758-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal