From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 73F0C1FF164 for ; Fri, 6 Jun 2025 09:27:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 79E4E3573A; Fri, 6 Jun 2025 09:27:53 +0200 (CEST) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Fri, 6 Jun 2025 09:27:17 +0200 Message-Id: <20250606072720.664054-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250606072720.664054-1-d.csapak@proxmox.com> References: <20250606072720.664054-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager 1/4] ui: dashboard: use builtin types and methods for styles X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" by using the rust types instead of a string for the classes, it's not possible to mistype it, otherwise the compiler will error out. Same with the styling of specifying e.g. padding. Just using the built-in padding methods makes it impossible to mistype. Signed-off-by: Dominik Csapak --- ui/src/dashboard/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/dashboard/mod.rs b/ui/src/dashboard/mod.rs index 23ff6b7..0832ced 100644 --- a/ui/src/dashboard/mod.rs +++ b/ui/src/dashboard/mod.rs @@ -9,7 +9,7 @@ use yew::{ use proxmox_yew_comp::{http_get, Status}; use pwt::{ - css::{AlignItems, FlexFit, FlexWrap, JustifyContent}, + css::{AlignItems, FlexDirection, FlexFit, FlexWrap, JustifyContent}, prelude::*, widget::{error_message, Button, Column, Container, Fa, Panel, Row}, AsyncPool, @@ -243,7 +243,7 @@ impl Component for PdmDashboard { .with_child( Container::new() .class("pwt-content-spacer") - .class("pwt-flex-direction-row") + .class(FlexDirection::Row) .class(FlexWrap::Wrap) .with_child( Panel::new() @@ -336,10 +336,10 @@ impl Component for PdmDashboard { .with_child( Container::new() .class("pwt-content-spacer") - .class("pwt-flex-direction-row") + .class(FlexDirection::Row) .class("pwt-align-content-start") .class(pwt::css::Flex::Fill) - .style("padding-top", "0") + .padding_top(0) .class(FlexWrap::Wrap) //.min_height(175) .with_child(self.create_top_entities_panel( -- 2.39.5 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel