mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-20 20:43:19 +03:00
Refact. Flutter web, mid commit (#7494)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -469,7 +469,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
return buildInstallCard("", systemError, "", () {});
|
||||
}
|
||||
|
||||
if (Platform.isWindows && !bind.isDisableInstallation()) {
|
||||
if (isWindows && !bind.isDisableInstallation()) {
|
||||
if (!bind.mainIsInstalled()) {
|
||||
return buildInstallCard(
|
||||
"", bind.isOutgoingOnly() ? "" : "install_tip", "Install",
|
||||
@@ -485,7 +485,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
bind.mainUpdateMe();
|
||||
});
|
||||
}
|
||||
} else if (Platform.isMacOS) {
|
||||
} else if (isMacOS) {
|
||||
if (!(bind.isOutgoingOnly() ||
|
||||
bind.mainIsCanScreenRecording(prompt: false))) {
|
||||
return buildInstallCard("Permissions", "config_screen", "Configure",
|
||||
@@ -521,7 +521,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
// watchIsCanRecordAudio = true;
|
||||
// });
|
||||
// }
|
||||
} else if (Platform.isLinux) {
|
||||
} else if (isLinux) {
|
||||
if (bind.isOutgoingOnly()) {
|
||||
return Container();
|
||||
}
|
||||
@@ -570,7 +570,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
onPressed: () {
|
||||
SystemNavigator.pop(); // Close the application
|
||||
// https://github.com/flutter/flutter/issues/66631
|
||||
if (Platform.isWindows) {
|
||||
if (isWindows) {
|
||||
exit(0);
|
||||
}
|
||||
},
|
||||
@@ -740,7 +740,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
}
|
||||
}
|
||||
if (watchIsCanRecordAudio) {
|
||||
if (Platform.isMacOS) {
|
||||
if (isMacOS) {
|
||||
Future.microtask(() async {
|
||||
if ((await osxCanRecordAudio() ==
|
||||
PermissionAuthorizeType.authorized)) {
|
||||
|
||||
Reference in New Issue
Block a user