From: Ian Jackson Date: Tue, 4 May 2021 01:17:51 +0000 (+0100) Subject: bundles download: Pass &Instance to info_pane renderer X-Git-Tag: otter-0.6.0~398 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=90a5b8de80fd5507bb06e7a053756137ba754ad8;p=otter.git bundles download: Pass &Instance to info_pane renderer Signed-off-by: Ian Jackson --- 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,