Add CM Dashboard ASCII logo to rebuild tmux popup
All checks were successful
Build and Release / build-and-release (push) Successful in 2m9s
All checks were successful
Build and Release / build-and-release (push) Successful in 2m9s
- Display branded CM Dashboard ASCII logo in green when rebuild starts - Shows logo immediately when tmux popup opens for better UX - Includes rebuild target hostname and visual separator - Enhances rebuild process with professional branding - Bump version to v0.1.39
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.38"
|
||||
version = "0.1.39"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -244,16 +244,31 @@ impl TuiApp {
|
||||
KeyCode::Char('r') => {
|
||||
// System rebuild command - works on any panel for current host
|
||||
if let Some(hostname) = self.current_host.clone() {
|
||||
// Launch tmux popup with SSH using config values
|
||||
let ssh_command = format!(
|
||||
"ssh -tt {}@{} 'bash -ic {}'",
|
||||
// Create command that shows CM Dashboard logo and then rebuilds
|
||||
let logo_and_rebuild = format!(
|
||||
"echo ''; \
|
||||
echo -e '\\033[1;32m _____ __ __ _____ _ _ _ \\033[0m'; \
|
||||
echo -e '\\033[1;32m / ____| \\/ | | __ \\ | | | | | |\\033[0m'; \
|
||||
echo -e '\\033[1;32m| | | \\ / | | | | | __ _ ___| |__ | |__ ___ __ _ _ __ __| |\\033[0m'; \
|
||||
echo -e '\\033[1;32m| | | |\\/| | | | | |/ _` / __| \\'_ \\| \\'_ \\ / _ \\ / _` | \\'__/ _` |\\033[0m'; \
|
||||
echo -e '\\033[1;32m| |____| | | | | |__| | (_| \\__ \\ | | | |_) | (_) | (_| | | | (_| |\\033[0m'; \
|
||||
echo -e '\\033[1;32m \\_____|_| |_| |_____/ \\__,_|___/_| |_|_.__/ \\___/ \\__,_|_| \\__,_|\\033[0m'; \
|
||||
echo ''; \
|
||||
echo -e '\\033[1;33m NixOS System Rebuild\\033[0m'; \
|
||||
echo -e '\\033[1;32m Target: {}\\033[0m'; \
|
||||
echo ''; \
|
||||
echo -e '\\033[1;90m────────────────────────────────────────────────────────────────────────────────\\033[0m'; \
|
||||
echo ''; \
|
||||
ssh -tt {}@{} 'bash -ic {}'",
|
||||
hostname,
|
||||
self.config.ssh.rebuild_user,
|
||||
hostname,
|
||||
self.config.ssh.rebuild_alias
|
||||
);
|
||||
|
||||
std::process::Command::new("tmux")
|
||||
.arg("display-popup")
|
||||
.arg(&ssh_command)
|
||||
.arg(&logo_and_rebuild)
|
||||
.spawn()
|
||||
.ok(); // Ignore errors, tmux will handle them
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user