new: remember pwd in mem
This commit is contained in:
@@ -261,6 +261,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
srv.client?.execWithPwd(
|
||||
ShellFunc.suspend.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
);
|
||||
},
|
||||
typ: l10n.suspend,
|
||||
@@ -274,6 +275,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
func: () => srv.client?.execWithPwd(
|
||||
ShellFunc.shutdown.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
),
|
||||
typ: l10n.shutdown,
|
||||
name: srv.spi.name,
|
||||
@@ -286,6 +288,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
func: () => srv.client?.execWithPwd(
|
||||
ShellFunc.reboot.exec,
|
||||
context: context,
|
||||
id: srv.id,
|
||||
),
|
||||
typ: l10n.reboot,
|
||||
name: srv.spi.name,
|
||||
|
||||
@@ -1048,6 +1048,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
return ExpandTile(
|
||||
title: Text(l10n.more),
|
||||
children: [
|
||||
_buildRememberPwdInMem(),
|
||||
_buildTextScaler(),
|
||||
_buildPreferTemperatureDeviceList(),
|
||||
_buildKeepStatusWhenErr(),
|
||||
@@ -1081,4 +1082,12 @@ class _SettingPageState extends State<SettingPage> {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildRememberPwdInMem() {
|
||||
return ListTile(
|
||||
title: Text(l10n.rememberPwdInMem),
|
||||
subtitle: Text(l10n.rememberPwdInMemTip, style: UIs.textGrey),
|
||||
trailing: StoreSwitch(prop: _setting.rememberPwdInMem),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,11 @@ Future<void> _onPkg(BuildContext context, ServerPrivateInfo spi) async {
|
||||
fn: () async {
|
||||
final updateCmd = pkg.update;
|
||||
if (updateCmd != null) {
|
||||
await client.execWithPwd(updateCmd, context: context);
|
||||
await client.execWithPwd(
|
||||
updateCmd,
|
||||
context: context,
|
||||
id: spi.id,
|
||||
);
|
||||
}
|
||||
},
|
||||
barrierDismiss: true,
|
||||
|
||||
Reference in New Issue
Block a user