Compiles.
This commit is contained in:
@ -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
|
Reference in New Issue
Block a user