Skip to content

Commit

Permalink
Merge branch 'rustdesk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbo8418 authored Sep 1, 2024
2 parents 110f243 + 827efab commit 81f5d63
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
7 changes: 4 additions & 3 deletions flutter/lib/desktop/pages/desktop_setting_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1902,9 +1902,10 @@ class _AboutState extends State<_About> {
SelectionArea(
child: Text('${translate('Build Date')}: $buildDate')
.marginSymmetric(vertical: 4.0)),
SelectionArea(
child: Text('${translate('Fingerprint')}: $fingerprint')
.marginSymmetric(vertical: 4.0)),
if (!isWeb)
SelectionArea(
child: Text('${translate('Fingerprint')}: $fingerprint')
.marginSymmetric(vertical: 4.0)),
InkWell(
onTap: () {
launchUrlString('https://rustdesk.com/privacy.html');
Expand Down
16 changes: 12 additions & 4 deletions flutter/lib/web/bridge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:convert';
import 'dart:typed_data';
import 'package:flutter/foundation.dart';
import 'package:uuid/uuid.dart';
import 'dart:html' as html;

import 'package:flutter_hbb/consts.dart';

Expand Down Expand Up @@ -655,7 +656,15 @@ class RustdeskImpl {
}

String mainGetLoginDeviceInfo({dynamic hint}) {
throw UnimplementedError();
String userAgent = html.window.navigator.userAgent;
String appName = html.window.navigator.appName;
String appVersion = html.window.navigator.appVersion;
String? platform = html.window.navigator.platform;
return jsonEncode({
'os': '$userAgent, $appName $appVersion ($platform)',
'type': 'Web client',
'name': js.context.callMethod('getByName', ['my_name']),
});
}

Future<void> mainChangeId({required String newId, dynamic hint}) {
Expand Down Expand Up @@ -850,11 +859,11 @@ class RustdeskImpl {
}

Future<String> mainGetMyId({dynamic hint}) {
throw UnimplementedError();
return Future(() => js.context.callMethod('getByName', ['my_id']));
}

Future<String> mainGetUuid({dynamic hint}) {
throw UnimplementedError();
return Future(() => js.context.callMethod('getByName', ['uuid']));
}

Future<String> mainGetPeerOption(
Expand Down Expand Up @@ -1066,7 +1075,6 @@ class RustdeskImpl {
}

Future<String> mainGetFingerprint({dynamic hint}) {
// TODO: implement
return Future.value('');
}

Expand Down

0 comments on commit 81f5d63

Please sign in to comment.