* [pve-devel] [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons
@ 2024-04-17 8:53 Dominik Csapak
2024-04-17 13:44 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2024-04-17 8:53 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-17 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 8:53 [pve-devel] [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons Dominik Csapak
2024-04-17 13:44 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox