new & fix

- new: switch of sftp `rm -rf` dir
- fix: sftp upload
- fix: sftp uploading progress
- opt.: editor will save content if is editing file
This commit is contained in:
lollipopkit
2023-08-27 00:10:01 +08:00
parent 65de4a8ca5
commit 7abadfb5a6
18 changed files with 129 additions and 74 deletions

View File

@@ -86,12 +86,12 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
],
),
);
case SftpWorkerStatus.downloading:
case SftpWorkerStatus.loading:
final percentStr = (status.progress ?? 0.0).toStringAsFixed(2);
final size = (status.size ?? 0).convertBytes;
return _wrapInCard(
status: status,
subtitle: _s.downloadStatus(percentStr, size),
subtitle: _s.percentOfSize(percentStr, size),
trailing: _buildDelete(status.fileName, status.id),
);
case SftpWorkerStatus.preparing: