fix(plugins): session layouts are still serialized using the legacy plugin syntax (remote:) (#3224)
* fix(plugins): session layouts were still serialized using the legacy plugin syntax (remote:) * use example domain * style(fmt): rustfmt --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
This commit is contained in:
parent
fc1026dff0
commit
a54a7ea2bd
2 changed files with 16 additions and 2 deletions
|
|
@ -571,7 +571,7 @@ impl RunPluginLocation {
|
||||||
match self {
|
match self {
|
||||||
RunPluginLocation::File(pathbuf) => format!("file:{}", pathbuf.display()),
|
RunPluginLocation::File(pathbuf) => format!("file:{}", pathbuf.display()),
|
||||||
RunPluginLocation::Zellij(plugin_tag) => format!("zellij:{}", plugin_tag),
|
RunPluginLocation::Zellij(plugin_tag) => format!("zellij:{}", plugin_tag),
|
||||||
RunPluginLocation::Remote(url) => format!("remote:{}", url),
|
RunPluginLocation::Remote(url) => String::from(url),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -584,7 +584,7 @@ impl From<&RunPluginLocation> for Url {
|
||||||
path.clone().into_os_string().into_string().unwrap()
|
path.clone().into_os_string().into_string().unwrap()
|
||||||
),
|
),
|
||||||
RunPluginLocation::Zellij(tag) => format!("zellij:{}", tag),
|
RunPluginLocation::Zellij(tag) => format!("zellij:{}", tag),
|
||||||
RunPluginLocation::Remote(url) => format!("remote:{}", url),
|
RunPluginLocation::Remote(url) => String::from(url),
|
||||||
};
|
};
|
||||||
Self::parse(&url).unwrap()
|
Self::parse(&url).unwrap()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2085,6 +2085,9 @@ fn run_plugin_location_parsing() {
|
||||||
pane {
|
pane {
|
||||||
plugin location="filepicker"
|
plugin location="filepicker"
|
||||||
}
|
}
|
||||||
|
pane {
|
||||||
|
plugin location="https://example.com/plugin.wasm"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"#;
|
"#;
|
||||||
let layout = Layout::from_kdl(kdl_layout, "layout_file_name".into(), None, None).unwrap();
|
let layout = Layout::from_kdl(kdl_layout, "layout_file_name".into(), None, None).unwrap();
|
||||||
|
|
@ -2162,6 +2165,17 @@ fn run_plugin_location_parsing() {
|
||||||
}))),
|
}))),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
TiledPaneLayout {
|
||||||
|
run: Some(Run::Plugin(RunPluginOrAlias::RunPlugin(RunPlugin {
|
||||||
|
_allow_exec_host_cmd: false,
|
||||||
|
location: RunPluginLocation::Remote(String::from(
|
||||||
|
"https://example.com/plugin.wasm",
|
||||||
|
)),
|
||||||
|
configuration: Default::default(),
|
||||||
|
..Default::default()
|
||||||
|
}))),
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
],
|
],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue