aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/web_client.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-06-10 16:50:55 +0200
committerGitHub <noreply@github.com>2026-06-10 16:50:55 +0200
commitb6a5ad0e5a93d9f584b3f7a0fc90f497a09cbdb0 (patch)
tree38c77a381cfb937b428752a588c09a45c81434c9 /zellij-utils/src/input/web_client.rs
parentfeat: PWA support for the web client (#5184) (diff)
downloadsl0ppij-b6a5ad0e5a93d9f584b3f7a0fc90f497a09cbdb0.tar.gz
sl0ppij-b6a5ad0e5a93d9f584b3f7a0fc90f497a09cbdb0.tar.xz
sl0ppij-b6a5ad0e5a93d9f584b3f7a0fc90f497a09cbdb0.zip
Mobile layout (#5241)
* phase 2+3 * initial mobile plugin (phases 4 + 5 + 6) * some bugfixes * implement stage 7 * mobile interface improvements * improve mobile pane/tab picker * more ui improvements and fixes * various mobile fixes * some mobile fixes * mobile keyboard triggering fix * some cleanups * initial plugin keyboard implementation * improve keyboard hit zones * improve keyboard * pinch resize * pinching fixes * implement scrolling + panning * initial keyboard resizing * fix: mobile first render issues * keyboard responsiveness * fix some issues with the keyboard * implement fit * fix mobile scrolling * add tilde cell to compact * improve mobile keyboard * fix starting mobile terminal font to natural keyboard size * fix mobile resize blank screen flash * shadow focus for mobile * more keyboard fixes * improve mobile status bar * fix: render plugins to mobile clients * allow opening new panes/tabs from the mobile plugin * allow configuring * fix dot slash * improve mobile native soft keyboard interaction * switch to native keyboard - initial implementation * dirty hacks, but phone keyboard works now * adjust keyboard help strip * fix cursor in mobile * fix keyboard and help line * rename keyboard to modifier bar * allow starting new session * make clicking session name bring us to new session menu * allow switching to desktop from the mobile ui * mobile welcome screen initial implementation * mobile welcome screen fixes * various welcome screen fixes * more mobile fixes * moar mobile fixes * mobile ui redesign * fix: swallowed backspace bug * switch session screen improvement * touch up some interfaces * refactor: move mobile state to own struct * refactor: move fit resizing to the server * remove dead flash code * some cleanups * refactor: clear fit on close * refactor: improve fit api * refactor: pane sync functions * refactor: mouse * refactor: break into modules * some cleanups for the sessions screen * fix scrolling and other stuff * refactor: sessions screen * refactor: panes screen * refactor: new session screen * refactor: menu screen * refactor: render * cleanups * refactor: plugin structure * remove unused welcome screen path * Rename api * refactor input.js * cleanup useless comments * fit/mobile refactoring * take out the garbage * remove more comments * remove mobile flash on startup/attach * fix: various mobile startup issues * fix space bugs * cleanup * rustfmt * fix windows build * adjust modifier bar ui * add pr
Diffstat (limited to '')
-rw-r--r--zellij-utils/src/input/web_client.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/zellij-utils/src/input/web_client.rs b/zellij-utils/src/input/web_client.rs
index de09efad..9607adc0 100644
--- a/zellij-utils/src/input/web_client.rs
+++ b/zellij-utils/src/input/web_client.rs
@@ -239,6 +239,7 @@ pub struct WebClientConfig {
pub cursor_style: Option<CursorStyle>,
pub mac_option_is_meta: bool,
pub base_url: Option<String>,
+ pub font_size: Option<u16>,
}
impl Default for WebClientConfig {
@@ -251,6 +252,7 @@ impl Default for WebClientConfig {
cursor_style: None,
mac_option_is_meta: true, // TODO: yes? no?
base_url: None,
+ font_size: None,
}
}
}
@@ -289,6 +291,24 @@ impl WebClientConfig {
web_client_config.base_url = Some(base_url.to_owned());
}
+ if let Some(font_size_node) = kdl_get_child!(kdl, "font_size") {
+ let raw = font_size_node
+ .entries()
+ .iter()
+ .find_map(|e| e.value().as_i64());
+ if let Some(value) = raw {
+ if value > 0 && value <= u16::MAX as i64 {
+ web_client_config.font_size = Some(value as u16);
+ } else {
+ return Err(ConfigError::new_kdl_error(
+ format!("font_size must be between 1 and {}", u16::MAX),
+ font_size_node.span().offset(),
+ font_size_node.span().len(),
+ ));
+ }
+ }
+ }
+
Ok(web_client_config)
}
@@ -338,6 +358,12 @@ impl WebClientConfig {
web_client_children.nodes_mut().push(base_url_node);
}
+ if let Some(font_size) = self.font_size {
+ let mut font_size_node = KdlNode::new("font_size");
+ font_size_node.push(KdlValue::Base10(font_size as i64));
+ web_client_children.nodes_mut().push(font_size_node);
+ }
+
web_client_node.set_children(web_client_children);
web_client_node
}
@@ -351,6 +377,7 @@ impl WebClientConfig {
merged.cursor_style = other.cursor_style;
merged.mac_option_is_meta = other.mac_option_is_meta;
merged.base_url = other.base_url;
+ merged.font_size = other.font_size;
merged
}
}