win, install cert

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-07 19:10:37 +08:00
parent 2689688da5
commit e00eaee4b5
4 changed files with 185 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
@@ -63,6 +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 showProgress = false.obs;
final RxBool btnEnabled = true.obs;
@@ -165,6 +168,20 @@ class _InstallPageBodyState extends State<_InstallPageBody>
Text(translate('Create desktop icon'))
],
),
Offstage(
offstage: !Platform.isWindows,
child: Row(
children: [
Obx(() => Checkbox(
value: driverCert.value,
onChanged: (b) {
if (b != null) driverCert.value = b;
})),
Text(
'${translate('Install driver cert')} ${translate('Virtual display requirement')}')
],
),
),
GestureDetector(
onTap: () => launchUrlString('http://rustdesk.com/privacy'),
child: Row(
@@ -230,6 +247,7 @@ class _InstallPageBodyState extends State<_InstallPageBody>
String args = '';
if (startmenu.value) args += ' startmenu';
if (desktopicon.value) args += ' desktopicon';
if (driverCert.value) args += ' driverCert';
bind.installInstallMe(options: args, path: controller.text);
}