new & opt.

- new: support suspend and WOL #172
- opt.: `execWithPwd` when cancel
- opt.: extentions
This commit is contained in:
lollipopkit
2023-09-25 18:51:14 +08:00
parent df84aeb8b2
commit 4d06a52e99
45 changed files with 251 additions and 176 deletions

View File

@@ -3,7 +3,6 @@ import 'dart:async';
import 'package:dartssh2/dartssh2.dart';
import 'package:flutter/material.dart';
import 'package:toolbox/core/extension/ssh_client.dart';
import 'package:toolbox/core/extension/stringx.dart';
import 'package:toolbox/data/model/app/shell_func.dart';
import 'package:toolbox/data/model/docker/image.dart';
import 'package:toolbox/data/model/docker/ps.dart';
@@ -175,9 +174,10 @@ class DockerProvider extends ChangeNotifier {
// judge whether to use DOCKER_HOST
String _wrap(String cmd) {
final dockerHost = Stores.docker.fetch(hostId!);
cmd = 'export LANG=en_US.UTF-8 && $cmd';
if (dockerHost == null || dockerHost.isEmpty) {
return cmd.withLangExport;
return cmd;
}
return 'export DOCKER_HOST=$dockerHost && $cmd'.withLangExport;
return 'export DOCKER_HOST=$dockerHost && $cmd';
}
}