new & opt

new: support set maxRetryCount of server reconnection
opt: server detail UI
opt: server provider
opt: `ssh` page on Android
This commit is contained in:
lollipopkit
2023-02-03 13:12:39 +08:00
parent 7837fa4339
commit 3feef3936c
20 changed files with 245 additions and 123 deletions

View File

@@ -6,9 +6,17 @@ class Server {
ServerPrivateInfo spi;
ServerStatus status;
SSHClient? client;
ServerConnectionState cs;
ServerState cs;
Server(this.spi, this.status, this.client, this.cs);
}
enum ServerConnectionState { disconnected, connecting, connected, failed }
enum ServerState {
disconnected,
connecting,
connected,
failed;
bool get shouldConnect =>
this == ServerState.disconnected || this == ServerState.failed;
}