mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-01-31 13:25:10 +01:00
fix #214
This commit is contained in:
@@ -31,7 +31,13 @@ const _echoPWD = 'echo \$PWD';
|
||||
class SSHPage extends StatefulWidget {
|
||||
final ServerPrivateInfo spi;
|
||||
final String? initCmd;
|
||||
const SSHPage({Key? key, required this.spi, this.initCmd}) : super(key: key);
|
||||
final bool pop;
|
||||
const SSHPage({
|
||||
Key? key,
|
||||
required this.spi,
|
||||
this.initCmd,
|
||||
this.pop = true,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_SSHPageState createState() => _SSHPageState();
|
||||
@@ -362,7 +368,7 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
|
||||
}
|
||||
|
||||
await session.done;
|
||||
if (mounted) {
|
||||
if (mounted && widget.pop) {
|
||||
context.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,10 @@ class _SSHTabPageState extends State<SSHTabPage>
|
||||
UIs.width7,
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
child: const Padding(padding: EdgeInsets.all(7), child: Icon(Icons.close, size: 17),),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(7),
|
||||
child: Icon(Icons.close, size: 17),
|
||||
),
|
||||
onTap: () async {
|
||||
final confirm = await context.showRoundDialog<bool>(
|
||||
title: Text(l10n.attention),
|
||||
@@ -110,6 +113,7 @@ class _SSHTabPageState extends State<SSHTabPage>
|
||||
_tabIds[name] = SSHPage(
|
||||
key: key,
|
||||
spi: spi,
|
||||
pop: false,
|
||||
);
|
||||
_tabKeys[name] = key;
|
||||
_refreshTabs();
|
||||
|
||||
Reference in New Issue
Block a user