diff --git a/src/tui/screen_dashboard.cpp b/src/tui/screen_dashboard.cpp index 4c65a8c..f026128 100644 --- a/src/tui/screen_dashboard.cpp +++ b/src/tui/screen_dashboard.cpp @@ -309,6 +309,8 @@ Component Tui::BuildDashboardScreen() { {"a", "analyze (verify + groups)"}, {"h", "help screen"}, {"x", "export"}, + {"o", "open/run a script"}, + {"s", "save system"}, {"PgUp", "scroll up"}, {"PgDn", "scroll down"}, {"Home", "scroll top"}, diff --git a/src/tui/tui.cpp b/src/tui/tui.cpp index c8e130e..4fabcec 100644 --- a/src/tui/tui.cpp +++ b/src/tui/tui.cpp @@ -101,6 +101,23 @@ void Tui::Run() { if (e == Event::Character("a")) { screen_idx = 5; return true; } if (e == Event::Character("h")) { screen_idx = 6; return true; } if (e == Event::Character("x")) { Dispatch("export"); return true; } + if (e == Event::Character("o")) { // open / run a script + OpenFileDialog("Open script — run a .essim file", + "dashboard.source", "", {}, + [this](const std::string &path) { + Dispatch("source " + path); + }); + return true; + } + if (e == Event::Character("s")) { // save the system snapshot + if (sys) + OpenFileDialog("Save system snapshot", + "dashboard.save", "system.essim", {}, + [this](const std::string &path) { + Dispatch("save " + path); + }); + return true; + } return false; case 3: // explore