[pdm-devel] [PATCH datacenter-manager v2 1/1] ui: enable the top navigation bar's documentation button
Shannon Sterz
s.sterz at proxmox.com
Tue Sep 16 16:48:04 CEST 2025
and make it open the beta documentation in a new tab for now.
Signed-off-by: Shannon Sterz <s.sterz at 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
More information about the pdm-devel
mailing list