all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine
@ 2026-06-02 11:53 Dominik Csapak
  2026-06-02 11:53 ` [PATCH yew-comp 1/3] markdown: correctly set css class Dominik Csapak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:53 UTC (permalink / raw)
  To: pmg-devel

This adds a small about dialog to the mobile quarantine interface, similar to
what the desktop has. This should reduce confusion about what the interface
actually is.

NOTE: it's proably necessary to update the pwt-assets folder in the
pmg-yew-quarantine-gui too when building with a new pwt and yew-comp.

proxmox-yew-comp:

Dominik Csapak (1):
  markdown: correctly set css class

 src/markdown.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


pmg-yew-quarantine-gui:

Dominik Csapak (2):
  spam list page: factor `link` out
  spam list page: add 'about' button to menu

 src/page_spam_list.rs | 78 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 63 insertions(+), 15 deletions(-)


Summary over all repositories:
  2 files changed, 64 insertions(+), 16 deletions(-)

-- 
Generated by murpp 0.11.0




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

* [PATCH yew-comp 1/3] markdown: correctly set css class
  2026-06-02 11:53 [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Dominik Csapak
@ 2026-06-02 11:53 ` Dominik Csapak
  2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 2/3] spam list page: factor `link` out Dominik Csapak
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:53 UTC (permalink / raw)
  To: pmg-devel

To actually set the 'pwt-embedded-html' css class (which contains the
rules for rendering the parsed markdown html), it has to be set *after*
`with_std_props`, otherwise it's overwritten by an empty class list from
the standard props.

This did not surface until yet, because the notes view, which shows
parsed markdown too, does set the class manually.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/markdown.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/markdown.rs b/src/markdown.rs
index be7146e..164a8a0 100644
--- a/src/markdown.rs
+++ b/src/markdown.rs
@@ -216,9 +216,9 @@ impl Component for ProxmoxMarkdown {
     fn view(&self, ctx: &Context<Self>) -> Html {
         let props = ctx.props();
         Container::new()
-            .class("pwt-embedded-html")
             .with_std_props(&props.std_props)
             .listeners(&props.listeners)
+            .class("pwt-embedded-html")
             .with_child(self.html.clone())
             .into()
     }
-- 
2.47.3





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

* [PATCH pmg-yew-quarantine-gui 2/3] spam list page: factor `link` out
  2026-06-02 11:53 [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Dominik Csapak
  2026-06-02 11:53 ` [PATCH yew-comp 1/3] markdown: correctly set css class Dominik Csapak
@ 2026-06-02 11:53 ` Dominik Csapak
  2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 3/3] spam list page: add 'about' button to menu Dominik Csapak
  2026-06-02 20:50 ` applied: [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:53 UTC (permalink / raw)
  To: pmg-devel

no reason to call `ctx.link()` every time, just do that once at the
beginning of the `view` method. Is faster and makes the code a bit
shorter.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/page_spam_list.rs | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/src/page_spam_list.rs b/src/page_spam_list.rs
index 58d2541..5a3dacd 100644
--- a/src/page_spam_list.rs
+++ b/src/page_spam_list.rs
@@ -208,17 +208,18 @@ impl Component for PmgPageSpamList {
     }
 
     fn view(&self, ctx: &Context<Self>) -> Html {
+        let link = ctx.link();
         let content = SpamList::new()
             .starttime((self.start_date / 1000.0) as u64)
             .endtime((self.end_date / 1000.0) as u64)
-            .on_preview(ctx.link().callback(Msg::Preview));
+            .on_preview(link.callback(Msg::Preview));
 
         let dialog = match self.state {
             ViewState::Normal => None,
             ViewState::ShowDialog => Some(
                 Dialog::new(tr!("Select Date"))
                     .with_child(self.date_range_form(ctx))
-                    .on_close(ctx.link().callback(|_| Msg::CloseDialog)),
+                    .on_close(link.callback(|_| Msg::CloseDialog)),
             ),
             ViewState::ShowSubscriptionNotice => Some(
                 Dialog::new(tr!("No valid subscription"))
@@ -230,11 +231,11 @@ impl Component for PmgPageSpamList {
                             .with_child(
                                 Row::new().class(JustifyContent::FlexEnd).with_child(
                                     Button::new(tr!("OK"))
-                                        .on_activate(ctx.link().callback(|_| Msg::CloseDialog)),
+                                        .on_activate(link.callback(|_| Msg::CloseDialog)),
                                 ),
                             ),
                     )
-                    .on_close(ctx.link().callback(|_| Msg::CloseDialog)),
+                    .on_close(link.callback(|_| Msg::CloseDialog)),
             ),
             ViewState::ShowLanguageSelect => Some(
                 Dialog::new(tr!("Select Language"))
@@ -246,11 +247,11 @@ impl Component for PmgPageSpamList {
                             .with_child(tr!("Language"))
                             .with_child(LanguageSelector::new()),
                     )
-                    .on_close(ctx.link().callback(|_| Msg::CloseDialog)),
+                    .on_close(link.callback(|_| Msg::CloseDialog)),
             ),
         };
 
-        let fab = Fab::new("fa fa-calendar").on_activate(ctx.link().callback(|_| Msg::ShowDialog));
+        let fab = Fab::new("fa fa-calendar").on_activate(link.callback(|_| Msg::ShowDialog));
 
         let sub_notice = match self.subscription_result {
             Some(true) | None => None,
@@ -264,7 +265,7 @@ impl Component for PmgPageSpamList {
                         Button::new(tr!("No valid subscription"))
                             .icon_class("fa fa-exclamation-triangle")
                             .class("pwt-button-text")
-                            .on_activate(ctx.link().callback(|_| Msg::ShowSubscriptionNotice)),
+                            .on_activate(link.callback(|_| Msg::ShowSubscriptionNotice)),
                     ),
             ),
         };
@@ -293,25 +294,21 @@ impl Component for PmgPageSpamList {
                                                 MenuItem::new(tr!("Language"))
                                                     .icon_class("fa fa-language")
                                                     .on_select(
-                                                        ctx.link()
-                                                            .callback(|_| Msg::ShowLanguageSelect),
+                                                        link.callback(|_| Msg::ShowLanguageSelect),
                                                     ),
                                             )
                                             .with_item(
                                                 MenuItem::new(tr!("Switch to Desktop View"))
                                                     .icon_class("fa fa-desktop")
                                                     .on_select(
-                                                        ctx.link()
-                                                            .callback(|_| Msg::SwitchToDesktop),
+                                                        link.callback(|_| Msg::SwitchToDesktop),
                                                     ),
                                             )
                                             .with_separator()
                                             .with_item(
                                                 MenuItem::new(tr!("Logout"))
                                                     .icon_class("fa fa-sign-out")
-                                                    .on_select(
-                                                        ctx.link().callback(|_| Msg::Logout),
-                                                    ),
+                                                    .on_select(link.callback(|_| Msg::Logout)),
                                             ),
                                     ),
                             ),
-- 
2.47.3





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

* [PATCH pmg-yew-quarantine-gui 3/3] spam list page: add 'about' button to menu
  2026-06-02 11:53 [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Dominik Csapak
  2026-06-02 11:53 ` [PATCH yew-comp 1/3] markdown: correctly set css class Dominik Csapak
  2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 2/3] spam list page: factor `link` out Dominik Csapak
