mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-14 12:07:35 +00:00
@@ -946,7 +946,6 @@ Widget msgboxContent(String type, String title, String text) {
|
||||
void msgBoxCommon(OverlayDialogManager dialogManager, String title,
|
||||
Widget content, List<Widget> buttons,
|
||||
{bool hasCancel = true}) {
|
||||
dialogManager.dismissAll();
|
||||
dialogManager.show((setState, close) => CustomAlertDialog(
|
||||
title: Text(
|
||||
translate(title),
|
||||
|
||||
@@ -65,7 +65,7 @@ class _InstallPageBodyState extends State<_InstallPageBody>
|
||||
late final TextEditingController controller;
|
||||
final RxBool startmenu = true.obs;
|
||||
final RxBool desktopicon = true.obs;
|
||||
final RxBool driverCert = false.obs;
|
||||
final RxBool driverCert = true.obs;
|
||||
final RxBool showProgress = false.obs;
|
||||
final RxBool btnEnabled = true.obs;
|
||||
|
||||
@@ -242,13 +242,47 @@ class _InstallPageBodyState extends State<_InstallPageBody>
|
||||
}
|
||||
|
||||
void install() {
|
||||
btnEnabled.value = false;
|
||||
showProgress.value = true;
|
||||
String args = '';
|
||||
if (startmenu.value) args += ' startmenu';
|
||||
if (desktopicon.value) args += ' desktopicon';
|
||||
if (driverCert.value) args += ' driverCert';
|
||||
bind.installInstallMe(options: args, path: controller.text);
|
||||
do_install() {
|
||||
btnEnabled.value = false;
|
||||
showProgress.value = true;
|
||||
String args = '';
|
||||
if (startmenu.value) args += ' startmenu';
|
||||
if (desktopicon.value) args += ' desktopicon';
|
||||
if (driverCert.value) args += ' driverCert';
|
||||
bind.installInstallMe(options: args, path: controller.text);
|
||||
}
|
||||
|
||||
if (driverCert.isTrue) {
|
||||
final tag = 'install-info-install-cert-confirm';
|
||||
final btns = [
|
||||
dialogButton(
|
||||
'Cancel',
|
||||
onPressed: () => gFFI.dialogManager.dismissByTag(tag),
|
||||
isOutline: true,
|
||||
),
|
||||
dialogButton(
|
||||
'OK',
|
||||
onPressed: () {
|
||||
gFFI.dialogManager.dismissByTag(tag);
|
||||
do_install();
|
||||
},
|
||||
isOutline: false,
|
||||
),
|
||||
];
|
||||
gFFI.dialogManager.show(
|
||||
(setState, close) => CustomAlertDialog(
|
||||
title: null,
|
||||
content: SelectionArea(
|
||||
child: msgboxContent(
|
||||
'info', '', 'Continue with installing cert is checked.')),
|
||||
actions: btns,
|
||||
onCancel: close,
|
||||
),
|
||||
tag: tag,
|
||||
);
|
||||
} else {
|
||||
do_install();
|
||||
}
|
||||
}
|
||||
|
||||
void selectInstallPath() async {
|
||||
|
||||
Reference in New Issue
Block a user