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 23B0D1FF170 for ; Thu, 10 Jul 2025 12:28:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B08F830163; Thu, 10 Jul 2025 12:28:46 +0200 (CEST) From: Dominik Csapak To: pmg-devel@lists.proxmox.com, yew-devel@lists.proxmox.com Date: Thu, 10 Jul 2025 12:28:12 +0200 Message-Id: <20250710102812.2480856-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250710102812.2480856-1-d.csapak@proxmox.com> References: <20250710102812.2480856-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pmg-devel] [PATCH yew-widget-toolkit 1/1] touch: material app: add option for the theme dir prefix X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" otherwise we can't use different paths for the css/font files when using a material app. Signed-off-by: Dominik Csapak --- src/touch/material_app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/touch/material_app.rs b/src/touch/material_app.rs index 2c72e00..079dd5c 100644 --- a/src/touch/material_app.rs +++ b/src/touch/material_app.rs @@ -212,6 +212,11 @@ pub struct MaterialApp { #[builder(IntoPropValue, into_prop_value)] #[prop_or(Some(PageAnimationStyle::FadeFromRight))] pub page_animation: Option, + + #[builder] + #[prop_or_default] + /// The directory prefix for the css files. (E.g. "/css/") + pub theme_dir_prefix: AttrValue, } impl MaterialApp { @@ -385,11 +390,14 @@ impl Component for PwtMaterialApp { ) .with_optional_child(self.dialog.as_ref().map(|(_, dialog)| dialog.clone())); + let theme_loader = ThemeLoader::new(NavigationContainer::new().with_child(app)) + .dir_prefix(props.theme_dir_prefix.clone()); + html! { context={self.snackbar_controller.clone()}> context={self.page_controller.clone()}> - { ThemeLoader::new(NavigationContainer::new().with_child(app))} + { theme_loader } > > -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C7CE61FF170 for ; Thu, 10 Jul 2025 12:28:00 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B6B70301DF; Thu, 10 Jul 2025 12:28:46 +0200 (CEST) From: Dominik Csapak To: pmg-devel@lists.proxmox.com, yew-devel@lists.proxmox.com Date: Thu, 10 Jul 2025 12:28:12 +0200 Message-Id: <20250710102812.2480856-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250710102812.2480856-1-d.csapak@proxmox.com> References: <20250710102812.2480856-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [yew-devel] [PATCH yew-widget-toolkit 1/1] touch: material app: add option for the theme dir prefix X-BeenThere: yew-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Yew framework devel list at Proxmox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Yew framework devel list at Proxmox Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: yew-devel-bounces@lists.proxmox.com Sender: "yew-devel" otherwise we can't use different paths for the css/font files when using a material app. Signed-off-by: Dominik Csapak --- src/touch/material_app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/touch/material_app.rs b/src/touch/material_app.rs index 2c72e00..079dd5c 100644 --- a/src/touch/material_app.rs +++ b/src/touch/material_app.rs @@ -212,6 +212,11 @@ pub struct MaterialApp { #[builder(IntoPropValue, into_prop_value)] #[prop_or(Some(PageAnimationStyle::FadeFromRight))] pub page_animation: Option, + + #[builder] + #[prop_or_default] + /// The directory prefix for the css files. (E.g. "/css/") + pub theme_dir_prefix: AttrValue, } impl MaterialApp { @@ -385,11 +390,14 @@ impl Component for PwtMaterialApp { ) .with_optional_child(self.dialog.as_ref().map(|(_, dialog)| dialog.clone())); + let theme_loader = ThemeLoader::new(NavigationContainer::new().with_child(app)) + .dir_prefix(props.theme_dir_prefix.clone()); + html! { context={self.snackbar_controller.clone()}> context={self.page_controller.clone()}> - { ThemeLoader::new(NavigationContainer::new().with_child(app))} + { theme_loader } > > -- 2.39.5 _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel