Skip to content
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
1 change: 1 addition & 0 deletions flutter/build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# no obfuscate, because no easy to check errors
cd $(dirname $(dirname $(which flutter)))
git apply ~/rustdesk/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff
cd -
flutter build ipa --release
2 changes: 0 additions & 2 deletions flutter/ios_arm64.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env bash
cd $(dirname $(dirname $(which flutter)))
git apply ~/rustdesk/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff
cargo build --features flutter,hwcodec --release --target aarch64-apple-ios --lib
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
Loading