mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: snippet confirmation (#363)
This commit is contained in:
@@ -127,7 +127,22 @@ void _onTapMoreBtns(
|
||||
if (snippets == null || snippets.isEmpty) return;
|
||||
final snippet = snippets.firstOrNull;
|
||||
if (snippet == null) return;
|
||||
AppRoutes.ssh(spi: spi, initCmd: snippet.fmtWith(spi)).checkGo(
|
||||
final fmted = snippet.fmtWith(spi);
|
||||
final sure = await context.showRoundDialog<bool>(
|
||||
title: l10n.attention,
|
||||
child: SingleChildScrollView(
|
||||
child: SimpleMarkdown(data: '```shell\n$fmted\n```'),
|
||||
),
|
||||
actions: [
|
||||
CountDownBtn(
|
||||
onTap: () => context.pop(true),
|
||||
text: l10n.run,
|
||||
afterColor: Colors.red,
|
||||
),
|
||||
],
|
||||
);
|
||||
if (sure != true) return;
|
||||
AppRoutes.ssh(spi: spi, initCmd: fmted).checkGo(
|
||||
context: context,
|
||||
check: () => _checkClient(context, spi.id),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user