public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-comp 2/3] login panel: improve message on login error
Date: Wed,  8 Jan 2025 14:23:06 +0100	[thread overview]
Message-ID: <20250108132307.2195787-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250108132307.2195787-1-d.csapak@proxmox.com>

similar to PVE's error, but with the raw HTTP error included.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/login_panel.rs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/login_panel.rs b/src/login_panel.rs
index 7aaee9f..c73e859 100644
--- a/src/login_panel.rs
+++ b/src/login_panel.rs
@@ -331,11 +331,10 @@ impl Component for ProxmoxLoginPanel {
             .class("pwt-flex-fill pwt-overflow-auto")
             .with_child(input_panel)
             .with_optional_child(tfa_dialog)
-            .with_optional_child(
-                self.login_error
-                    .as_ref()
-                    .map(|msg| pwt::widget::error_message(msg).padding(2)),
-            )
+            .with_optional_child(self.login_error.as_ref().map(|msg| {
+                pwt::widget::error_message(&tr!("Login failed. Please try again ({0})", msg))
+                    .padding(2)
+            }))
             .with_flex_spacer()
             .with_child(toolbar);
 
-- 
2.39.5



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


  reply	other threads:[~2025-01-08 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 13:23 [yew-devel] [PATCH yew-comp 1/3] http client: include canonical http error with status code Dominik Csapak
2025-01-08 13:23 ` Dominik Csapak [this message]
2025-01-08 13:23 ` [yew-devel] [PATCH yew-comp 3/3] login panel: improve layout Dominik Csapak
2025-01-08 13:36 ` [yew-devel] applied: [PATCH yew-comp 1/3] http client: include canonical http error with status code Dietmar Maurer

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=20250108132307.2195787-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal