From 90a5b8de80fd5507bb06e7a053756137ba754ad8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 May 2021 02:17:51 +0100 Subject: [PATCH] bundles download: Pass &Instance to info_pane renderer Signed-off-by: Ian Jackson --- daemon/session.rs | 2 +- src/bundles.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/session.rs b/daemon/session.rs index b53c8976..c1ee497a 100644 --- a/daemon/session.rs +++ b/daemon/session.rs @@ -236,7 +236,7 @@ fn session_inner(form: Json, nick, sse_url_prefix, player_info_pane, - bundles_info_pane: ig.bundle_list.info_pane()?, + bundles_info_pane: ig.bundle_list.info_pane(ig)?, ptoken: form.ptoken.clone(), links: (&*ig.links).into(), fake_rng: config().game_rng.is_fake(), diff --git a/src/bundles.rs b/src/bundles.rs index 793b5ec8..2b04488e 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -328,7 +328,7 @@ impl InstanceBundles { (id, state.clone()) }).collect(); - let new_info_pane = ig.bundle_list.info_pane().unwrap_or_else(|e|{ + let new_info_pane = ig.bundle_list.info_pane(ig).unwrap_or_else(|e|{ let m = "error rendering bundle list"; error!("{}: {}", m, e); Html::from_txt(m) @@ -417,7 +417,7 @@ impl Uploading { #[ext(pub)] impl MgmtBundleList { #[throws(IE)] - fn info_pane(&self) -> Html { + fn info_pane(&self, ig: &Instance) -> Html { #[derive(Serialize,Debug)] struct RenderPane { bundles: Vec, -- 2.30.2