This commit is contained in:
lollipopkit
2023-11-13 00:42:42 -06:00
parent b2f6094a1d
commit d3a6b1639c
14 changed files with 34 additions and 50 deletions

View File

@@ -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();
}
}

View File

@@ -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();