Merge pull request #3355 from 21pages/fix

add missing insertLock menu
This commit is contained in:
RustDesk 2023-02-24 19:42:36 +08:00 committed by GitHub
commit 5ee9c23fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -606,6 +606,7 @@ class _ControlMenu extends StatelessWidget {
Divider(),
ctrlAltDel(),
restart(),
insertLock(),
blockUserInput(),
switchSides(),
refresh(),
@ -789,6 +790,16 @@ class _ControlMenu extends StatelessWidget {
onPressed: () => showRestartRemoteDevice(pi, id, ffi.dialogManager));
}
insertLock() {
final perms = ffi.ffiModel.permissions;
final visible = perms['keyboard'] != false;
if (!visible) return Offstage();
return _MenuItemButton(
child: Text(translate('Insert Lock')),
ffi: ffi,
onPressed: () => bind.sessionLockScreen(id: id));
}
blockUserInput() {
final perms = ffi.ffiModel.permissions;
final pi = ffi.ffiModel.pi;