better install prompt

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-03-08 11:14:29 +08:00
parent c0257bff52
commit ad32eec879
34 changed files with 106 additions and 41 deletions

View File

@ -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),

View File

@ -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 {

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", "安装驱动证书(测试证书)"),
("Virtual display requirement", "虚拟显示器需要")
("Virtual display requirement", "虚拟显示器需"),
("Continue with installing cert is checked.", "安装证书已选择,是否继续")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "Keine Übertragungen im Gange"),
("Set one-time password length", "Länge des Einmalpassworts festlegen"),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "No hay transferencias en curso"),
("Set one-time password length", "Establecer contraseña de un solo uso"),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "هیچ انتقالی در حال انجام نیست"),
("Set one-time password length", "طول رمز یکبار مصرف را تعیین کنید"),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "Nessun trasferimento in corso"),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "Geen overdrachten in uitvoering"),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "Brak transferów w toku"),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", "Передача не осуществляется"),
("Set one-time password length", "Установить длину одноразового пароля"),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}

View File

@ -462,6 +462,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No transfers in progress", ""),
("Set one-time password length", ""),
("Install driver cert(test cert)", ""),
("Virtual display requirement", "")
("Virtual display requirement", ""),
("Continue with installing cert is checked.", "")
].iter().cloned().collect();
}