Compiles.

This commit is contained in:
Your Name
2025-04-23 21:57:06 +12:00
parent 9a3dd18525
commit f9b67ff4c0
6 changed files with 43 additions and 50 deletions

View File

@ -51,36 +51,7 @@ std::vector<ServerInfo> get_configured_servers() {
return servers;
}
void interactive_mode() {
interactive::fullscreen_window iw("DropShell Servers");
iw.set_input_text_display("Loading all servers' status...");
auto servers = get_configured_servers();
std::vector<std::string> server_names;
for (const auto& server : servers) {
server_names.push_back(server.name);
}
list_servers();
while (true) {
std::string server_name = iw.set_input_multiple_choice("Select a server", server_names);
if (server_name.empty())
{
iw.close();
return;
}
while (!server_name.empty()) {
iw.clear_display();
show_server_details(server_name);
server_name = iw.set_input_multiple_choice("Select a server", server_names, server_name);
}
iw.clear_display();
list_servers();
}
}
void list_servers() {
auto servers = get_configured_servers();
@ -192,4 +163,39 @@ void show_server_details(const std::string& server_name) {
} // end of list services
} // end of show_server_details
void interactive_mode() {
interactive::fullscreen_window iw("DropShell Servers");
iw.set_input_text_display("Loading all servers' status...");
auto servers = get_configured_servers();
std::vector<std::string> server_names;
for (const auto& server : servers) {
server_names.push_back(server.name);
}
list_servers();
while (true) {
std::string server_name = iw.set_input_multiple_choice("Select a server", server_names);
if (server_name.empty())
{
iw.close();
return;
}
while (!server_name.empty()) {
iw.clear_display();
show_server_details(server_name);
server_name = iw.set_input_multiple_choice("Select a server", server_names, server_name);
}
iw.clear_display();
list_servers();
}
}
} // namespace dropshell