rollback: write script to /dev/shm (#474)
This commit is contained in:
@@ -174,6 +174,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
||||
|
||||
Widget _buildForm() {
|
||||
final children = [
|
||||
_buildWriteScriptTip(),
|
||||
Input(
|
||||
autoFocus: true,
|
||||
controller: _nameController,
|
||||
@@ -638,4 +639,19 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
||||
|
||||
context.pop();
|
||||
}
|
||||
|
||||
Widget _buildWriteScriptTip() {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.tips_and_updates).paddingOnly(left: 13),
|
||||
title: Text(l10n.attention),
|
||||
onTap: () {
|
||||
context.showRoundDialog(
|
||||
title: l10n.attention,
|
||||
child: SimpleMarkdown(data: l10n.writeScriptTip),
|
||||
actions: Btns.oks(onTap: () => context.pop(true)),
|
||||
);
|
||||
},
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
).cardx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
Stores.setting.showSuspendTip.put(false);
|
||||
}
|
||||
srv.client?.execWithPwd(
|
||||
ShellFunc.suspend.exec(srv.id),
|
||||
ShellFunc.suspend.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
);
|
||||
@@ -370,7 +370,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
IconTextBtn(
|
||||
onPressed: () => _askFor(
|
||||
func: () => srv.client?.execWithPwd(
|
||||
ShellFunc.shutdown.exec(srv.id),
|
||||
ShellFunc.shutdown.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
),
|
||||
@@ -383,7 +383,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
IconTextBtn(
|
||||
onPressed: () => _askFor(
|
||||
func: () => srv.client?.execWithPwd(
|
||||
ShellFunc.reboot.exec(srv.id),
|
||||
ShellFunc.reboot.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user