Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
9284850d
Commit
9284850d
authored
Sep 21, 2022
by
csf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into mobile_feat_update_rebase
parents
9e6e8422
3101c4e1
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
404 additions
and
729 deletions
+404
-729
analysis_options.yaml
flutter/analysis_options.yaml
+3
-26
common.dart
flutter/lib/common.dart
+30
-2
id_formatter.dart
flutter/lib/common/formatter/id_formatter.dart
+1
-0
peer_widget.dart
flutter/lib/common/widgets/peer_widget.dart
+52
-48
consts.dart
flutter/lib/consts.dart
+7
-0
connection_page.dart
flutter/lib/desktop/pages/connection_page.dart
+51
-34
desktop_home_page.dart
flutter/lib/desktop/pages/desktop_home_page.dart
+23
-457
desktop_tab_page.dart
flutter/lib/desktop/pages/desktop_tab_page.dart
+26
-22
file_manager_tab_page.dart
flutter/lib/desktop/pages/file_manager_tab_page.dart
+19
-13
port_forward_tab_page.dart
flutter/lib/desktop/pages/port_forward_tab_page.dart
+22
-16
remote_tab_page.dart
flutter/lib/desktop/pages/remote_tab_page.dart
+61
-57
scroll_wrapper.dart
flutter/lib/desktop/widgets/scroll_wrapper.dart
+26
-0
main.dart
flutter/lib/main.dart
+36
-5
ab_model.dart
flutter/lib/models/ab_model.dart
+12
-6
CMakeLists.txt
flutter/linux/CMakeLists.txt
+1
-1
my_application.cc
flutter/linux/my_application.cc
+1
-1
AppInfo.xcconfig
flutter/macos/Runner/Configs/AppInfo.xcconfig
+1
-1
pubspec.lock
flutter/pubspec.lock
+18
-6
pubspec.yaml
flutter/pubspec.yaml
+10
-0
widget_test.dart
flutter/test/widget_test.dart
+0
-30
CMakeLists.txt
flutter/windows/CMakeLists.txt
+1
-1
main.cpp
flutter/windows/runner/main.cpp
+1
-1
cn.rs
src/lang/cn.rs
+2
-2
No files found.
flutter/analysis_options.yaml
View file @
9284850d
# This file configures the analyzer, which statically analyzes Dart code to
include
:
package:lints/recommended.yaml
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include
:
package:flutter_lints/flutter.yaml
linter
:
linter
:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules
:
rules
:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
non_constant_identifier_names
:
false
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
sort_child_properties_last
:
false
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
flutter/lib/common.dart
View file @
9284850d
...
@@ -244,6 +244,32 @@ final ButtonStyle flatButtonStyle = TextButton.styleFrom(
...
@@ -244,6 +244,32 @@ final ButtonStyle flatButtonStyle = TextButton.styleFrom(
),
),
);
);
List
<
Locale
>
supportedLocales
=
const
[
// specify CN/TW to fix CJK issue in flutter
Locale
(
'zh'
,
'CN'
),
Locale
(
'zh'
,
'TW'
),
Locale
(
'zh'
,
'SG'
),
Locale
(
'fr'
),
Locale
(
'de'
),
Locale
(
'it'
),
Locale
(
'ja'
),
Locale
(
'cs'
),
Locale
(
'pl'
),
Locale
(
'ko'
),
Locale
(
'hu'
),
Locale
(
'pt'
),
Locale
(
'ru'
),
Locale
(
'sk'
),
Locale
(
'id'
),
Locale
(
'da'
),
Locale
(
'eo'
),
Locale
(
'tr'
),
Locale
(
'vi'
),
Locale
(
'pl'
),
Locale
(
'kz'
),
Locale
(
'en'
,
'US'
),
];
String
formatDurationToTime
(
Duration
duration
)
{
String
formatDurationToTime
(
Duration
duration
)
{
var
totalTime
=
duration
.
inSeconds
;
var
totalTime
=
duration
.
inSeconds
;
final
secs
=
totalTime
%
60
;
final
secs
=
totalTime
%
60
;
...
@@ -734,8 +760,9 @@ class PermissionManager {
...
@@ -734,8 +760,9 @@ class PermissionManager {
if
(
isDesktop
)
{
if
(
isDesktop
)
{
return
Future
.
value
(
true
);
return
Future
.
value
(
true
);
}
}
if
(!
permissions
.
contains
(
type
))
if
(!
permissions
.
contains
(
type
))
{
return
Future
.
error
(
"Wrong permission!
$type
"
);
return
Future
.
error
(
"Wrong permission!
$type
"
);
}
return
gFFI
.
invokeMethod
(
"check_permission"
,
type
);
return
gFFI
.
invokeMethod
(
"check_permission"
,
type
);
}
}
...
@@ -743,8 +770,9 @@ class PermissionManager {
...
@@ -743,8 +770,9 @@ class PermissionManager {
if
(
isDesktop
)
{
if
(
isDesktop
)
{
return
Future
.
value
(
true
);
return
Future
.
value
(
true
);
}
}
if
(!
permissions
.
contains
(
type
))
if
(!
permissions
.
contains
(
type
))
{
return
Future
.
error
(
"Wrong permission!
$type
"
);
return
Future
.
error
(
"Wrong permission!
$type
"
);
}
gFFI
.
invokeMethod
(
"request_permission"
,
type
);
gFFI
.
invokeMethod
(
"request_permission"
,
type
);
if
(
type
==
"ignore_battery_optimizations"
)
{
if
(
type
==
"ignore_battery_optimizations"
)
{
...
...
flutter/lib/common/formatter/id_formatter.dart
View file @
9284850d
...
@@ -33,6 +33,7 @@ class IDTextInputFormatter extends TextInputFormatter {
...
@@ -33,6 +33,7 @@ class IDTextInputFormatter extends TextInputFormatter {
String
formatID
(
String
id
)
{
String
formatID
(
String
id
)
{
String
id2
=
id
.
replaceAll
(
' '
,
''
);
String
id2
=
id
.
replaceAll
(
' '
,
''
);
if
(
int
.
tryParse
(
id2
)
==
null
)
return
id
;
String
newID
=
''
;
String
newID
=
''
;
if
(
id2
.
length
<=
3
)
{
if
(
id2
.
length
<=
3
)
{
newID
=
id2
;
newID
=
id2
;
...
...
flutter/lib/common/widgets/peer_widget.dart
View file @
9284850d
...
@@ -2,6 +2,7 @@ import 'dart:async';
...
@@ -2,6 +2,7 @@ import 'dart:async';
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_hbb/desktop/widgets/scroll_wrapper.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'package:visibility_detector/visibility_detector.dart'
;
import
'package:visibility_detector/visibility_detector.dart'
;
...
@@ -41,6 +42,7 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
...
@@ -41,6 +42,7 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
static
const
int
_maxQueryCount
=
3
;
static
const
int
_maxQueryCount
=
3
;
final
space
=
isDesktop
?
12.0
:
8.0
;
final
space
=
isDesktop
?
12.0
:
8.0
;
final
_curPeers
=
<
String
>{};
final
_curPeers
=
<
String
>{};
final
_scrollController
=
ScrollController
();
var
_lastChangeTime
=
DateTime
.
now
();
var
_lastChangeTime
=
DateTime
.
now
();
var
_lastQueryPeers
=
<
String
>{};
var
_lastQueryPeers
=
<
String
>{};
var
_lastQueryTime
=
DateTime
.
now
().
subtract
(
const
Duration
(
hours:
1
));
var
_lastQueryTime
=
DateTime
.
now
().
subtract
(
const
Duration
(
hours:
1
));
...
@@ -94,57 +96,59 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
...
@@ -94,57 +96,59 @@ class _PeerWidgetState extends State<_PeerWidget> with WindowListener {
?
Center
(
?
Center
(
child:
Text
(
translate
(
"Empty"
)),
child:
Text
(
translate
(
"Empty"
)),
)
)
:
SingleChildScrollView
(
:
DesktopScrollWrapper
(
controller:
ScrollController
(),
scrollController:
_scrollController
,
child:
ObxValue
<
RxString
>((
searchText
)
{
child:
SingleChildScrollView
(
return
FutureBuilder
<
List
<
Peer
>>(
physics:
NeverScrollableScrollPhysics
(),
builder:
(
context
,
snapshot
)
{
controller:
_scrollController
,
if
(
snapshot
.
hasData
)
{
child:
ObxValue
<
RxString
>((
searchText
)
{
final
peers
=
snapshot
.
data
!;
return
FutureBuilder
<
List
<
Peer
>>(
final
cards
=
<
Widget
>[];
builder:
(
context
,
snapshot
)
{
for
(
final
peer
in
peers
)
{
if
(
snapshot
.
hasData
)
{
final
visibilityChild
=
VisibilityDetector
(
final
peers
=
snapshot
.
data
!;
key:
ValueKey
(
peer
.
id
),
final
cards
=
<
Widget
>[];
onVisibilityChanged:
(
info
)
{
for
(
final
peer
in
peers
)
{
final
peerId
=
(
info
.
key
as
ValueKey
).
value
;
cards
.
add
(
Offstage
(
if
(
info
.
visibleFraction
>
0.00001
)
{
key:
ValueKey
(
"off
${peer.id}
"
),
_curPeers
.
add
(
peerId
);
offstage:
widget
.
offstageFunc
(
peer
),
}
else
{
child:
Obx
(
_curPeers
.
remove
(
peerId
);
()
=>
SizedBox
(
}
width:
220
,
_lastChangeTime
=
DateTime
.
now
();
height:
},
peerCardUiType
.
value
==
PeerUiType
.
grid
child:
widget
.
peerCardWidgetFunc
(
peer
),
);
cards
.
add
(
Offstage
(
key:
ValueKey
(
"off
${peer.id}
"
),
offstage:
widget
.
offstageFunc
(
peer
),
child:
isDesktop
?
Obx
(
()
=>
SizedBox
(
width:
220
,
height:
peerCardUiType
.
value
==
PeerUiType
.
grid
?
140
?
140
:
42
,
:
42
,
child:
visibilityChild
,
child:
VisibilityDetector
(
),
key:
ValueKey
(
peer
.
id
),
)
onVisibilityChanged:
(
info
)
{
:
SizedBox
(
final
peerId
=
width:
mobileWidth
,
(
info
.
key
as
ValueKey
).
value
;
child:
visibilityChild
)));
if
(
info
.
visibleFraction
>
0.00001
)
{
_curPeers
.
add
(
peerId
);
}
else
{
_curPeers
.
remove
(
peerId
);
}
_lastChangeTime
=
DateTime
.
now
();
},
child:
widget
.
peerCardWidgetFunc
(
peer
),
),
),
)));
}
return
Wrap
(
spacing:
space
,
runSpacing:
space
,
children:
cards
);
}
else
{
return
const
Center
(
child:
CircularProgressIndicator
(),
);
}
}
return
Wrap
(
},
spacing:
space
,
runSpacing:
space
,
children:
cards
);
future:
matchPeers
(
searchText
.
value
,
peers
.
peers
),
}
else
{
);
return
const
Center
(
},
peerSearchText
),
child:
CircularProgressIndicator
(),
),
);
}
},
future:
matchPeers
(
searchText
.
value
,
peers
.
peers
),
);
},
peerSearchText
),
),
),
),
),
);
);
...
...
flutter/lib/consts.dart
View file @
9284850d
...
@@ -17,6 +17,13 @@ const int kMobileDefaultDisplayHeight = 1280;
...
@@ -17,6 +17,13 @@ const int kMobileDefaultDisplayHeight = 1280;
const
int
kDesktopDefaultDisplayWidth
=
1080
;
const
int
kDesktopDefaultDisplayWidth
=
1080
;
const
int
kDesktopDefaultDisplayHeight
=
720
;
const
int
kDesktopDefaultDisplayHeight
=
720
;
/// [kDefaultScrollAmountMultiplier] indicates how many rows can be scrolled after a minimum scroll action of mouse
const
kDefaultScrollAmountMultiplier
=
5.0
;
const
kDefaultScrollDuration
=
Duration
(
milliseconds:
50
);
const
kDefaultMouseWhellThrottleDuration
=
Duration
(
milliseconds:
50
);
const
kFullScreenEdgeSize
=
0.0
;
const
kWindowEdgeSize
=
1.0
;
const
kInvalidValueStr
=
"InvalidValueStr"
;
const
kInvalidValueStr
=
"InvalidValueStr"
;
const
kMobilePageConstraints
=
BoxConstraints
(
maxWidth:
600
);
const
kMobilePageConstraints
=
BoxConstraints
(
maxWidth:
600
);
...
...
flutter/lib/desktop/pages/connection_page.dart
View file @
9284850d
// main window right pane
import
'dart:async'
;
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:convert'
;
...
@@ -82,8 +84,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -82,8 +84,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
).
marginSymmetric
(
horizontal:
22
),
).
marginSymmetric
(
horizontal:
22
),
),
),
const
Divider
(),
const
Divider
(),
SizedBox
(
height:
50
,
child:
Obx
(()
=>
buildStatus
()))
SizedBox
(
child:
Obx
(()
=>
buildStatus
()))
.
padding
Symmetric
(
horizontal:
12.0
)
.
padding
Only
(
bottom:
12
,
top:
6
),
]),
]),
);
);
}
}
...
@@ -187,7 +189,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -187,7 +189,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
onConnect
(
isFileTransfer:
true
);
onConnect
(
isFileTransfer:
true
);
},
},
child:
Container
(
child:
Container
(
height:
2
4
,
height:
2
7
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
ftPressed
.
value
color:
ftPressed
.
value
...
@@ -224,31 +226,36 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -224,31 +226,36 @@ class _ConnectionPageState extends State<ConnectionPage> {
onTapCancel:
()
=>
connPressed
.
value
=
false
,
onTapCancel:
()
=>
connPressed
.
value
=
false
,
onHover:
(
value
)
=>
connHover
.
value
=
value
,
onHover:
(
value
)
=>
connHover
.
value
=
value
,
onTap:
onConnect
,
onTap:
onConnect
,
child:
Container
(
child:
ConstrainedBox
(
height:
24
,
constraints:
BoxConstraints
(
decoration:
BoxDecoration
(
minWidth:
80.0
,
color:
connPressed
.
value
?
MyTheme
.
accent
:
MyTheme
.
button
,
border:
Border
.
all
(
color:
connPressed
.
value
?
MyTheme
.
accent
:
connHover
.
value
?
MyTheme
.
hoverBorder
:
MyTheme
.
button
,
),
),
borderRadius:
BorderRadius
.
circular
(
5
),
child:
Container
(
),
height:
27
,
child:
Center
(
decoration:
BoxDecoration
(
child:
Text
(
color:
connPressed
.
value
translate
(
?
MyTheme
.
accent
"Connect"
,
:
MyTheme
.
button
,
border:
Border
.
all
(
color:
connPressed
.
value
?
MyTheme
.
accent
:
connHover
.
value
?
MyTheme
.
hoverBorder
:
MyTheme
.
button
,
),
borderRadius:
BorderRadius
.
circular
(
5
),
),
),
style:
TextStyle
(
child:
Center
(
fontSize:
12
,
color:
MyTheme
.
color
(
context
).
bg
),
child:
Text
(
),
translate
(
).
marginSymmetric
(
horizontal:
12
),
"Connect"
,
),
),
style:
TextStyle
(
fontSize:
12
,
color:
MyTheme
.
color
(
context
).
bg
),
),
).
marginSymmetric
(
horizontal:
12
),
)),
),
),
),
),
],
],
...
@@ -275,6 +282,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -275,6 +282,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
var
svcIsUsingPublicServer
=
true
.
obs
;
var
svcIsUsingPublicServer
=
true
.
obs
;
Widget
buildStatus
()
{
Widget
buildStatus
()
{
final
fontSize
=
14.0
;
final
textStyle
=
TextStyle
(
fontSize:
fontSize
);
final
light
=
Container
(
final
light
=
Container
(
height:
8
,
height:
8
,
width:
8
,
width:
8
,
...
@@ -282,13 +291,13 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -282,13 +291,13 @@ class _ConnectionPageState extends State<ConnectionPage> {
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
color:
svcStopped
.
value
?
Colors
.
redAccent
:
Colors
.
green
,
color:
svcStopped
.
value
?
Colors
.
redAccent
:
Colors
.
green
,
),
),
).
paddingSymmetric
(
horizontal:
1
0
.0
);
).
paddingSymmetric
(
horizontal:
1
2
.0
);
if
(
svcStopped
.
value
)
{
if
(
svcStopped
.
value
)
{
return
Row
(
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
light
,
light
,
Text
(
translate
(
"Service is not running"
)),
Text
(
translate
(
"Service is not running"
)
,
style:
textStyle
),
TextButton
(
TextButton
(
onPressed:
()
async
{
onPressed:
()
async
{
bool
checked
=
await
bind
.
mainCheckSuperUserPermission
();
bool
checked
=
await
bind
.
mainCheckSuperUserPermission
();
...
@@ -296,19 +305,25 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -296,19 +305,25 @@ class _ConnectionPageState extends State<ConnectionPage> {
bind
.
mainSetOption
(
key:
"stop-service"
,
value:
""
);
bind
.
mainSetOption
(
key:
"stop-service"
,
value:
""
);
}
}
},
},
child:
Text
(
translate
(
"Start Service"
)))
child:
Text
(
translate
(
"Start Service"
)
,
style:
textStyle
))
],
],
);
);
}
else
{
}
else
{
if
(
svcStatusCode
.
value
==
0
)
{
if
(
svcStatusCode
.
value
==
0
)
{
return
Row
(
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
light
,
Text
(
translate
(
"connecting_status"
))],
children:
[
light
,
Text
(
translate
(
"connecting_status"
),
style:
textStyle
)
],
);
);
}
else
if
(
svcStatusCode
.
value
==
-
1
)
{
}
else
if
(
svcStatusCode
.
value
==
-
1
)
{
return
Row
(
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
light
,
Text
(
translate
(
"not_ready_status"
))],
children:
[
light
,
Text
(
translate
(
"not_ready_status"
),
style:
textStyle
)
],
);
);
}
}
}
}
...
@@ -316,13 +331,15 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -316,13 +331,15 @@ class _ConnectionPageState extends State<ConnectionPage> {
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
light
,
light
,
Text
(
translate
(
'Ready'
)),
Text
(
translate
(
'Ready'
),
style:
textStyle
),
Text
(
', '
,
style:
textStyle
),
svcIsUsingPublicServer
.
value
svcIsUsingPublicServer
.
value
?
InkWell
(
?
InkWell
(
onTap:
onUsePublicServerGuide
,
onTap:
onUsePublicServerGuide
,
child:
Text
(
child:
Text
(
',
${translate('setup_server_tip')}
'
,
translate
(
'setup_server_tip'
),
style:
TextStyle
(
decoration:
TextDecoration
.
underline
),
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
fontSize:
fontSize
),
),
),
)
)
:
Offstage
()
:
Offstage
()
...
...
flutter/lib/desktop/pages/desktop_home_page.dart
View file @
9284850d
This diff is collapsed.
Click to expand it.
flutter/lib/desktop/pages/desktop_tab_page.dart
View file @
9284850d
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/consts.dart'
;
import
'package:flutter_hbb/consts.dart'
;
...
@@ -35,28 +37,30 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
...
@@ -35,28 +37,30 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
RxBool
fullscreen
=
false
.
obs
;
RxBool
fullscreen
=
false
.
obs
;
Get
.
put
(
fullscreen
,
tag:
'fullscreen'
);
Get
.
put
(
fullscreen
,
tag:
'fullscreen'
);
return
Obx
(()
=>
DragToResizeArea
(
final
tabWidget
=
Container
(
resizeEdgeSize:
fullscreen
.
value
?
1.0
:
8.0
,
child:
Overlay
(
initialEntries:
[
child:
Container
(
OverlayEntry
(
builder:
(
context
)
{
decoration:
BoxDecoration
(
gFFI
.
dialogManager
.
setOverlayState
(
Overlay
.
of
(
context
));
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
return
Scaffold
(
child:
Overlay
(
initialEntries:
[
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
OverlayEntry
(
builder:
(
context
)
{
body:
DesktopTab
(
gFFI
.
dialogManager
.
setOverlayState
(
Overlay
.
of
(
context
));
controller:
tabController
,
return
Scaffold
(
tail:
ActionIcon
(
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
message:
'Settings'
,
body:
DesktopTab
(
icon:
IconFont
.
menu
,
controller:
tabController
,
onTap:
onAddSetting
,
tail:
ActionIcon
(
isClose:
false
,
message:
'Settings'
,
),
icon:
IconFont
.
menu
,
));
onTap:
onAddSetting
,
})
isClose:
false
,
]),
),
);
));
return
Platform
.
isMacOS
})
?
tabWidget
]),
:
Obx
(()
=>
DragToResizeArea
(
)));
resizeEdgeSize:
fullscreen
.
value
?
kFullScreenEdgeSize
:
kWindowEdgeSize
,
child:
tabWidget
));
}
}
void
onAddSetting
()
{
void
onAddSetting
()
{
...
...
flutter/lib/desktop/pages/file_manager_tab_page.dart
View file @
9284850d
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/consts.dart'
;
import
'package:flutter_hbb/desktop/pages/file_manager_page.dart'
;
import
'package:flutter_hbb/desktop/pages/file_manager_page.dart'
;
import
'package:flutter_hbb/desktop/widgets/tabbar_widget.dart'
;
import
'package:flutter_hbb/desktop/widgets/tabbar_widget.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
...
@@ -66,20 +68,24 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
...
@@ -66,20 +68,24 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
SubWindowDragToResizeArea
(
final
tabWidget
=
Container
(
windowId:
windowId
(),
decoration:
BoxDecoration
(
child:
Container
(
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
decoration:
BoxDecoration
(
child:
Scaffold
(
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
child:
Scaffold
(
body:
DesktopTab
(
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
controller:
tabController
,
body:
DesktopTab
(
onWindowCloseButton:
handleWindowCloseButton
,
controller:
tabController
,
tail:
const
AddButton
().
paddingOnly
(
left:
10
),
onWindowCloseButton:
handleWindowCloseButton
,
)),
tail:
const
AddButton
().
paddingOnly
(
left:
10
),
)),
),
);
);
return
Platform
.
isMacOS
?
tabWidget
:
SubWindowDragToResizeArea
(
resizeEdgeSize:
kWindowEdgeSize
,
windowId:
windowId
(),
child:
tabWidget
,
);
}
}
void
onRemoveId
(
String
id
)
{
void
onRemoveId
(
String
id
)
{
...
...
flutter/lib/desktop/pages/port_forward_tab_page.dart
View file @
9284850d
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/common.dart'
;
import
'package:flutter_hbb/consts.dart'
;
import
'package:flutter_hbb/desktop/pages/port_forward_page.dart'
;
import
'package:flutter_hbb/desktop/pages/port_forward_page.dart'
;
import
'package:flutter_hbb/desktop/widgets/tabbar_widget.dart'
;
import
'package:flutter_hbb/desktop/widgets/tabbar_widget.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
...
@@ -74,23 +76,27 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
...
@@ -74,23 +76,27 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
SubWindowDragToResizeArea
(
final
tabWidget
=
Container
(
windowId:
windowId
(),
decoration:
BoxDecoration
(
child:
Container
(
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
decoration:
BoxDecoration
(
child:
Scaffold
(
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
child:
Scaffold
(
body:
DesktopTab
(
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
controller:
tabController
,
body:
DesktopTab
(
onWindowCloseButton:
()
async
{
controller:
tabController
,
tabController
.
clear
();
onWindowCloseButton:
()
async
{
return
true
;
tabController
.
clear
();
},
return
true
;
tail:
AddButton
().
paddingOnly
(
left:
10
),
},
)),
tail:
AddButton
().
paddingOnly
(
left:
10
),
)),
),
);
);
return
Platform
.
isMacOS
?
tabWidget
:
SubWindowDragToResizeArea
(
resizeEdgeSize:
kWindowEdgeSize
,
windowId:
windowId
(),
child:
tabWidget
,
);
}
}
void
onRemoveId
(
String
id
)
{
void
onRemoveId
(
String
id
)
{
...
...
flutter/lib/desktop/pages/remote_tab_page.dart
View file @
9284850d
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:desktop_multi_window/desktop_multi_window.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -86,63 +87,66 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
...
@@ -86,63 +87,66 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
RxBool
fullscreen
=
Get
.
find
(
tag:
'fullscreen'
);
final
RxBool
fullscreen
=
Get
.
find
(
tag:
'fullscreen'
);
return
Obx
(()
=>
SubWindowDragToResizeArea
(
final
tabWidget
=
Container
(
resizeEdgeSize:
fullscreen
.
value
?
1.0
:
8.0
,
decoration:
BoxDecoration
(
windowId:
windowId
(),
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
child:
Container
(
child:
Scaffold
(
decoration:
BoxDecoration
(
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
border:
Border
.
all
(
color:
MyTheme
.
color
(
context
).
border
!)),
body:
DesktopTab
(
child:
Scaffold
(
controller:
tabController
,
backgroundColor:
MyTheme
.
color
(
context
).
bg
,
showTabBar:
fullscreen
.
isFalse
,
body:
DesktopTab
(
onWindowCloseButton:
handleWindowCloseButton
,
controller:
tabController
,
tail:
const
AddButton
().
paddingOnly
(
left:
10
),
showTabBar:
fullscreen
.
isFalse
,
pageViewBuilder:
(
pageView
)
{
onWindowCloseButton:
handleWindowCloseButton
,
WindowController
.
fromWindowId
(
windowId
())
tail:
const
AddButton
().
paddingOnly
(
left:
10
),
.
setFullscreen
(
fullscreen
.
isTrue
);
pageViewBuilder:
(
pageView
)
{
return
pageView
;
WindowController
.
fromWindowId
(
windowId
())
},
.
setFullscreen
(
fullscreen
.
isTrue
);
tabBuilder:
(
key
,
icon
,
label
,
themeConf
)
=>
Obx
(()
{
return
pageView
;
final
connectionType
=
ConnectionTypeState
.
find
(
key
);
},
if
(!
connectionType
.
isValid
())
{
tabBuilder:
(
key
,
icon
,
label
,
themeConf
)
=>
Obx
(()
{
return
Row
(
final
connectionType
=
ConnectionTypeState
.
find
(
key
);
mainAxisAlignment:
MainAxisAlignment
.
center
,
if
(!
connectionType
.
isValid
())
{
children:
[
return
Row
(
icon
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
label
,
children:
[
],
icon
,
);
label
,
}
else
{
],
final
msgDirect
=
translate
(
);
connectionType
.
direct
.
value
==
ConnectionType
.
strDirect
}
else
{
?
'Direct Connection'
final
msgDirect
=
translate
(
connectionType
.
direct
.
value
==
:
'Relay Connection'
);
ConnectionType
.
strDirect
final
msgSecure
=
translate
(
?
'Direct Connection'
connectionType
.
secure
.
value
==
ConnectionType
.
strSecure
:
'Relay Connection'
);
?
'Secure Connection'
final
msgSecure
=
translate
(
connectionType
.
secure
.
value
==
:
'Insecure Connection'
);
ConnectionType
.
strSecure
return
Row
(
?
'Secure Connection'
mainAxisAlignment:
MainAxisAlignment
.
center
,
:
'Insecure Connection'
);
children:
[
return
Row
(
icon
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
Tooltip
(
children:
[
message:
'
$msgDirect
\n
$msgSecure
'
,
icon
,
child:
Image
.
asset
(
Tooltip
(
'assets/
${connectionType.secure.value}${connectionType.direct.value}
.png'
,
message:
'
$msgDirect
\n
$msgSecure
'
,
width:
themeConf
.
iconSize
,
child:
Image
.
asset
(
height:
themeConf
.
iconSize
,
'assets/
${connectionType.secure.value}${connectionType.direct.value}
.png'
,
).
paddingOnly
(
right:
5
),
width:
themeConf
.
iconSize
,
),
height:
themeConf
.
iconSize
,
label
,
).
paddingOnly
(
right:
5
),
],
),
);
label
,
}
],
}),
);
)),
}
);
}),
return
Platform
.
isMacOS
)),
?
tabWidget
),
:
Obx
(()
=>
SubWindowDragToResizeArea
(
));
resizeEdgeSize:
fullscreen
.
value
?
kFullScreenEdgeSize
:
kWindowEdgeSize
,
windowId:
windowId
(),
child:
tabWidget
));
}
}
void
onRemoveId
(
String
id
)
{
void
onRemoveId
(
String
id
)
{
...
...
flutter/lib/desktop/widgets/scroll_wrapper.dart
0 → 100644
View file @
9284850d
import
'package:flutter/widgets.dart'
;
import
'package:flutter_hbb/consts.dart'
;
import
'package:flutter_improved_scrolling/flutter_improved_scrolling.dart'
;
class
DesktopScrollWrapper
extends
StatelessWidget
{
final
ScrollController
scrollController
;
final
Widget
child
;
const
DesktopScrollWrapper
(
{
Key
?
key
,
required
this
.
scrollController
,
required
this
.
child
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
ImprovedScrolling
(
scrollController:
scrollController
,
enableCustomMouseWheelScrolling:
true
,
customMouseWheelScrollConfig:
CustomMouseWheelScrollConfig
(
scrollDuration:
kDefaultScrollDuration
,
scrollCurve:
Curves
.
linearToEaseOut
,
mouseWheelTurnsThrottleTimeMs:
kDefaultMouseWhellThrottleDuration
.
inMilliseconds
,
scrollAmountMultiplier:
kDefaultScrollAmountMultiplier
),
child:
child
,
);
}
}
flutter/lib/main.dart
View file @
9284850d
...
@@ -8,6 +8,7 @@ import 'package:flutter_hbb/desktop/screen/desktop_file_transfer_screen.dart';
...
@@ -8,6 +8,7 @@ import 'package:flutter_hbb/desktop/screen/desktop_file_transfer_screen.dart';
import
'package:flutter_hbb/desktop/screen/desktop_port_forward_screen.dart'
;
import
'package:flutter_hbb/desktop/screen/desktop_port_forward_screen.dart'
;
import
'package:flutter_hbb/desktop/screen/desktop_remote_screen.dart'
;
import
'package:flutter_hbb/desktop/screen/desktop_remote_screen.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
import
'package:flutter_hbb/utils/multi_window_manager.dart'
;
import
'package:flutter_localizations/flutter_localizations.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
...
@@ -123,6 +124,12 @@ void runRemoteScreen(Map<String, dynamic> argument) async {
...
@@ -123,6 +124,12 @@ void runRemoteScreen(Map<String, dynamic> argument) async {
home:
DesktopRemoteScreen
(
home:
DesktopRemoteScreen
(
params:
argument
,
params:
argument
,
),
),
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
,
GlobalCupertinoLocalizations
.
delegate
,
],
supportedLocales:
supportedLocales
,
navigatorObservers:
const
[
navigatorObservers:
const
[
// FirebaseAnalyticsObserver(analytics: analytics),
// FirebaseAnalyticsObserver(analytics: analytics),
],
],
...
@@ -141,6 +148,12 @@ void runFileTransferScreen(Map<String, dynamic> argument) async {
...
@@ -141,6 +148,12 @@ void runFileTransferScreen(Map<String, dynamic> argument) async {
darkTheme:
MyTheme
.
darkTheme
,
darkTheme:
MyTheme
.
darkTheme
,
themeMode:
MyTheme
.
initialThemeMode
(),
themeMode:
MyTheme
.
initialThemeMode
(),
home:
DesktopFileTransferScreen
(
params:
argument
),
home:
DesktopFileTransferScreen
(
params:
argument
),
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
,
GlobalCupertinoLocalizations
.
delegate
,
],
supportedLocales:
supportedLocales
,
navigatorObservers:
const
[
navigatorObservers:
const
[
// FirebaseAnalyticsObserver(analytics: analytics),
// FirebaseAnalyticsObserver(analytics: analytics),
],
],
...
@@ -160,6 +173,12 @@ void runPortForwardScreen(Map<String, dynamic> argument) async {
...
@@ -160,6 +173,12 @@ void runPortForwardScreen(Map<String, dynamic> argument) async {
darkTheme:
MyTheme
.
darkTheme
,
darkTheme:
MyTheme
.
darkTheme
,
themeMode:
MyTheme
.
initialThemeMode
(),
themeMode:
MyTheme
.
initialThemeMode
(),
home:
DesktopPortForwardScreen
(
params:
argument
),
home:
DesktopPortForwardScreen
(
params:
argument
),
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
,
GlobalCupertinoLocalizations
.
delegate
,
],
supportedLocales:
supportedLocales
,
navigatorObservers:
const
[
navigatorObservers:
const
[
// FirebaseAnalyticsObserver(analytics: analytics),
// FirebaseAnalyticsObserver(analytics: analytics),
],
],
...
@@ -178,14 +197,20 @@ void runConnectionManagerScreen() async {
...
@@ -178,14 +197,20 @@ void runConnectionManagerScreen() async {
theme:
MyTheme
.
lightTheme
,
theme:
MyTheme
.
lightTheme
,
darkTheme:
MyTheme
.
darkTheme
,
darkTheme:
MyTheme
.
darkTheme
,
themeMode:
MyTheme
.
initialThemeMode
(),
themeMode:
MyTheme
.
initialThemeMode
(),
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
,
GlobalCupertinoLocalizations
.
delegate
,
],
supportedLocales:
supportedLocales
,
home:
const
DesktopServerPage
(),
home:
const
DesktopServerPage
(),
builder:
_keepScaleBuilder
()));
builder:
_keepScaleBuilder
()));
windowManager
.
waitUntilReadyToShow
(
windowOptions
,
()
async
{
windowManager
.
waitUntilReadyToShow
(
windowOptions
,
()
async
{
await
windowManager
.
setAlignment
(
Alignment
.
topRight
);
await
windowManager
.
setAlignment
(
Alignment
.
topRight
);
await
windowManager
.
show
();
await
windowManager
.
show
();
await
windowManager
.
focus
();
await
windowManager
.
focus
();
await
windowManager
.
setAlignment
(
Alignment
.
topRight
);
// ensure
await
windowManager
.
setAlignment
(
Alignment
.
topRight
);
// ensure
});
});
}
}
WindowOptions
getHiddenTitleBarWindowOptions
(
{
Size
?
size
})
{
WindowOptions
getHiddenTitleBarWindowOptions
(
{
Size
?
size
})
{
...
@@ -247,6 +272,12 @@ class _AppState extends State<App> {
...
@@ -247,6 +272,12 @@ class _AppState extends State<App> {
navigatorObservers:
const
[
navigatorObservers:
const
[
// FirebaseAnalyticsObserver(analytics: analytics),
// FirebaseAnalyticsObserver(analytics: analytics),
],
],
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
GlobalWidgetsLocalizations
.
delegate
,
GlobalCupertinoLocalizations
.
delegate
,
],
supportedLocales:
supportedLocales
,
builder:
isAndroid
builder:
isAndroid
?
(
context
,
child
)
=>
AccessibilityListener
(
?
(
context
,
child
)
=>
AccessibilityListener
(
child:
MediaQuery
(
child:
MediaQuery
(
...
...
flutter/lib/models/ab_model.dart
View file @
9284850d
...
@@ -45,8 +45,8 @@ class AbModel with ChangeNotifier {
...
@@ -45,8 +45,8 @@ class AbModel with ChangeNotifier {
}
catch
(
err
)
{
}
catch
(
err
)
{
abError
=
err
.
toString
();
abError
=
err
.
toString
();
}
finally
{
}
finally
{
notifyListeners
();
abLoading
=
false
;
abLoading
=
false
;
notifyListeners
();
}
}
return
null
;
return
null
;
}
}
...
@@ -98,12 +98,18 @@ class AbModel with ChangeNotifier {
...
@@ -98,12 +98,18 @@ class AbModel with ChangeNotifier {
final
body
=
jsonEncode
({
final
body
=
jsonEncode
({
"data"
:
jsonEncode
({
"tags"
:
tags
,
"peers"
:
peers
})
"data"
:
jsonEncode
({
"tags"
:
tags
,
"peers"
:
peers
})
});
});
final
resp
=
try
{
await
http
.
post
(
Uri
.
parse
(
api
),
headers:
authHeaders
,
body:
body
);
final
resp
=
abLoading
=
false
;
await
http
.
post
(
Uri
.
parse
(
api
),
headers:
authHeaders
,
body:
body
);
// await getAb(); // TODO
abError
=
""
;
await
getAb
();
debugPrint
(
"resp:
${resp.body}
"
);
}
catch
(
e
)
{
abError
=
e
.
toString
();
}
finally
{
abLoading
=
false
;
}
notifyListeners
();
notifyListeners
();
debugPrint
(
"resp:
${resp.body}
"
);
}
}
bool
idContainBy
(
String
id
)
{
bool
idContainBy
(
String
id
)
{
...
...
flutter/linux/CMakeLists.txt
View file @
9284850d
...
@@ -4,7 +4,7 @@ project(runner LANGUAGES CXX)
...
@@ -4,7 +4,7 @@ project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
# the on-disk name of your application.
set
(
BINARY_NAME
"
flutter_hbb
"
)
set
(
BINARY_NAME
"
rustdesk
"
)
# The unique GTK application identifier for this application. See:
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set
(
APPLICATION_ID
"com.carriez.flutter_hbb"
)
set
(
APPLICATION_ID
"com.carriez.flutter_hbb"
)
...
...
flutter/linux/my_application.cc
View file @
9284850d
...
@@ -51,7 +51,7 @@ static void my_application_activate(GApplication* application) {
...
@@ -51,7 +51,7 @@ static void my_application_activate(GApplication* application) {
// auto bdw = bitsdojo_window_from(window); // <--- add this line
// auto bdw = bitsdojo_window_from(window); // <--- add this line
// bdw->setCustomFrame(true); // <-- add this line
// bdw->setCustomFrame(true); // <-- add this line
gtk_window_set_default_size
(
window
,
1280
,
72
0
);
// <-- comment this line
gtk_window_set_default_size
(
window
,
800
,
60
0
);
// <-- comment this line
gtk_widget_show
(
GTK_WIDGET
(
window
));
gtk_widget_show
(
GTK_WIDGET
(
window
));
g_autoptr
(
FlDartProject
)
project
=
fl_dart_project_new
();
g_autoptr
(
FlDartProject
)
project
=
fl_dart_project_new
();
...
...
flutter/macos/Runner/Configs/AppInfo.xcconfig
View file @
9284850d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
// 'flutter create' template.
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME =
flutter_hbb
PRODUCT_NAME =
rustdesk
// The application's bundle identifier
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb
...
...
flutter/pubspec.lock
View file @
9284850d
...
@@ -140,7 +140,7 @@ packages:
...
@@ -140,7 +140,7 @@ packages:
name: characters
name: characters
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.2.
1
"
version: "1.2.
0
"
charcode:
charcode:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -161,7 +161,7 @@ packages:
...
@@ -161,7 +161,7 @@ packages:
name: clock
name: clock
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.1.
1
"
version: "1.1.
0
"
code_builder:
code_builder:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -367,6 +367,13 @@ packages:
...
@@ -367,6 +367,13 @@ packages:
url: "https://github.com/Kingtous/rustdesk_flutter_custom_cursor"
url: "https://github.com/Kingtous/rustdesk_flutter_custom_cursor"
source: git
source: git
version: "0.0.1"
version: "0.0.1"
flutter_improved_scrolling:
dependency: "direct main"
description:
name: flutter_improved_scrolling
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.3"
flutter_lints:
flutter_lints:
dependency: "direct dev"
dependency: "direct dev"
description:
description:
...
@@ -374,6 +381,11 @@ packages:
...
@@ -374,6 +381,11 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "2.0.1"
version: "2.0.1"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_parsed_text:
flutter_parsed_text:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -478,7 +490,7 @@ packages:
...
@@ -478,7 +490,7 @@ packages:
name: icons_launcher
name: icons_launcher
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "2.0.
5
"
version: "2.0.
4
"
image:
image:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -576,7 +588,7 @@ packages:
...
@@ -576,7 +588,7 @@ packages:
name: material_color_utilities
name: material_color_utilities
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.1.
5
"
version: "0.1.
4
"
menu_base:
menu_base:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -590,7 +602,7 @@ packages:
...
@@ -590,7 +602,7 @@ packages:
name: meta
name: meta
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.
8
.0"
version: "1.
7
.0"
mime:
mime:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -667,7 +679,7 @@ packages:
...
@@ -667,7 +679,7 @@ packages:
name: path
name: path
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.8.
2
"
version: "1.8.
1
"
path_provider:
path_provider:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
...
flutter/pubspec.yaml
View file @
9284850d
...
@@ -24,6 +24,8 @@ environment:
...
@@ -24,6 +24,8 @@ environment:
dependencies
:
dependencies
:
flutter
:
flutter
:
sdk
:
flutter
sdk
:
flutter
flutter_localizations
:
sdk
:
flutter
# The following adds the Cupertino Icons font to your application.
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
# Use with the CupertinoIcons class for iOS style icons.
...
@@ -78,6 +80,14 @@ dependencies:
...
@@ -78,6 +80,14 @@ dependencies:
desktop_drop
:
^0.3.3
desktop_drop
:
^0.3.3
scroll_pos
:
^0.3.0
scroll_pos
:
^0.3.0
rxdart
:
^0.27.5
rxdart
:
^0.27.5
flutter_improved_scrolling
:
^0.0.3
# currently, we use flutter 3.0.5 for windows build, latest for other builds.
#
# for flutter 3.0.5, please use official version(just comment code below).
# if build rustdesk by flutter >=3.3, please use our custom pub below (uncomment code below).
# git
:
# url: https://github.com/Kingtous/flutter_improved_scrolling
# ref: 62f09545149f320616467c306c8c5f71714a18e6
dev_dependencies
:
dev_dependencies
:
icons_launcher
:
^2.0.4
icons_launcher
:
^2.0.4
...
...
flutter/test/widget_test.dart
deleted
100644 → 0
View file @
9e6e8422
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_hbb/main.dart'
;
void
main
(
)
{
testWidgets
(
'Counter increments smoke test'
,
(
WidgetTester
tester
)
async
{
// Build our app and trigger a frame.
await
tester
.
pumpWidget
(
App
());
// Verify that our counter starts at 0.
expect
(
find
.
text
(
'0'
),
findsOneWidget
);
expect
(
find
.
text
(
'1'
),
findsNothing
);
// Tap the '+' icon and trigger a frame.
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
add
));
await
tester
.
pump
();
// Verify that our counter has incremented.
expect
(
find
.
text
(
'0'
),
findsNothing
);
expect
(
find
.
text
(
'1'
),
findsOneWidget
);
});
}
flutter/windows/CMakeLists.txt
View file @
9284850d
...
@@ -4,7 +4,7 @@ project(flutter_hbb LANGUAGES CXX)
...
@@ -4,7 +4,7 @@ project(flutter_hbb LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
# the on-disk name of your application.
set
(
BINARY_NAME
"
flutter_hbb
"
)
set
(
BINARY_NAME
"
rustdesk
"
)
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
# versions of CMake.
...
...
flutter/windows/runner/main.cpp
View file @
9284850d
...
@@ -52,7 +52,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
...
@@ -52,7 +52,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow
window
(
project
);
FlutterWindow
window
(
project
);
Win32Window
::
Point
origin
(
10
,
10
);
Win32Window
::
Point
origin
(
10
,
10
);
Win32Window
::
Size
size
(
1280
,
72
0
);
Win32Window
::
Size
size
(
800
,
60
0
);
if
(
!
window
.
CreateAndShow
(
L"flutter_hbb"
,
origin
,
size
))
if
(
!
window
.
CreateAndShow
(
L"flutter_hbb"
,
origin
,
size
))
{
{
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
...
...
src/lang/cn.rs
View file @
9284850d
...
@@ -189,7 +189,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
...
@@ -189,7 +189,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
(
"x11 expected"
,
"请切换到 x11"
),
(
"x11 expected"
,
"请切换到 x11"
),
(
"Port"
,
"端口"
),
(
"Port"
,
"端口"
),
(
"Settings"
,
"设置"
),
(
"Settings"
,
"设置"
),
(
"Username"
,
"
用户名"
),
(
"Username"
,
"用户名"
),
(
"Invalid port"
,
"无效端口"
),
(
"Invalid port"
,
"无效端口"
),
(
"Closed manually by the peer"
,
"被对方手动关闭"
),
(
"Closed manually by the peer"
,
"被对方手动关闭"
),
(
"Enable remote configuration modification"
,
"允许远程修改配置"
),
(
"Enable remote configuration modification"
,
"允许远程修改配置"
),
...
@@ -272,7 +272,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
...
@@ -272,7 +272,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
(
"Overwrite"
,
"覆盖"
),
(
"Overwrite"
,
"覆盖"
),
(
"This file exists, skip or overwrite this file?"
,
"这个文件/文件夹已存在,跳过/覆盖?"
),
(
"This file exists, skip or overwrite this file?"
,
"这个文件/文件夹已存在,跳过/覆盖?"
),
(
"Quit"
,
"退出"
),
(
"Quit"
,
"退出"
),
(
"doc_mac_permission"
,
"https://rustdesk.com/docs/zh-cn/manual/mac
/#启用权限
"
),
(
"doc_mac_permission"
,
"https://rustdesk.com/docs/zh-cn/manual/mac
#
%
E5
%
90
%
AF
%
E7
%
94
%
A8
%
E6
%
9D
%
83
%
E9
%
99
%
90
"
),
(
"Help"
,
"帮助"
),
(
"Help"
,
"帮助"
),
(
"Failed"
,
"失败"
),
(
"Failed"
,
"失败"
),
(
"Succeeded"
,
"成功"
),
(
"Succeeded"
,
"成功"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment