aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/session-manager/src
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 /default-plugins/session-manager/src
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 'default-plugins/session-manager/src')
-rw-r--r--default-plugins/session-manager/src/main.rs32
1 files changed, 21 insertions, 11 deletions
diff --git a/default-plugins/session-manager/src/main.rs b/default-plugins/session-manager/src/main.rs
index 6563a226..278816e3 100644
--- a/default-plugins/session-manager/src/main.rs
+++ b/default-plugins/session-manager/src/main.rs
@@ -37,20 +37,20 @@ impl Default for ActiveScreen {
}
#[derive(Default)]
-struct State {
+pub(crate) struct State {
session_name: Option<String>,
- sessions: SessionList,
- resurrectable_sessions: ResurrectableSessions,
+ pub(crate) sessions: SessionList,
+ pub(crate) resurrectable_sessions: ResurrectableSessions,
search_term: String,
new_session_info: NewSessionInfo,
- renaming_session_name: Option<String>,
- error: Option<String>,
- active_screen: ActiveScreen,
- colors: Colors,
- is_welcome_screen: bool,
+ pub(crate) renaming_session_name: Option<String>,
+ pub(crate) error: Option<String>,
+ pub(crate) active_screen: ActiveScreen,
+ pub(crate) colors: Colors,
+ pub(crate) is_welcome_screen: bool,
is_multi_screen: bool,
- single_screen_state: SingleScreenState,
- show_kill_all_sessions_warning: bool,
+ pub(crate) single_screen_state: SingleScreenState,
+ pub(crate) show_kill_all_sessions_warning: bool,
request_ids: Vec<String>,
is_web_client: bool,
current_session_last_saved_time: Option<u64>,
@@ -150,7 +150,11 @@ impl ZellijPlugin for State {
},
Event::ModeUpdate(mode_info) => {
self.colors = Colors::new(mode_info.style.colors);
+ let was_web_client = self.is_web_client;
self.is_web_client = mode_info.is_web_client.unwrap_or(false);
+ if was_web_client != self.is_web_client {
+ self.refresh_session_list();
+ }
should_render = true;
},
Event::Key(key) => {
@@ -1404,7 +1408,13 @@ impl State {
},
}
}
- fn render_kill_all_sessions_warning(&self, rows: usize, columns: usize, x: usize, y: usize) {
+ pub(crate) fn render_kill_all_sessions_warning(
+ &self,
+ rows: usize,
+ columns: usize,
+ x: usize,
+ y: usize,
+ ) {
if rows == 0 || columns == 0 {
return;
}