aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/lib.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-07-16 11:43:18 +0200
committerGitHub <noreply@github.com>2025-07-16 11:43:18 +0200
commit403f0a07be19d51dc66f19b33c3c2972f59f907a (patch)
tree8529c0a5ca8043a052bfb239fede54ca0ce4d5c5 /zellij-server/src/lib.rs
parentfix(web): allow pasting with ctrl-shift-v (#4291) (diff)
downloadsl0ppij-403f0a07be19d51dc66f19b33c3c2972f59f907a.tar.gz
sl0ppij-403f0a07be19d51dc66f19b33c3c2972f59f907a.tar.xz
sl0ppij-403f0a07be19d51dc66f19b33c3c2972f59f907a.zip
fix(sessions): remove popups from welcome screen (#4294)
* remove popups from welcome screen * docs(changelog): add pr
Diffstat (limited to 'zellij-server/src/lib.rs')
-rw-r--r--zellij-server/src/lib.rs31
1 files changed, 26 insertions, 5 deletions
diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs
index 589670f5..f5004eb8 100644
--- a/zellij-server/src/lib.rs
+++ b/zellij-server/src/lib.rs
@@ -79,6 +79,7 @@ pub enum ServerInstruction {
Box<PluginAliases>,
bool, // should launch setup wizard
bool, // is_web_client
+ bool, // layout_is_welcome_screen
ClientId,
),
Render(Option<HashMap<ClientId, String>>),
@@ -668,6 +669,7 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
plugin_aliases,
should_launch_setup_wizard,
is_web_client,
+ layout_is_welcome_screen,
client_id,
) => {
let mut session = init_session(
@@ -762,10 +764,16 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
// intrusive
let setup_wizard = setup_wizard_floating_pane();
floating_panes.push(setup_wizard);
- } else if should_show_release_notes(runtime_config_options.show_release_notes) {
+ } else if should_show_release_notes(
+ runtime_config_options.show_release_notes,
+ layout_is_welcome_screen,
+ ) {
let about = about_floating_pane();
floating_panes.push(about);
- } else if should_show_startup_tip(runtime_config_options.show_startup_tips) {
+ } else if should_show_startup_tip(
+ runtime_config_options.show_startup_tips,
+ layout_is_welcome_screen,
+ ) {
let tip = tip_floating_pane();
floating_panes.push(tip);
}
@@ -1708,7 +1716,13 @@ fn tip_floating_pane() -> FloatingPaneLayout {
about_pane
}
-fn should_show_release_notes(should_show_release_notes_config: Option<bool>) -> bool {
+fn should_show_release_notes(
+ should_show_release_notes_config: Option<bool>,
+ layout_is_welcome_screen: bool,
+) -> bool {
+ if layout_is_welcome_screen {
+ return false;
+ }
if let Some(should_show_release_notes_config) = should_show_release_notes_config {
if !should_show_release_notes_config {
// if we were explicitly told not to show release notes, we don't show them,
@@ -1731,8 +1745,15 @@ fn should_show_release_notes(should_show_release_notes_config: Option<bool>) ->
}
}
-fn should_show_startup_tip(should_show_startup_tip_config: Option<bool>) -> bool {
- should_show_startup_tip_config.unwrap_or(true)
+fn should_show_startup_tip(
+ should_show_startup_tip_config: Option<bool>,
+ layout_is_welcome_screen: bool,
+) -> bool {
+ if layout_is_welcome_screen {
+ false
+ } else {
+ should_show_startup_tip_config.unwrap_or(true)
+ }
}
#[cfg(not(feature = "singlepass"))]