all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager v2 0/1] enable top nav bar's documentation button
@ 2025-09-16 14:48 Shannon Sterz
  2025-09-16 14:48 ` [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: enable the top navigation " Shannon Sterz
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Sterz @ 2025-09-16 14:48 UTC (permalink / raw)
  To: pdm-devel

this patch enables pdm's documentation buton in the top nav bar and
opens the beta documentation when clicked.

changes since v1 (thanks @ Dominik Csapak):

- use `on_activate` instead of `onclick`
- use `open_with_url_and_target` instead of creating an a tag

Shannon Sterz (1):
  ui: enable the top navigation bar's documentation button

 ui/src/top_nav_bar.rs | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

--
2.47.3



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


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

* [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: enable the top navigation bar's documentation button
  2025-09-16 14:48 [pdm-devel] [PATCH datacenter-manager v2 0/1] enable top nav bar's documentation button Shannon Sterz
@ 2025-09-16 14:48 ` Shannon Sterz
  0 siblings, 0 replies; 2+ messages in thread
From: Shannon Sterz @ 2025-09-16 14:48 UTC (permalink / raw)
  To: pdm-devel

and make it open the beta documentation in a new tab for now.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 ui/src/top_nav_bar.rs | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/ui/src/top_nav_bar.rs b/ui/src/top_nav_bar.rs
index 9b1e37e..9aeeb73 100644
--- a/ui/src/top_nav_bar.rs
+++ b/ui/src/top_nav_bar.rs
@@ -3,6 +3,7 @@ use std::rc::Rc;
 use anyhow::Error;
 use pwt::css::ColorScheme;
 use serde::Deserialize;
+use wasm_bindgen::UnwrapThrowExt;
 
 use pwt::prelude::*;
 use pwt::widget::menu::{Menu, MenuButton, MenuEntry, MenuEvent, MenuItem};
@@ -181,10 +182,17 @@ impl Component for PdmTopNavBar {
                 Tooltip::new(
                     Button::new(tr!("Documentation"))
                         .icon_class("fa fa-book")
-                        .disabled(true)
-                        .class(ColorScheme::Neutral),
+                        .class(ColorScheme::Neutral)
+                        .on_activate(|_| {
+                            gloo_utils::window()
+                                .open_with_url_and_target(
+                                    "https://pve.proxmox.com/wiki/Proxmox_Datacenter_Manager_Beta_Documentation",
+                                    "_blank"
+                                )
+                                .expect_throw("could not open documentation in a new window");
+                        }),
                 )
-                .tip(tr!("Coming soon")),
+                .tip(tr!("Open the Beta documentation in a new tab.")),
             );
 
         if let Some(username) = &props.username {
-- 
2.47.3



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


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

end of thread, other threads:[~2025-09-16 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-16 14:48 [pdm-devel] [PATCH datacenter-manager v2 0/1] enable top nav bar's documentation button Shannon Sterz
2025-09-16 14:48 ` [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: enable the top navigation " 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