fix: web send audit note (#9582)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-10-07 21:37:43 +08:00 committed by GitHub
parent e06f456bbd
commit 00d38260e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View File

@ -6,3 +6,11 @@ final platformFFI = PlatformFFI.instance;
final localeName = PlatformFFI.localeName;
RustdeskImpl get bind => platformFFI.ffiBind;
String ffiGetByName(String name, [String arg = '']) {
return PlatformFFI.getByName(name, arg);
}
void ffiSetByName(String name, [String value = '']) {
PlatformFFI.setByName(name, value);
}

View File

@ -2,7 +2,6 @@ import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:get/get.dart';
import 'native_model.dart' if (dart.library.html) 'web_model.dart';
import '../consts.dart';
import './platform_model.dart';
@ -83,7 +82,7 @@ class StateGlobal {
}
procFullscreenWeb() {
final isFullscreen = PlatformFFI.getByName('fullscreen') == 'Y';
final isFullscreen = ffiGetByName('fullscreen') == 'Y';
String fullscreenValue = '';
if (isFullscreen && _fullscreen.isFalse) {
fullscreenValue = 'N';
@ -91,7 +90,7 @@ class StateGlobal {
fullscreenValue = 'Y';
}
if (fullscreenValue.isNotEmpty) {
PlatformFFI.setByName('fullscreen', fullscreenValue);
ffiSetByName('fullscreen', fullscreenValue);
}
}

View File

@ -1188,7 +1188,7 @@ class RustdeskImpl {
Future<void> sessionSendNote(
{required UuidValue sessionId, required String note, dynamic hint}) {
throw UnimplementedError();
return Future(() => js.context.callMethod('setByName', ['send_note', note]));
}
Future<String> sessionAlternativeCodecs(