8000 [pull] master from rustdesk:master by pull[bot] · Pull Request #340 · admarty/rustdesk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] master from rustdesk:master #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
8000
merged 2 commits into from
May 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions flutter/lib/common/hbbs/hbbs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ class UserPayload {
String name = '';
String email = '';
String note = '';
String? verifier;
UserStatus status;
bool isAdmin = false;

UserPayload.fromJson(Map<String, dynamic> json)
: name = json['name'] ?? '',
email = json['email'] ?? '',
note = json['note'] ?? '',
verifier = json['verifier'],
status = json['status'] == 0
? UserStatus.kDisabled
: json['status'] == -1
Expand Down
18 changes: 13 additions & 5 deletions flutter/lib/models/ab_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,10 @@ abstract class BaseAb {

final pullError = "".obs;
final pushError = "".obs;
final abLoading = false.obs;
final abLoading = false
.obs; // Indicates whether the UI should show a loading state for the address book.
var abPulling =
false; // Tracks whether a pull operation is currently in progress to prevent concurrent pulls. Unlike abLoading, this is not tied to UI updates.
bool initialized = false;

String name();
Expand All @@ -790,17 +793,22 @@ abstract class BaseAb {
}

Future<void> pullAb({quiet = false}) async {
debugPrint("pull ab \"${name()}\"");
if (abLoading.value) return;
if (abPulling) return;
abPulling = true;
if (!quiet) {
abLoading.value = true;
pullError.value = "";
}
initialized = false;
debugPrint("pull ab \"${name()}\"");
try {
initialized = await pullAbImpl(quiet: quiet);
} catch (_) {}
abLoading.value = false;
} catch (e) {
debugPrint("Error occurred while pulling address book: $e");
} finally {
abLoading.value = false;
abPulling = false;
}
}

Future<bool> pullAbImpl({quiet = false});
Expand Down
4 changes: 4 additions & 0 deletions flutter/lib/models/user_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ class UserModel {
userName.value = user.name;
isAdmin.value = user.isAdmin;
bind.mainSetLocalOption(key: 'user_info', value: jsonEncode(user));
if (isWeb) {
// ugly here, tmp solution
bind.mainSetLocalOption(key: 'verifier', value: user.verifier ?? '');
}
}

// update ab and group status
Expand Down
8 changes: 8 additions & 0 deletions flutter/lib/models/web_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'dart:html';
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter_hbb/common/widgets/login.dart';
import 'package:flutter_hbb/models/state_model.dart';

import 'package:flutter_hbb/web/bridge.dart';
Expand Down Expand Up @@ -113,6 +114,13 @@ class PlatformFFI {
context["onInitFinished"] = () {
completer.complete();
};
context['loginDialog'] = () {
loginDialog();
};
context['closeConnection'] = () {
gFFI.dialogManager.dismissAll();
closeConnection();
};
context.callMethod('init');
version = getByName('version');
window.onContextMenu.listen((event) {
Expand Down
10 changes: 10 additions & 0 deletions flutter/lib/web/bridge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ class RustdeskImpl {
]));
}

Future<int?> sessionGetTrackpadSpeed(
{required UuidValue sessionId, dynamic hint}) {
throw UnimplementedError("sessionGetTrackpadSpeed");
}

Future<void> sessionSetTrackpadSpeed(
{required UuidValue sessionId, required int value, dynamic hint}) {
throw UnimplementedError("sessionSetTrackpadSpeed");
}

Future<String?> sessionGetScrollStyle(
{required UuidValue sessionId, dynamic hint}) {
return Future(() =>
Expand Down
0