mobile view mode menu (#8707)

* mobile add view mode menu, disable same menus as desktop
* show forbidden cursor when not view mode && no keyboard permission &&
  not show remote cursor
* hide keyboard/mouse bottom action when keyboard disabled
* fix not listen keyboard permission change
* mobile missing changing resolution and http proxy setting, will add if
  needed.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-07-14 15:04:35 +08:00 committed by GitHub
parent d0a54a6cc6
commit 3a0ece1447
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 91 additions and 37 deletions

View file

@ -192,7 +192,7 @@ class FfiModel with ChangeNotifier {
_permissions[k] = v == 'true';
});
// Only inited at remote page
if (desktopType == DesktopType.remote) {
if (parent.target?.connType == ConnType.defaultConn) {
KeyboardEnabledState.find(id).value = _permissions['keyboard'] != false;
}
debugPrint('updatePermission: $_permissions');
@ -1726,7 +1726,7 @@ class PredefinedCursor {
_image2 = img2.decodePng(base64Decode(png));
if (_image2 != null) {
// The png type of forbidden cursor image is `PngColorType.indexed`.
if (isWindows && id == kPreForbiddenCursorId) {
if (id == kPreForbiddenCursorId) {
_image2 = _image2!.convert(format: img2.Format.uint8, numChannels: 4);
}