diff options
| author | Thomas Linford <tlinford@users.noreply.github.com> | 2026-01-21 15:47:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-21 15:47:47 +0100 |
| commit | 85f3b9df8ec0cbdd607cd721dde97c9d0769ff85 (patch) | |
| tree | ed9f2774ccc1b43569055b1cc1de4e262824cecc /zellij-utils/src/input | |
| parent | Fix query webserver from IPC rather than HTTPS (#4620) (diff) | |
| download | sl0ppij-85f3b9df8ec0cbdd607cd721dde97c9d0769ff85.tar.gz sl0ppij-85f3b9df8ec0cbdd607cd721dde97c9d0769ff85.tar.xz sl0ppij-85f3b9df8ec0cbdd607cd721dde97c9d0769ff85.zip | |
feat(web): add base_url option (#4409)
* feat(web): add base_url option
* fix tests
* update changelog
Diffstat (limited to 'zellij-utils/src/input')
| -rw-r--r-- | zellij-utils/src/input/web_client.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/zellij-utils/src/input/web_client.rs b/zellij-utils/src/input/web_client.rs index 1159b4d8..de09efad 100644 --- a/zellij-utils/src/input/web_client.rs +++ b/zellij-utils/src/input/web_client.rs @@ -238,6 +238,7 @@ pub struct WebClientConfig { pub cursor_inactive_style: Option<CursorInactiveStyle>, pub cursor_style: Option<CursorStyle>, pub mac_option_is_meta: bool, + pub base_url: Option<String>, } impl Default for WebClientConfig { @@ -249,6 +250,7 @@ impl Default for WebClientConfig { cursor_inactive_style: None, cursor_style: None, mac_option_is_meta: true, // TODO: yes? no? + base_url: None, } } } @@ -283,6 +285,10 @@ impl WebClientConfig { web_client_config.mac_option_is_meta = mac_option_is_meta; } + if let Some(base_url) = kdl_get_child_entry_string_value!(kdl, "base_url") { + web_client_config.base_url = Some(base_url.to_owned()); + } + Ok(web_client_config) } @@ -326,6 +332,12 @@ impl WebClientConfig { .push(mac_option_is_meta_node); } + if let Some(base_url) = &self.base_url { + let mut base_url_node = KdlNode::new("base_url"); + base_url_node.push(KdlValue::String(base_url.clone())); + web_client_children.nodes_mut().push(base_url_node); + } + web_client_node.set_children(web_client_children); web_client_node } @@ -338,6 +350,7 @@ impl WebClientConfig { merged.cursor_inactive_style = other.cursor_inactive_style; merged.cursor_style = other.cursor_style; merged.mac_option_is_meta = other.mac_option_is_meta; + merged.base_url = other.base_url; merged } } |