@ 2026-06-02 11:53 ` Dominik Csapak
  2026-06-02 20:50 ` applied: [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2026-06-02 11:53 UTC (permalink / raw)
  To: pmg-devel

Which shows a text very similar to the about text in the desktop ui. It
is slightly adapted so it fits better for the mobile view (no mention of
allow/blacklist menu, no mention of keyboard shortcuts).

I opted for an additional menu option here, since we don't have the
space for an action icon in the top bar on smaller devices.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/page_spam_list.rs | 53 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/src/page_spam_list.rs b/src/page_spam_list.rs
index 5a3dacd..d24fec7 100644
--- a/src/page_spam_list.rs
+++ b/src/page_spam_list.rs
@@ -18,10 +18,33 @@ use pwt::widget::menu::{Menu, MenuButton, MenuItem};
 use pwt::widget::{Button, Column, Dialog, Image, LanguageSelector, Row, ThemeModeSelector};
 
 use proxmox_subscription::{SubscriptionInfo, SubscriptionStatus};
-use proxmox_yew_comp::http_get;
+use proxmox_yew_comp::{http_get, Markdown};
 
 use crate::{Route, SpamList};
 
+const ABOUT_TEXT: &str =
+    "This is the end-user email quarantine interface provided by your email provider.
+
+Proxmox Mail Gateway is software that scans email for threats such as spam or viruses.
+
+Typically, emails that contain viruses or are identified as specific spam are blocked by your
+provider.
+Emails that are not classified as specific spam can be quarantined for the recipient to decide
+whether to receive or delete them. In most setups, you will receive a spam report email notifying
+you when mail is quarantined for your address.
+
+You also have the option to block or welcomelist certain addresses:
+
+* Welcomelist results in mails from these addresses to be delivered directly
+  instead of being quarantined.
+* Blocklist results in mails from these addresses to be deleted directly
+  instead of being quarantined.
+
+**Note:** The sending of *Spam Report* emails and this web application is controlled by your email
+provider.
+
+Proxmox Server Solutions GmbH develops the software and does not operate email services for users.";
+
 #[derive(Clone, PartialEq, Properties)]
 pub struct PageSpamList {}
 
@@ -43,6 +66,7 @@ pub enum ViewState {
     ShowDialog,
     ShowSubscriptionNotice,
     ShowLanguageSelect,
+    ShowAbout,
 }
 pub struct PmgPageSpamList {
     state: ViewState,
@@ -61,6 +85,7 @@ pub enum Msg {
     SubscriptionResult(Result<SubscriptionInfo, Error>),
     SwitchToDesktop,
     ShowLanguageSelect,
+    ShowAbout,
     Logout,
 }
 
@@ -200,6 +225,10 @@ impl Component for PmgPageSpamList {
                 self.state = ViewState::ShowLanguageSelect;
                 true
             }
+            Msg::ShowAbout => {
+                self.state = ViewState::ShowAbout;
+                true
+            }
             Msg::Logout => {
                 proxmox_yew_comp::http_clear_auth();
                 true
@@ -249,6 +278,23 @@ impl Component for PmgPageSpamList {
                     )
                     .on_close(link.callback(|_| Msg::CloseDialog)),
             ),
+            ViewState::ShowAbout => Some(
+                Dialog::new(tr!("About"))
+                    .with_child(
+                        Column::new()
+                            .class(FlexFit)
+                            .padding_x(2)
+                            .padding_bottom(2)
+                            .with_child(Markdown::new().class(FlexFit).text(ABOUT_TEXT))
+                            .with_child(
+                                Row::new().class(JustifyContent::FlexEnd).with_child(
+                                    Button::new(tr!("OK"))
+                                        .on_activate(link.callback(|_| Msg::CloseDialog)),
+                                ),
+                            ),
+                    )
+                    .on_close(link.callback(|_| Msg::CloseDialog)),
+            ),
         };
 
         let fab = Fab::new("fa fa-calendar").on_activate(link.callback(|_| Msg::ShowDialog));
@@ -304,6 +350,11 @@ impl Component for PmgPageSpamList {
                                                         link.callback(|_| Msg::SwitchToDesktop),
                                                     ),
                                             )
