#50 new: docker shell

This commit is contained in:
lollipopkit
2023-05-27 14:24:54 +08:00
parent 7a211b9a55
commit a8194319b6
13 changed files with 59 additions and 20 deletions

View File

@@ -25,7 +25,8 @@ import '../../locator.dart';
class SSHPage extends StatefulWidget {
final ServerPrivateInfo spi;
const SSHPage({Key? key, required this.spi}) : super(key: key);
final String? initCmd;
const SSHPage({Key? key, required this.spi, this.initCmd}) : super(key: key);
@override
_SSHPageState createState() => _SSHPageState();
@@ -341,6 +342,11 @@ class _SSHPageState extends State<SSHPage> {
_listen(session.stdout);
_listen(session.stderr);
if (widget.initCmd != null) {
_terminal.write(widget.initCmd!);
_terminal.keyInput(TerminalKey.enter);
}
await session.done;
if (mounted) {
context.pop();