all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [yew-devel] [PATCH yew-comp] token panel: ask for confirmation when removing a token
@ 2025-10-23  8:00 Shannon Sterz
  2025-10-23 13:23 ` Maximiliano Sandoval
  2025-10-23 14:46 ` [yew-devel] Superseded: " Shannon Sterz
  0 siblings, 2 replies; 3+ messages in thread
From: Shannon Sterz @ 2025-10-23  8:00 UTC (permalink / raw)
  To: yew-devel

by using a `ConfirmButton` instead of just a `Button`.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/token_panel.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/token_panel.rs b/src/token_panel.rs
index 55795a6..d61063a 100644
--- a/src/token_panel.rs
+++ b/src/token_panel.rs
@@ -190,7 +190,9 @@ impl LoadableComponent for ProxmoxTokenView {
                     .on_activate(link.change_view_callback(|_| Some(ViewState::EditToken))),
             )
             .with_child(
-                Button::new(tr!("Remove"))
+                ConfirmButton::new(tr!("Remove"))
+                    .confirm_message(tr!("Are you sure you want to remove the API token? \
+                        All current usage sites will lose access!"))
                     .disabled(disabled)
                     .on_activate(link.callback(|_| Msg::Remove)),
             )
-- 
2.47.3



_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yew-devel] [PATCH yew-comp] token panel: ask for confirmation when removing a token
  2025-10-23  8:00 [yew-devel] [PATCH yew-comp] token panel: ask for confirmation when removing a token Shannon Sterz
@ 2025-10-23 13:23 ` Maximiliano Sandoval
  2025-10-23 14:46 ` [yew-devel] Superseded: " Shannon Sterz
  1 sibling, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-10-23 13:23 UTC (permalink / raw)
  To: Shannon Sterz; +Cc: yew-devel

Shannon Sterz <s.sterz@proxmox.com> writes:

> by using a `ConfirmButton` instead of just a `Button`.
>
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  src/token_panel.rs | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/token_panel.rs b/src/token_panel.rs
> index 55795a6..d61063a 100644
> --- a/src/token_panel.rs
> +++ b/src/token_panel.rs
> @@ -190,7 +190,9 @@ impl LoadableComponent for ProxmoxTokenView {
>                      .on_activate(link.change_view_callback(|_| Some(ViewState::EditToken))),
>              )
>              .with_child(
> -                Button::new(tr!("Remove"))
> +                ConfirmButton::new(tr!("Remove"))
> +                    .confirm_message(tr!("Are you sure you want to remove the API token? \
> +                        All current usage sites will lose access!"))

I know this label is used already in other places and this is
pre-existing, but I am not sure if "usage sites" is easy to understand.

Perhaps something along the lines of "All users of the token will lose
access" is more straightforward.

>                      .disabled(disabled)
>                      .on_activate(link.callback(|_| Msg::Remove)),
>              )

-- 
Maximiliano


_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [yew-devel] Superseded: Re: [PATCH yew-comp] token panel: ask for confirmation when removing a token
  2025-10-23  8:00 [yew-devel] [PATCH yew-comp] token panel: ask for confirmation when removing a token Shannon Sterz
  2025-10-23 13:23 ` Maximiliano Sandoval
@ 2025-10-23 14:46 ` Shannon Sterz
  1 sibling, 0 replies; 3+ messages in thread
From: Shannon Sterz @ 2025-10-23 14:46 UTC (permalink / raw)
  To: Shannon Sterz; +Cc: yew-devel

On Thu Oct 23, 2025 at 10:00 AM CEST, Shannon Sterz wrote:
> by using a `ConfirmButton` instead of just a `Button`.
>
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  src/token_panel.rs | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/token_panel.rs b/src/token_panel.rs
> index 55795a6..d61063a 100644
> --- a/src/token_panel.rs
> +++ b/src/token_panel.rs
> @@ -190,7 +190,9 @@ impl LoadableComponent for ProxmoxTokenView {
>                      .on_activate(link.change_view_callback(|_| Some(ViewState::EditToken))),
>              )
>              .with_child(
> -                Button::new(tr!("Remove"))
> +                ConfirmButton::new(tr!("Remove"))
> +                    .confirm_message(tr!("Are you sure you want to remove the API token? \
> +                        All current usage sites will lose access!"))
>                      .disabled(disabled)
>                      .on_activate(link.callback(|_| Msg::Remove)),
>              )

Superseded-by: https://lore.proxmox.com/yew-devel/20251023144425.423545-1-s.sterz@proxmox.com/T/#t


_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-23 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-23  8:00 [yew-devel] [PATCH yew-comp] token panel: ask for confirmation when removing a token Shannon Sterz
2025-10-23 13:23 ` Maximiliano Sandoval
2025-10-23 14:46 ` [yew-devel] Superseded: " Shannon Sterz

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