+                                            .with_item(
+                                                MenuItem::new(tr!("About"))
+                                                    .icon_class("fa fa-question-circle")
+                                                    .on_select(link.callback(|_| Msg::ShowAbout)),
+                                            )
                                             .with_separator()
                                             .with_item(
                                                 MenuItem::new(tr!("Logout"))
-- 
2.47.3





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

* applied: [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine
  2026-06-02 11:53 [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Dominik Csapak
                   ` (2 preceding siblings ...)
  2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 3/3] spam list page: add 'about' button to menu Dominik Csapak
@ 2026-06-02 20:50 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2026-06-02 20:50 UTC (permalink / raw)
  To: pmg-devel, Dominik Csapak

On Tue, 02 Jun 2026 13:53:39 +0200, Dominik Csapak wrote:
> This adds a small about dialog to the mobile quarantine interface, similar to
> what the desktop has. This should reduce confusion about what the interface
> actually is.
> 
> NOTE: it's proably necessary to update the pwt-assets folder in the
> pmg-yew-quarantine-gui too when building with a new pwt and yew-comp.
> 
> [...]

Applied, thanks! Both not yet bumped though, I try to remember, but please try
to remeber that we need to in a few days to maximum a week.

[yew-comp]

[1/1] markdown: correctly set css class
      commit: 66a586d2d10aa487cd99c56473051531513b1286

[pmg-yew-quarantine-gui]

[1/2] spam list page: factor `link` out
      commit: c6dcbe27d6e6dcf5c126473415c9cc669bb1a04e
[2/2] spam list page: add 'about' button to menu
      commit: db058840cd14271dba0fec1530b282fd12e1010e




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

end of thread, other threads:[~2026-06-02 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:53 [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Dominik Csapak
2026-06-02 11:53 ` [PATCH yew-comp 1/3] markdown: correctly set css class Dominik Csapak
2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 2/3] spam list page: factor `link` out Dominik Csapak
2026-06-02 11:53 ` [PATCH pmg-yew-quarantine-gui 3/3] spam list page: add 'about' button to menu Dominik Csapak
2026-06-02 20:50 ` applied: [PATCH pmg-yew-quarantine-gui/yew-comp 0/3] add about text to pmg mobile quarantine Thomas Lamprecht

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