From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-yew-quarantine-gui 2/2] spam list: use new slidable interface
Date: Wed, 10 Jun 2026 14:39:10 +0200 [thread overview]
Message-ID: <20260610123916.2651267-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260610123916.2651267-1-d.csapak@proxmox.com>
the slidable widget has a new 'with_x_action' interface which makes it
obsolete to create an inline row here.
In addition to be a better interface and having less code here, it works
around a browser bug with nested Rows in pwt 0.8.8.
Since this new interface is only available in 0.8.8, bump the version in
Cargo.toml too.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
Cargo.toml | 2 +-
src/spam_list.rs | 54 ++++++++++++++++++++----------------------------
2 files changed, 23 insertions(+), 33 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 4ded122..7f62243 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ proxmox-schema = "5"
proxmox-uuid = "1"
proxmox-subscription = { version = "1", features = ["api-types"], default-features = false }
-pwt = "0.8"
+pwt = "0.8.8"
pwt-macros = "0.5"
proxmox-login = "1"
diff --git a/src/spam_list.rs b/src/spam_list.rs
index 7a34df8..95a0611 100644
--- a/src/spam_list.rs
+++ b/src/spam_list.rs
@@ -319,39 +319,29 @@ fn render_list_item(
}
}
})
- .left_actions(
- Row::new()
- .style("height", "100%") // FIXME better solved in scss of slidable?
- .class(AlignItems::Center)
- .with_child(
- SlidableAction::new(tr!("Deliver"))
- .class(ColorScheme::SuccessContainer)
- .icon_class("fa fa-paper-plane")
- .on_activate(make_cb(MailAction::Deliver)),
- )
- .with_child(
- SlidableAction::new(tr!("Welcomelist"))
- .icon_class("fa fa-check")
- .on_activate(make_cb(MailAction::Welcomelist)),
- )
- .with_child(seen_action),
+ .with_left_action(
+ SlidableAction::new(tr!("Deliver"))
+ .class(ColorScheme::SuccessContainer)
+ .icon_class("fa fa-paper-plane")
+ .on_activate(make_cb(MailAction::Deliver)),
)
- .right_actions(
- Row::new()
- .style("height", "100%") // FIXME better solved in scss of slidable?
- .class(AlignItems::Center)
- .with_child(
- SlidableAction::new(tr!("Blocklist"))
- .class(ColorScheme::WarningContainer)
- .icon_class("fa fa-times")
- .on_activate(make_cb(MailAction::Blocklist)),
- )
- .with_child(
- SlidableAction::new(tr!("Delete"))
- .class(ColorScheme::ErrorContainer)
- .icon_class("fa fa-trash")
- .on_activate(make_cb(MailAction::Delete)),
- ),
+ .with_left_action(
+ SlidableAction::new(tr!("Welcomelist"))
+ .icon_class("fa fa-check")
+ .on_activate(make_cb(MailAction::Welcomelist)),
+ )
+ .with_left_action(seen_action)
+ .with_right_action(
+ SlidableAction::new(tr!("Blocklist"))
+ .class(ColorScheme::WarningContainer)
+ .icon_class("fa fa-times")
+ .on_activate(make_cb(MailAction::Blocklist)),
+ )
+ .with_right_action(
+ SlidableAction::new(tr!("Delete"))
+ .class(ColorScheme::ErrorContainer)
+ .icon_class("fa fa-trash")
+ .on_activate(make_cb(MailAction::Delete)),
)
.into()
}
--
2.47.3
next prev parent reply other threads:[~2026-06-10 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 12:39 [PATCH pmg-yew-quarantine-gui/yew-widget-toolkit 0/2] pmg mobile quarantine: work around weird chrome behavior in slidable Dominik Csapak
2026-06-10 12:39 ` [PATCH yew-widget-toolkit 1/2] slidable: revert markup with old `x_actions` interface Dominik Csapak
2026-06-10 12:39 ` Dominik Csapak [this message]
2026-06-10 14:42 ` applied: [PATCH pmg-yew-quarantine-gui/yew-widget-toolkit 0/2] pmg mobile quarantine: work around weird chrome behavior in slidable 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=20260610123916.2651267-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pmg-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