Enable change id only when connected

This commit is contained in:
rustdesk
2023-06-26 22:05:27 +08:00
parent fe1d8b7c83
commit 0d658963e4
3 changed files with 7 additions and 2 deletions

View File

@@ -25,8 +25,10 @@ class ServerPage extends StatefulWidget implements PageShape {
PopupMenuButton<String>(
icon: const Icon(Icons.more_vert),
itemBuilder: (context) {
final serverModel = Provider.of<ServerModel>(context);
return [
PopupMenuItem(
enabled: serverModel.connectStatus > 0,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
value: "changeID",
child: Text(translate("Change ID")),