closeAllSubWindow before install
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
c69f4ba4a2
commit
6a0db02230
@ -336,11 +336,17 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
}
|
}
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
if (!bind.mainIsInstalled()) {
|
if (!bind.mainIsInstalled()) {
|
||||||
return buildInstallCard(
|
return buildInstallCard("", "install_tip", "Install", () async {
|
||||||
"", "install_tip", "Install", bind.mainGotoInstall);
|
await rustDeskWinManager.closeAllSubWindows();
|
||||||
|
bind.mainGotoInstall();
|
||||||
|
});
|
||||||
} else if (bind.mainIsInstalledLowerVersion()) {
|
} else if (bind.mainIsInstalledLowerVersion()) {
|
||||||
return buildInstallCard("Status", "Your installation is lower version.",
|
return buildInstallCard(
|
||||||
"Click to upgrade", bind.mainUpdateMe);
|
"Status", "Your installation is lower version.", "Click to upgrade",
|
||||||
|
() async {
|
||||||
|
await rustDeskWinManager.closeAllSubWindows();
|
||||||
|
bind.mainUpdateMe();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else if (Platform.isMacOS) {
|
} else if (Platform.isMacOS) {
|
||||||
if (!bind.mainIsCanScreenRecording(prompt: false)) {
|
if (!bind.mainIsCanScreenRecording(prompt: false)) {
|
||||||
@ -384,7 +390,10 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
|
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
|
||||||
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
|
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
|
||||||
LinuxCards.add(buildInstallCard(
|
LinuxCards.add(buildInstallCard(
|
||||||
"Warning", "selinux_tip", "", () async {},
|
"Warning",
|
||||||
|
"selinux_tip",
|
||||||
|
"",
|
||||||
|
() async {},
|
||||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||||
help: 'Help',
|
help: 'Help',
|
||||||
link:
|
link:
|
||||||
@ -418,7 +427,11 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
|
|
||||||
Widget buildInstallCard(String title, String content, String btnText,
|
Widget buildInstallCard(String title, String content, String btnText,
|
||||||
GestureTapCallback onPressed,
|
GestureTapCallback onPressed,
|
||||||
{double marginTop = 20.0, String? help, String? link, bool? closeButton, String? closeOption}) {
|
{double marginTop = 20.0,
|
||||||
|
String? help,
|
||||||
|
String? link,
|
||||||
|
bool? closeButton,
|
||||||
|
String? closeOption}) {
|
||||||
void closeCard() async {
|
void closeCard() async {
|
||||||
if (closeOption != null) {
|
if (closeOption != null) {
|
||||||
await bind.mainSetLocalOption(key: closeOption, value: 'N');
|
await bind.mainSetLocalOption(key: closeOption, value: 'N');
|
||||||
@ -502,7 +515,8 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
child: Text(
|
child: Text(
|
||||||
translate(help),
|
translate(help),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
decoration: TextDecoration.underline,
|
decoration:
|
||||||
|
TextDecoration.underline,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12),
|
fontSize: 12),
|
||||||
)).marginOnly(top: 6)),
|
)).marginOnly(top: 6)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user