* [pmg-devel] [PATCH http-server/yew-widget-toolkit 0/2] prepare change to mobile quarantine ui @ 2025-07-10 10:28 ` Dominik Csapak 0 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel yew-widget-toolkit patch is necessary for the ui to properly load the css/font files. http-server is so we are able to serve wasm files from perl api daemons pve-http-server: Dominik Csapak (1): api server: add 'wasm' as valid extension src/PVE/APIServer/AnyEvent.pm | 1 + 1 file changed, 1 insertion(+) proxmox-yew-widget-toolkit: Dominik Csapak (1): touch: material app: add option for the theme dir prefix src/touch/material_app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Summary over all repositories: 2 files changed, 10 insertions(+), 1 deletions(-) -- Generated by git-murpp 0.8.1 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [yew-devel] [PATCH http-server/yew-widget-toolkit 0/2] prepare change to mobile quarantine ui @ 2025-07-10 10:28 ` Dominik Csapak 0 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel yew-widget-toolkit patch is necessary for the ui to properly load the css/font files. http-server is so we are able to serve wasm files from perl api daemons pve-http-server: Dominik Csapak (1): api server: add 'wasm' as valid extension src/PVE/APIServer/AnyEvent.pm | 1 + 1 file changed, 1 insertion(+) proxmox-yew-widget-toolkit: Dominik Csapak (1): touch: material app: add option for the theme dir prefix src/touch/material_app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Summary over all repositories: 2 files changed, 10 insertions(+), 1 deletions(-) -- Generated by git-murpp 0.8.1 _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [pmg-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak @ 2025-07-10 10:28 ` Dominik Csapak -1 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel otherwise the server won't serve wasm files to the client. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- src/PVE/APIServer/AnyEvent.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 8f2c3ff..b00e074 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -431,6 +431,7 @@ my $file_extension_info = { mp3 => { ct => 'audio/mpeg', nocomp => 1 }, oga => { ct => 'audio/ogg', nocomp => 1 }, tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, + wasm => { ct => 'application/wasm' }, }; sub send_file_start { -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension @ 2025-07-10 10:28 ` Dominik Csapak 0 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel otherwise the server won't serve wasm files to the client. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- src/PVE/APIServer/AnyEvent.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 8f2c3ff..b00e074 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -431,6 +431,7 @@ my $file_extension_info = { mp3 => { ct => 'audio/mpeg', nocomp => 1 }, oga => { ct => 'audio/ogg', nocomp => 1 }, tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, + wasm => { ct => 'application/wasm' }, }; sub send_file_start { -- 2.39.5 _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak (?) @ 2025-07-14 12:00 ` Shannon Sterz 2025-07-14 12:05 ` Dominik Csapak -1 siblings, 1 reply; 14+ messages in thread From: Shannon Sterz @ 2025-07-14 12:00 UTC (permalink / raw) To: Yew framework devel list at Proxmox, Dominik Csapak On Thu Jul 10, 2025 at 12:28 PM CEST, Dominik Csapak wrote: > otherwise the server won't serve wasm files to the client. > > Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> > --- > src/PVE/APIServer/AnyEvent.pm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm > index 8f2c3ff..b00e074 100644 > --- a/src/PVE/APIServer/AnyEvent.pm > +++ b/src/PVE/APIServer/AnyEvent.pm > @@ -431,6 +431,7 @@ my $file_extension_info = { > mp3 => { ct => 'audio/mpeg', nocomp => 1 }, > oga => { ct => 'audio/ogg', nocomp => 1 }, > tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, > + wasm => { ct => 'application/wasm' }, just a quick question: do you intend to serve the mobile quarantaine as pure wasm or as a gzip-ed archive like we do now for pdm & peat? because in the later case, the content type "application/octet-stream" is fine to my understanding anyway. > }; > > sub send_file_start { _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-14 12:00 ` Shannon Sterz @ 2025-07-14 12:05 ` Dominik Csapak 2025-07-15 9:26 ` Thomas Lamprecht 0 siblings, 1 reply; 14+ messages in thread From: Dominik Csapak @ 2025-07-14 12:05 UTC (permalink / raw) To: Shannon Sterz, Yew framework devel list at Proxmox On 7/14/25 14:00, Shannon Sterz wrote: > On Thu Jul 10, 2025 at 12:28 PM CEST, Dominik Csapak wrote: >> otherwise the server won't serve wasm files to the client. >> >> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> >> --- >> src/PVE/APIServer/AnyEvent.pm | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm >> index 8f2c3ff..b00e074 100644 >> --- a/src/PVE/APIServer/AnyEvent.pm >> +++ b/src/PVE/APIServer/AnyEvent.pm >> @@ -431,6 +431,7 @@ my $file_extension_info = { >> mp3 => { ct => 'audio/mpeg', nocomp => 1 }, >> oga => { ct => 'audio/ogg', nocomp => 1 }, >> tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, >> + wasm => { ct => 'application/wasm' }, > > just a quick question: do you intend to serve the mobile quarantaine as > pure wasm or as a gzip-ed archive like we do now for pdm & peat? because > in the later case, the content type "application/octet-stream" is fine > to my understanding anyway. currently i have it served as wasm but it'll be compressed by the proxy daemon on the fly. imho if we'd want to precompress it, I'd add 'wasm.gz' for example as an additional content type Ideally, we could precomress it in a way that the browser still gets the correct content-type (wasm) and the http response has the right content-encoding header (gzip) but that would require a bit of work in the api server I think > >> }; >> >> sub send_file_start { > _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-14 12:05 ` Dominik Csapak @ 2025-07-15 9:26 ` Thomas Lamprecht 2025-07-15 10:57 ` Dominik Csapak 0 siblings, 1 reply; 14+ messages in thread From: Thomas Lamprecht @ 2025-07-15 9:26 UTC (permalink / raw) To: Yew framework devel list at Proxmox, Dominik Csapak, Shannon Sterz Am 14.07.25 um 14:05 schrieb Dominik Csapak: > On 7/14/25 14:00, Shannon Sterz wrote: >> On Thu Jul 10, 2025 at 12:28 PM CEST, Dominik Csapak wrote: >>> otherwise the server won't serve wasm files to the client. >>> >>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> >>> --- >>> src/PVE/APIServer/AnyEvent.pm | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm >>> index 8f2c3ff..b00e074 100644 >>> --- a/src/PVE/APIServer/AnyEvent.pm >>> +++ b/src/PVE/APIServer/AnyEvent.pm >>> @@ -431,6 +431,7 @@ my $file_extension_info = { >>> mp3 => { ct => 'audio/mpeg', nocomp => 1 }, >>> oga => { ct => 'audio/ogg', nocomp => 1 }, >>> tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, >>> + wasm => { ct => 'application/wasm' }, >> >> just a quick question: do you intend to serve the mobile quarantaine as >> pure wasm or as a gzip-ed archive like we do now for pdm & peat? because >> in the later case, the content type "application/octet-stream" is fine >> to my understanding anyway. > > currently i have it served as wasm but it'll be compressed by > the proxy daemon on the fly. Seems like a waste of resources compared to a plain sendfile when doing the compression on build like in PDM. We naturally do not have any usage numbers, but there are some bigger known deployments, so this might see some usage. > imho if we'd want to precompress it, I'd add > 'wasm.gz' for example as an additional content type > > Ideally, we could precomress it in a way that the browser still gets the correct > content-type (wasm) and the http response has the right content-encoding header > (gzip) but that would require a bit of work in the api server I think But is that always correct? Anyhow, for now using something like DecompressionStream + manually setting the content type in the header (which just improves performance) would be enough IMO. _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-15 9:26 ` Thomas Lamprecht @ 2025-07-15 10:57 ` Dominik Csapak 2025-07-15 19:17 ` Thomas Lamprecht 0 siblings, 1 reply; 14+ messages in thread From: Dominik Csapak @ 2025-07-15 10:57 UTC (permalink / raw) To: Thomas Lamprecht, Yew framework devel list at Proxmox, Shannon Sterz On 7/15/25 11:26, Thomas Lamprecht wrote: > Am 14.07.25 um 14:05 schrieb Dominik Csapak: >> On 7/14/25 14:00, Shannon Sterz wrote: >>> On Thu Jul 10, 2025 at 12:28 PM CEST, Dominik Csapak wrote: >>>> otherwise the server won't serve wasm files to the client. >>>> >>>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> >>>> --- >>>> src/PVE/APIServer/AnyEvent.pm | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm >>>> index 8f2c3ff..b00e074 100644 >>>> --- a/src/PVE/APIServer/AnyEvent.pm >>>> +++ b/src/PVE/APIServer/AnyEvent.pm >>>> @@ -431,6 +431,7 @@ my $file_extension_info = { >>>> mp3 => { ct => 'audio/mpeg', nocomp => 1 }, >>>> oga => { ct => 'audio/ogg', nocomp => 1 }, >>>> tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, >>>> + wasm => { ct => 'application/wasm' }, >>> >>> just a quick question: do you intend to serve the mobile quarantaine as >>> pure wasm or as a gzip-ed archive like we do now for pdm & peat? because >>> in the later case, the content type "application/octet-stream" is fine >>> to my understanding anyway. >> >> currently i have it served as wasm but it'll be compressed by >> the proxy daemon on the fly. > > Seems like a waste of resources compared to a plain sendfile when > doing the compression on build like in PDM. We naturally do not > have any usage numbers, but there are some bigger known deployments, > so this might see some usage. > >> imho if we'd want to precompress it, I'd add >> 'wasm.gz' for example as an additional content type >> >> Ideally, we could precomress it in a way that the browser still gets the correct >> content-type (wasm) and the http response has the right content-encoding header >> (gzip) but that would require a bit of work in the api server I think > > But is that always correct? what do you mean? if the file is a gzip compressed wasm. setting the content-encoding to gzip and content-type to wasm seems to be the right choice? > Anyhow, for now using something like > DecompressionStream + manually setting the content type in the > header (which just improves performance) would be enough IMO. So like we do it in pdm? Sure, we can do that. just to note that we do compress the remaining resources in pve/pmg on the fly (js/css/etc. which add up to a few megabyte too) _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-15 10:57 ` Dominik Csapak @ 2025-07-15 19:17 ` Thomas Lamprecht 0 siblings, 0 replies; 14+ messages in thread From: Thomas Lamprecht @ 2025-07-15 19:17 UTC (permalink / raw) To: Yew framework devel list at Proxmox, Dominik Csapak, Shannon Sterz Am 15.07.25 um 12:57 schrieb Dominik Csapak: > On 7/15/25 11:26, Thomas Lamprecht wrote: >> Am 14.07.25 um 14:05 schrieb Dominik Csapak: >>> On 7/14/25 14:00, Shannon Sterz wrote: >>>> On Thu Jul 10, 2025 at 12:28 PM CEST, Dominik Csapak wrote: >>>>> otherwise the server won't serve wasm files to the client. >>>>> >>>>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> >>>>> --- >>>>> src/PVE/APIServer/AnyEvent.pm | 1 + >>>>> 1 file changed, 1 insertion(+) >>>>> >>>>> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm >>>>> index 8f2c3ff..b00e074 100644 >>>>> --- a/src/PVE/APIServer/AnyEvent.pm >>>>> +++ b/src/PVE/APIServer/AnyEvent.pm >>>>> @@ -431,6 +431,7 @@ my $file_extension_info = { >>>>> mp3 => { ct => 'audio/mpeg', nocomp => 1 }, >>>>> oga => { ct => 'audio/ogg', nocomp => 1 }, >>>>> tgz => { ct => 'application/x-compressed-tar', nocomp => 1 }, >>>>> + wasm => { ct => 'application/wasm' }, >>>> >>>> just a quick question: do you intend to serve the mobile quarantaine as >>>> pure wasm or as a gzip-ed archive like we do now for pdm & peat? because >>>> in the later case, the content type "application/octet-stream" is fine >>>> to my understanding anyway. >>> >>> currently i have it served as wasm but it'll be compressed by >>> the proxy daemon on the fly. >> >> Seems like a waste of resources compared to a plain sendfile when >> doing the compression on build like in PDM. We naturally do not >> have any usage numbers, but there are some bigger known deployments, >> so this might see some usage. >> >>> imho if we'd want to precompress it, I'd add >>> 'wasm.gz' for example as an additional content type >>> >>> Ideally, we could precomress it in a way that the browser still gets the correct >>> content-type (wasm) and the http response has the right content-encoding header >>> (gzip) but that would require a bit of work in the api server I think >> >> But is that always correct? > > what do you mean? if the file is a gzip compressed wasm. setting > the content-encoding to gzip and content-type to wasm seems to be the right choice? Yeah, you're obviously right, sorry for the noise. > >> Anyhow, for now using something like >> DecompressionStream + manually setting the content type in the >> header (which just improves performance) would be enough IMO. > > So like we do it in pdm? Sure, we can do that. Yes, or if there something wrong/suboptimal with the way I did it there it naturally would be good to use the better method for both sides. > just to note that we do compress the remaining resources in pve/pmg on the fly > (js/css/etc. which add up to a few megabyte too) The bit of JS here probably is not really significant I'd think? Bu sure, any other such resource might be nice to have (pre-)compressed too if it saves a few MiB–that adds up quickly and if one has to use a spotty uplink with a few seconds latency and 100 KiB/s those few MiB less can be quite the time saver. That said, we certainly do not need to block this on that, especially as the quarantine view is really small, so not such high cost we had with PDM or PEAT. And doing some upfront compression should be probably done as separate patch series checking out all products anyway. _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] applied: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak (?) (?) @ 2025-07-15 19:29 ` Thomas Lamprecht via pve-devel -1 siblings, 0 replies; 14+ messages in thread From: Thomas Lamprecht via pve-devel @ 2025-07-15 19:29 UTC (permalink / raw) To: pve-devel, pmg-devel, yew-devel, Dominik Csapak; +Cc: Thomas Lamprecht [-- Attachment #1: Type: message/rfc822, Size: 3153 bytes --] From: Thomas Lamprecht <t.lamprecht@proxmox.com> To: pve-devel@lists.proxmox.com, pmg-devel@lists.proxmox.com, yew-devel@lists.proxmox.com, Dominik Csapak <d.csapak@proxmox.com> Subject: applied: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension Date: Tue, 15 Jul 2025 21:29:34 +0200 Message-ID: <175260777195.2318239.1733601435026190799.b4-ty@proxmox.com> On Thu, 10 Jul 2025 12:28:11 +0200, Dominik Csapak wrote: > otherwise the server won't serve wasm files to the client. > > Applied, thanks! [1/1] api server: add 'wasm' as valid extension commit: 0ed9932b12e8a5d423657a1dfe0fb27b2774c0d8 [-- Attachment #2: Type: text/plain, Size: 160 bytes --] _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [pmg-devel] applied: [yew-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak @ 2025-07-15 19:29 ` Thomas Lamprecht -1 siblings, 0 replies; 14+ messages in thread From: Thomas Lamprecht @ 2025-07-15 19:29 UTC (permalink / raw) To: pve-devel, pmg-devel, yew-devel, Dominik Csapak On Thu, 10 Jul 2025 12:28:11 +0200, Dominik Csapak wrote: > otherwise the server won't serve wasm files to the client. > > Applied, thanks! [1/1] api server: add 'wasm' as valid extension commit: 0ed9932b12e8a5d423657a1dfe0fb27b2774c0d8 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [yew-devel] applied: [PATCH http-server 1/1] api server: add 'wasm' as valid extension @ 2025-07-15 19:29 ` Thomas Lamprecht 0 siblings, 0 replies; 14+ messages in thread From: Thomas Lamprecht @ 2025-07-15 19:29 UTC (permalink / raw) To: pve-devel, pmg-devel, yew-devel, Dominik Csapak On Thu, 10 Jul 2025 12:28:11 +0200, Dominik Csapak wrote: > otherwise the server won't serve wasm files to the client. > > Applied, thanks! [1/1] api server: add 'wasm' as valid extension commit: 0ed9932b12e8a5d423657a1dfe0fb27b2774c0d8 _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [pmg-devel] [PATCH yew-widget-toolkit 1/1] touch: material app: add option for the theme dir prefix 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak @ 2025-07-10 10:28 ` Dominik Csapak -1 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel otherwise we can't use different paths for the css/font files when using a material app. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- 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<PageAnimationStyle>, + + #[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! { <Router history={self.history.clone()} basename={props.basename.clone()}> <ContextProvider<SnackBarController> context={self.snackbar_controller.clone()}> <ContextProvider<PageController> context={self.page_controller.clone()}> - { ThemeLoader::new(NavigationContainer::new().with_child(app))} + { theme_loader } </ContextProvider<PageController>> </ContextProvider<SnackBarController>> </Router> -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* [yew-devel] [PATCH yew-widget-toolkit 1/1] touch: material app: add option for the theme dir prefix @ 2025-07-10 10:28 ` Dominik Csapak 0 siblings, 0 replies; 14+ messages in thread From: Dominik Csapak @ 2025-07-10 10:28 UTC (permalink / raw) To: pmg-devel, yew-devel otherwise we can't use different paths for the css/font files when using a material app. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- 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<PageAnimationStyle>, + + #[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! { <Router history={self.history.clone()} basename={props.basename.clone()}> <ContextProvider<SnackBarController> context={self.snackbar_controller.clone()}> <ContextProvider<PageController> context={self.page_controller.clone()}> - { ThemeLoader::new(NavigationContainer::new().with_child(app))} + { theme_loader } </ContextProvider<PageController>> </ContextProvider<SnackBarController>> </Router> -- 2.39.5 _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-07-15 19:29 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-07-10 10:28 [pmg-devel] [PATCH http-server/yew-widget-toolkit 0/2] prepare change to mobile quarantine ui Dominik Csapak 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak 2025-07-10 10:28 ` [pmg-devel] [PATCH http-server 1/1] api server: add 'wasm' as valid extension Dominik Csapak 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak 2025-07-14 12:00 ` Shannon Sterz 2025-07-14 12:05 ` Dominik Csapak 2025-07-15 9:26 ` Thomas Lamprecht 2025-07-15 10:57 ` Dominik Csapak 2025-07-15 19:17 ` Thomas Lamprecht 2025-07-15 19:29 ` [pve-devel] applied: " Thomas Lamprecht via pve-devel 2025-07-15 19:29 ` [pmg-devel] " Thomas Lamprecht 2025-07-15 19:29 ` [yew-devel] applied: " Thomas Lamprecht 2025-07-10 10:28 ` [pmg-devel] [PATCH yew-widget-toolkit 1/1] touch: material app: add option for the theme dir prefix Dominik Csapak 2025-07-10 10:28 ` [yew-devel] " Dominik Csapak
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.