mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-23 00:24:20 +01:00
fix: sftp mission error display
This commit is contained in:
@@ -73,7 +73,7 @@ Future<SSHClient> genClient(
|
||||
privateKey: jumpPrivateKey,
|
||||
timeout: timeout,
|
||||
);
|
||||
|
||||
|
||||
return await jumpClient.forwardLocal(
|
||||
spi.ip,
|
||||
spi.port,
|
||||
|
||||
@@ -18,6 +18,7 @@ class ServerPrivateInfo {
|
||||
final String user;
|
||||
@HiveField(4)
|
||||
final String? pwd;
|
||||
|
||||
/// [id] of private key
|
||||
@HiveField(5)
|
||||
final String? keyId;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 616;
|
||||
static const int build = 618;
|
||||
static const String engine = "3.13.8";
|
||||
static const String buildAt = "2023-10-30 14:48:00";
|
||||
static const String buildAt = "2023-10-30 17:18:16";
|
||||
static const int modifications = 5;
|
||||
static const int script = 23;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
||||
|
||||
/// List in dart is passed by pointer, so you need to copy it here
|
||||
_tags.addAll(spi.tags ?? []);
|
||||
|
||||
|
||||
_altUrlController.text = spi.alterUrl ?? '';
|
||||
_autoConnect.value = spi.autoConnect ?? true;
|
||||
_jumpServer.value = spi.jumpId;
|
||||
|
||||
@@ -52,6 +52,20 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
|
||||
}
|
||||
|
||||
Widget _buildItem(SftpReqStatus status) {
|
||||
final err = status.error;
|
||||
if (err != null) {
|
||||
return _wrapInCard(
|
||||
status: status,
|
||||
subtitle: l10n.error,
|
||||
trailing: IconButton(
|
||||
onPressed: () => context.showRoundDialog(
|
||||
title: Text(l10n.error),
|
||||
child: Text(err.toString()),
|
||||
),
|
||||
icon: const Icon(Icons.error),
|
||||
),
|
||||
);
|
||||
}
|
||||
switch (status.status) {
|
||||
case SftpWorkerStatus.finished:
|
||||
final time = status.spentTime.toString();
|
||||
|
||||
Reference in New Issue
Block a user