From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id D6F2B1FF0B7 for ; Mon, 30 Nov 2026 13:53:47 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 11E25216E9; Mon, 30 Nov 2026 13:53:47 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager/proxmox-yew-comp/yew-widget-toolkit v3 0/8] ui: make the default dashboard configurable and add "My Settings" dialog Date: Mon, 30 Nov 2026 13:52:34 +0100 Message-ID: <20261130125325.2392967-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.248 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RSVNVVCL2MTTPLXHVC4NL7V7YBPHUJMI X-Message-ID-Hash: RSVNVVCL2MTTPLXHVC4NL7V7YBPHUJMI X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This adds a 'My Settings' dialog like the one in PVE to the user menu of PDM. It contains the settings of the xterm.js and noVNC consoles, and lets users select one of their views as the dashboard. All of them are saved in the local storage of the browser, so they are per browser, not per user. For that, a `PersistentState` in pwt can now listen for updates of its storage location (so the dashboard changes without reloading the page), and `XTermJs` in proxmox-yew-comp gets a 'resize' property for the scaling mode of noVNC. The xterm.js settings are written as plain local storage entries instead of a `PersistentState`, since the xterm.js console uses their text as is. Note that for the pdm patches, pwt and proxmox-yew-comp must be bumped and the new versions must be recorded in Cargo.toml. Even if we don't want to have the default dashboard configurable, the 'my settings' patches could be applied individually. changes from v2: * rebase on master * drop the fix for dismissing the remove confirmation, that is already fixed on master * pwt: only add a helper to dispatch custom events, and use it for the theme changed event too * pwt: improve the doc comments of the persistent state patch * pass the noVNC scaling mode from the settings to the noVNC console (new proxmox-yew-comp patch) * treat empty xterm.js settings as unset and add a step for the line height * use a new component for the dashboard when another view is selected (new patch) * show the notice for a missing dashboard view when loading it fails with 'not found', instead of looking it up in the list of views * use a shared helper for the persistent state of the dashboard * document the my settings window (new patch) * improve commit messages and comments changes from v1: * add my settings window and move the default dashboard selection there * use '#' for the default dashboard instead of '__dashboard__' * show a notice if the selected dashboard is not in the view_list v2: https://lore.proxmox.com/pdm-devel/20261127170941.4183880-1-d.csapak@proxmox.com/ proxmox-yew-widget-toolkit: Dominik Csapak (2): state: event: add helper to dispatch custom DOM events state: persistent state: allow listening for updates src/state/event.rs | 21 +++++++++++++++++++ src/state/mod.rs | 33 +++++++++++++++++++++++++----- src/state/persistent_state.rs | 38 ++++++++++++++++++++++++++++++++++- src/state/theme.rs | 7 ++----- 4 files changed, 88 insertions(+), 11 deletions(-) create mode 100644 src/state/event.rs proxmox-yew-comp: Dominik Csapak (1): xtermjs: allow setting the noVNC scaling mode src/xtermjs.rs | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) proxmox-datacenter-manager: Dominik Csapak (5): ui: view selector: use a placeholder that can't conflict with a view ui: add 'My Settings' dialog with xterm.js and noVNC settings ui: views: use the view name as key of the component ui: make the default dashboard page configurable docs: web ui: describe the 'My Settings' dialog docs/views.rst | 2 + docs/web-ui.rst | 19 +- ui/Cargo.toml | 2 +- ui/src/configuration/views.rs | 4 +- ui/src/dashboard/mod.rs | 7 + ui/src/dashboard/view.rs | 53 +++--- ui/src/main.rs | 1 + ui/src/main_menu.rs | 21 ++- ui/src/pve/utils.rs | 13 +- ui/src/top_nav_bar.rs | 22 ++- ui/src/widget/mod.rs | 5 +- ui/src/widget/my_settings_dialog.rs | 273 ++++++++++++++++++++++++++++ ui/src/widget/view_selector.rs | 10 +- 13 files changed, 388 insertions(+), 44 deletions(-) create mode 100644 ui/src/widget/my_settings_dialog.rs Summary over all repositories: 18 files changed, 501 insertions(+), 63 deletions(-) -- Generated by murpp 0.11.0