chiark / gitweb /
bundles download: Pass &Instance to info_pane renderer
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 4 May 2021 01:17:51 +0000 (02:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 4 May 2021 11:28:46 +0000 (12:28 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/session.rs
src/bundles.rs

index b53c89766505febdc6bb8abf9dacb875b0274ffd..c1ee497a5d9cc852dff1a9128ee46d7e07d6b9be 100644 (file)
@@ -236,7 +236,7 @@ fn session_inner(form: Json<SessionForm>,
       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(),
index 793b5ec8e0f2a12ae9c5da43778c65bcfda7df40..2b04488ea756a3d5bd7a8a90b98e83f2330934f4 100644 (file)
@@ -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<RenderBundle>,