web (#9640)
resolution, image quality, tab name, last remote id Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
6cdbcfc082
commit
af610b2408
@ -938,7 +938,7 @@ class FavoritePeerCard extends BasePeerCard {
|
||||
BuildContext context) async {
|
||||
final List<MenuEntryBase<String>> menuItems = [
|
||||
_connectAction(context),
|
||||
if (!isWeb) _transferFileAction(context),
|
||||
_transferFileAction(context),
|
||||
];
|
||||
if (isDesktop && peer.platform != kPeerPlatformAndroid) {
|
||||
menuItems.add(_tcpTunnelingAction(context));
|
||||
@ -991,7 +991,7 @@ class DiscoveredPeerCard extends BasePeerCard {
|
||||
BuildContext context) async {
|
||||
final List<MenuEntryBase<String>> menuItems = [
|
||||
_connectAction(context),
|
||||
if (!isWeb) _transferFileAction(context),
|
||||
_transferFileAction(context),
|
||||
];
|
||||
|
||||
final List favs = (await bind.mainGetFav()).toList();
|
||||
@ -1044,7 +1044,7 @@ class AddressBookPeerCard extends BasePeerCard {
|
||||
BuildContext context) async {
|
||||
final List<MenuEntryBase<String>> menuItems = [
|
||||
_connectAction(context),
|
||||
if (!isWeb) _transferFileAction(context),
|
||||
_transferFileAction(context),
|
||||
];
|
||||
if (isDesktop && peer.platform != kPeerPlatformAndroid) {
|
||||
menuItems.add(_tcpTunnelingAction(context));
|
||||
@ -1176,7 +1176,7 @@ class MyGroupPeerCard extends BasePeerCard {
|
||||
BuildContext context) async {
|
||||
final List<MenuEntryBase<String>> menuItems = [
|
||||
_connectAction(context),
|
||||
if (!isWeb) _transferFileAction(context),
|
||||
_transferFileAction(context),
|
||||
];
|
||||
if (isDesktop && peer.platform != kPeerPlatformAndroid) {
|
||||
menuItems.add(_tcpTunnelingAction(context));
|
||||
|
@ -445,7 +445,9 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||
child: GetMaterialApp(
|
||||
navigatorKey: globalKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'RustDesk',
|
||||
title: isWeb
|
||||
? '${bind.mainGetAppNameSync()} Web Client V2 (Preview)'
|
||||
: bind.mainGetAppNameSync(),
|
||||
theme: MyTheme.lightTheme,
|
||||
darkTheme: MyTheme.darkTheme,
|
||||
themeMode: MyTheme.currentThemeMode(),
|
||||
|
@ -212,6 +212,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
||||
FocusNode fieldFocusNode,
|
||||
VoidCallback onFieldSubmitted) {
|
||||
fieldTextEditingController.text = _idController.text;
|
||||
Get.put<TextEditingController>(
|
||||
fieldTextEditingController);
|
||||
fieldFocusNode.addListener(() async {
|
||||
_idEmpty.value =
|
||||
fieldTextEditingController.text.isEmpty;
|
||||
@ -352,7 +354,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
||||
);
|
||||
final child = Column(children: [
|
||||
if (isWebDesktop)
|
||||
getConnectionPageTitle(context, true).marginOnly(bottom: 10, top: 15, left: 12),
|
||||
getConnectionPageTitle(context, true)
|
||||
.marginOnly(bottom: 10, top: 15, left: 12),
|
||||
w
|
||||
]);
|
||||
return Align(
|
||||
@ -367,6 +370,9 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
||||
if (Get.isRegistered<IDTextEditingController>()) {
|
||||
Get.delete<IDTextEditingController>();
|
||||
}
|
||||
if (Get.isRegistered<TextEditingController>()) {
|
||||
Get.delete<TextEditingController>();
|
||||
}
|
||||
if (!bind.isCustomClient()) {
|
||||
platformFFI.unregisterEventHandler(
|
||||
kCheckSoftwareUpdateFinish, kCheckSoftwareUpdateFinish);
|
||||
|
@ -165,7 +165,7 @@ class WebHomePage extends StatelessWidget {
|
||||
// backgroundColor: MyTheme.grayBg,
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text(bind.mainGetAppNameSync()),
|
||||
title: Text("${bind.mainGetAppNameSync()} (Preview)"),
|
||||
actions: connectionPage.appBarActions,
|
||||
),
|
||||
body: connectionPage,
|
||||
|
@ -284,16 +284,14 @@ class RustdeskImpl {
|
||||
|
||||
Future<String?> sessionGetImageQuality(
|
||||
{required UuidValue sessionId, dynamic hint}) {
|
||||
return Future(() => js.context
|
||||
.callMethod('getByName', ['option:session', 'image_quality']));
|
||||
return Future(() => js.context.callMethod('getByName', ['image_quality']));
|
||||
}
|
||||
|
||||
Future<void> sessionSetImageQuality(
|
||||
{required UuidValue sessionId, required String value, dynamic hint}) {
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'option:session',
|
||||
jsonEncode({'name': 'image_quality', 'value': value})
|
||||
]));
|
||||
print('set image quality: $value');
|
||||
return Future(
|
||||
() => js.context.callMethod('setByName', ['image_quality', value]));
|
||||
}
|
||||
|
||||
Future<String?> sessionGetKeyboardMode(
|
||||
@ -374,17 +372,15 @@ class RustdeskImpl {
|
||||
Future<void> sessionSetCustomImageQuality(
|
||||
{required UuidValue sessionId, required int value, dynamic hint}) {
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'option:session',
|
||||
jsonEncode({'name': 'custom_image_quality', 'value': value})
|
||||
'custom_image_quality',
|
||||
value,
|
||||
]));
|
||||
}
|
||||
|
||||
Future<void> sessionSetCustomFps(
|
||||
{required UuidValue sessionId, required int fps, dynamic hint}) {
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'option:session',
|
||||
jsonEncode({'name': 'custom_fps', 'value': fps})
|
||||
]));
|
||||
return Future(
|
||||
() => js.context.callMethod('setByName', ['custom-fps', fps]));
|
||||
}
|
||||
|
||||
Future<void> sessionLockScreen({required UuidValue sessionId, dynamic hint}) {
|
||||
@ -694,7 +690,10 @@ class RustdeskImpl {
|
||||
required int height,
|
||||
dynamic hint}) {
|
||||
// note: restore on disconnected
|
||||
throw UnimplementedError("sessionChangeResolution");
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'change_resolution',
|
||||
jsonEncode({'display': display, 'width': width, 'height': height})
|
||||
]));
|
||||
}
|
||||
|
||||
Future<void> sessionSetSize(
|
||||
@ -1119,8 +1118,7 @@ class RustdeskImpl {
|
||||
}
|
||||
|
||||
Future<String> mainGetLastRemoteId({dynamic hint}) {
|
||||
return Future(
|
||||
() => js.context.callMethod('getByName', ['option', 'last_remote_id']));
|
||||
return Future(() => mainGetLocalOption(key: 'last_remote_id'));
|
||||
}
|
||||
|
||||
Future<void> mainGetSoftwareUpdateUrl({dynamic hint}) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user