opt.: loading dialog

This commit is contained in:
lollipopkit
2024-02-29 18:12:44 +08:00
parent 2137bfbcd0
commit 183fc7f160
13 changed files with 256 additions and 224 deletions

View File

@@ -306,10 +306,13 @@ class ServerProvider extends ChangeNotifier {
// Write script to server
// by ssh
try {
await s.client?.runForOutput(ShellFunc.installShellCmd,
action: (session) async {
session.stdin.add(ShellFunc.allScript.uint8List);
}).string;
await s.client?.runForOutput(
ShellFunc.installShellCmd,
action: (session) async {
session.stdin.add(ShellFunc.allScript.uint8List);
session.stdin.close();
},
);
} on SSHAuthAbortError catch (e) {
TryLimiter.inc(sid);
s.status.err = e.toString();
@@ -387,7 +390,7 @@ class ServerProvider extends ChangeNotifier {
if (!systemType.isSegmentsLenMatch(segments.length)) {
TryLimiter.inc(sid);
s.status.err =
'Segments not match: expect ${systemType.segmentsLen}, got ${segments.length}';
'Segments not match: expect ${systemType.segmentsLen}, got ${segments.length}, raw:\n\n$raw';
_setServerState(s, ServerState.failed);
return;
}