restart device dialog
This commit is contained in:
parent
75e3f1c363
commit
7bf728bdad
@ -661,7 +661,13 @@ abstract class BasePeerCard extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return CustomAlertDialog(
|
return CustomAlertDialog(
|
||||||
title: Text(translate('Rename')),
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.edit_rounded, color: MyTheme.accent),
|
||||||
|
Text(translate('Rename')).paddingOnly(left: 10),
|
||||||
|
],
|
||||||
|
),
|
||||||
content: Column(
|
content: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -722,7 +728,18 @@ abstract class BasePeerCard extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return CustomAlertDialog(
|
return CustomAlertDialog(
|
||||||
title: Text(translate('Delete')),
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.delete_rounded,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
Text(translate('Delete')).paddingOnly(
|
||||||
|
left: 10,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
content: Column(
|
content: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -25,19 +25,32 @@ void showRestartRemoteDevice(
|
|||||||
final res =
|
final res =
|
||||||
await dialogManager.show<bool>((setState, close) => CustomAlertDialog(
|
await dialogManager.show<bool>((setState, close) => CustomAlertDialog(
|
||||||
title: Row(children: [
|
title: Row(children: [
|
||||||
Icon(Icons.warning_amber_sharp,
|
Icon(Icons.warning_rounded, color: Colors.redAccent, size: 28),
|
||||||
color: Colors.redAccent, size: 28),
|
Text(translate("Restart Remote Device")).paddingOnly(left: 10),
|
||||||
SizedBox(width: 10),
|
|
||||||
Text(translate("Restart Remote Device")),
|
|
||||||
]),
|
]),
|
||||||
content: Text(
|
content: Column(
|
||||||
"${translate('Are you sure you want to restart')} \n${pi.username}@${pi.hostname}($id) ?"),
|
children: [
|
||||||
|
Text(
|
||||||
|
"${translate('Are you sure you want to restart')} \n${pi.username}@${pi.hostname}($id) ?"),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
ElevatedButton.icon(
|
||||||
|
icon: Icon(Icons.close_rounded),
|
||||||
|
label: Text(translate("Cancel")),
|
||||||
|
onPressed: close,
|
||||||
|
),
|
||||||
|
ElevatedButton.icon(
|
||||||
|
icon: Icon(Icons.done_rounded),
|
||||||
|
label: Text(translate("Ok")),
|
||||||
|
onPressed: () => close(true),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingOnly(top: 20)
|
||||||
|
],
|
||||||
|
),
|
||||||
onCancel: close,
|
onCancel: close,
|
||||||
onSubmit: () => close(true),
|
onSubmit: () => close(true),
|
||||||
actions: [
|
|
||||||
dialogButton("Cancel", onPressed: close, isOutline: true),
|
|
||||||
dialogButton("OK", onPressed: () => close(true)),
|
|
||||||
],
|
|
||||||
));
|
));
|
||||||
if (res == true) bind.sessionRestartRemoteDevice(id: id);
|
if (res == true) bind.sessionRestartRemoteDevice(id: id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user