This commit is contained in:
rustdesk 2024-07-18 11:24:43 +08:00
parent e9c8ba5393
commit edc5d86ee7

View File

@ -410,9 +410,6 @@ class _DesktopHomePageState extends State<DesktopHomePage>
}
Future<Widget> buildHelpCards() async {
if (bind.mainGetLocalOption(key: 'hide-help-cards') == 'Y') {
return const SizedBox();
}
if (!bind.isCustomClient() &&
updateUrl.isNotEmpty &&
!isCardClosed &&
@ -446,14 +443,14 @@ class _DesktopHomePageState extends State<DesktopHomePage>
});
}
} else if (isMacOS) {
if (!(bind.isOutgoingOnly() ||
bind.mainIsCanScreenRecording(prompt: false))) {
final isOutgoingOnly = bind.isOutgoingOnly();
if (!(isOutgoingOnly || bind.mainIsCanScreenRecording(prompt: false))) {
return buildInstallCard("Permissions", "config_screen", "Configure",
() async {
bind.mainIsCanScreenRecording(prompt: true);
watchIsCanScreenRecording = true;
}, help: 'Help', link: translate("doc_mac_permission"));
} else if (!bind.mainIsProcessTrusted(prompt: false)) {
} else if (!isOutgoingOnly && !bind.mainIsProcessTrusted(prompt: false)) {
return buildInstallCard("Permissions", "config_acc", "Configure",
() async {
bind.mainIsProcessTrusted(prompt: true);
@ -465,7 +462,8 @@ class _DesktopHomePageState extends State<DesktopHomePage>
bind.mainIsCanInputMonitoring(prompt: true);
watchIsInputMonitoring = true;
}, help: 'Help', link: translate("doc_mac_permission"));
} else if (!svcStopped.value &&
} else if (!isOutgoingOnly &&
!svcStopped.value &&
bind.mainIsInstalled() &&
!bind.mainIsInstalledDaemon(prompt: false)) {
return buildInstallCard("", "install_daemon_tip", "Install", () async {
@ -548,6 +546,10 @@ class _DesktopHomePageState extends State<DesktopHomePage>
String? link,
bool? closeButton,
String? closeOption}) {
if (bind.mainGetLocalOption(key: 'hide-help-cards') == 'Y' &&
content != 'install_daemon_tip') {
return const SizedBox();
}
void closeCard() async {
if (closeOption != null) {
await bind.mainSetLocalOption(key: closeOption, value: 'N');