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
13fe2164
Commit
13fe2164
authored
Sep 20, 2022
by
rustdesk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more style bug fix
parent
7ad876af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
49 deletions
+39
-49
consts.dart
flutter/lib/consts.dart
+2
-2
connection_page.dart
flutter/lib/desktop/pages/connection_page.dart
+36
-46
cn.rs
src/lang/cn.rs
+1
-1
No files found.
flutter/lib/consts.dart
View file @
13fe2164
...
@@ -19,8 +19,8 @@ const int kDesktopDefaultDisplayHeight = 720;
...
@@ -19,8 +19,8 @@ const int kDesktopDefaultDisplayHeight = 720;
const
kDefaultScrollAmountMultiplier
=
5.0
;
const
kDefaultScrollAmountMultiplier
=
5.0
;
const
kDefaultScrollDuration
=
Duration
(
milliseconds:
50
);
const
kDefaultScrollDuration
=
Duration
(
milliseconds:
50
);
const
kDefaultMouseWhellThrottleDuration
=
Duration
(
milliseconds:
50
);
const
kDefaultMouseWhellThrottleDuration
=
Duration
(
milliseconds:
50
);
const
kFullScreenEdgeSize
=
1
.0
;
const
kFullScreenEdgeSize
=
0
.0
;
const
kWindowEdgeSize
=
4
.0
;
const
kWindowEdgeSize
=
1
.0
;
const
kInvalidValueStr
=
"InvalidValueStr"
;
const
kInvalidValueStr
=
"InvalidValueStr"
;
...
...
flutter/lib/desktop/pages/connection_page.dart
View file @
13fe2164
...
@@ -774,27 +774,31 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
...
@@ -774,27 +774,31 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
@override
@override
void
initState
()
{
void
initState
()
{
()
async
{
()
async
{
await
bind
.
mainGetLocalOption
(
key:
'peer
_tab_
index'
).
then
((
value
)
{
await
bind
.
mainGetLocalOption
(
key:
'peer
-tab-
index'
).
then
((
value
)
{
if
(
value
==
''
)
return
;
if
(
value
==
''
)
return
;
final
tab
=
int
.
parse
(
value
);
final
tab
=
int
.
parse
(
value
);
_tabIndex
.
value
=
tab
;
_tabIndex
.
value
=
tab
;
_pageController
.
jumpToPage
(
tab
);
_pageController
.
jumpToPage
(
tab
);
});
});
await
bind
.
mainGetLocalOption
(
key:
'peer-card-ui-type'
).
then
((
value
)
{
if
(
value
==
''
)
return
;
final
tab
=
int
.
parse
(
value
);
peerCardUiType
.
value
=
tab
==
PeerUiType
.
list
.
index
?
PeerUiType
.
list
:
PeerUiType
.
grid
;
});
}();
}();
super
.
initState
();
super
.
initState
();
}
}
// hard code for now
// hard code for now
void
_handleTabSelection
(
int
index
)
{
Future
<
void
>
_handleTabSelection
(
int
index
)
async
{
if
(
index
==
_tabIndex
.
value
)
return
;
if
(
index
==
_tabIndex
.
value
)
return
;
// reset search text
// reset search text
peerSearchText
.
value
=
""
;
peerSearchText
.
value
=
""
;
peerSearchTextController
.
clear
();
peerSearchTextController
.
clear
();
_tabIndex
.
value
=
index
;
_tabIndex
.
value
=
index
;
()
async
{
await
bind
.
mainSetLocalOption
(
await
bind
.
mainSetLocalOption
(
key:
'peer_tab_index'
,
value:
index
.
toString
());
key:
'peer-tab-index'
,
value:
index
.
toString
());
}();
_pageController
.
jumpToPage
(
index
);
_pageController
.
jumpToPage
(
index
);
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
...
@@ -845,7 +849,7 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
...
@@ -845,7 +849,7 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
shrinkWrap:
true
,
shrinkWrap:
true
,
controller:
ScrollController
(),
controller:
ScrollController
(),
children:
super
.
widget
.
tabs
.
asMap
().
entries
.
map
((
t
)
{
children:
super
.
widget
.
tabs
.
asMap
().
entries
.
map
((
t
)
{
return
Obx
(()
=>
GestureDetector
(
return
Obx
(()
=>
InkWell
(
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
8
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
8
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -867,7 +871,7 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
...
@@ -867,7 +871,7 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
:
MyTheme
.
color
(
context
).
lightText
),
:
MyTheme
.
color
(
context
).
lightText
),
),
),
)),
)),
onTap:
()
=>
_handleTabSelection
(
t
.
key
),
onTap:
()
async
=>
await
_handleTabSelection
(
t
.
key
),
));
));
}).
toList
());
}).
toList
());
}
}
...
@@ -959,44 +963,30 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
...
@@ -959,44 +963,30 @@ class _PeerTabbedPageState extends State<_PeerTabbedPage>
_createPeerViewTypeSwitch
(
BuildContext
context
)
{
_createPeerViewTypeSwitch
(
BuildContext
context
)
{
final
activeDeco
=
BoxDecoration
(
color:
MyTheme
.
color
(
context
).
bg
);
final
activeDeco
=
BoxDecoration
(
color:
MyTheme
.
color
(
context
).
bg
);
return
Row
(
return
Row
(
children:
[
children:
[
PeerUiType
.
grid
,
PeerUiType
.
list
]
Obx
(
.
map
((
type
)
=>
Obx
(
()
=>
Container
(
()
=>
Container
(
padding:
EdgeInsets
.
all
(
4.0
),
padding:
EdgeInsets
.
all
(
4.0
),
decoration:
decoration:
peerCardUiType
.
value
==
type
?
activeDeco
:
null
,
peerCardUiType
.
value
==
PeerUiType
.
grid
?
activeDeco
:
null
,
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
async
{
peerCardUiType
.
value
=
PeerUiType
.
grid
;
await
bind
.
mainSetLocalOption
(
},
key:
'peer-card-ui-type'
,
child:
Icon
(
value:
type
.
index
.
toString
());
Icons
.
grid_view_rounded
,
peerCardUiType
.
value
=
type
;
size:
18
,
color:
peerCardUiType
.
value
==
PeerUiType
.
grid
?
MyTheme
.
color
(
context
).
text
:
MyTheme
.
color
(
context
).
lightText
,
)),
),
),
Obx
(
()
=>
Container
(
padding:
EdgeInsets
.
all
(
4.0
),
decoration:
peerCardUiType
.
value
==
PeerUiType
.
list
?
activeDeco
:
null
,
child:
InkWell
(
onTap:
()
{
peerCardUiType
.
value
=
PeerUiType
.
list
;
},
},
child:
Icon
(
child:
Icon
(
Icons
.
list
,
type
==
PeerUiType
.
grid
?
Icons
.
grid_view_rounded
:
Icons
.
list
,
size:
18
,
size:
18
,
color:
peerCardUiType
.
value
==
PeerUiType
.
list
color:
peerCardUiType
.
value
==
type
?
MyTheme
.
color
(
context
).
text
?
MyTheme
.
color
(
context
).
text
:
MyTheme
.
color
(
context
).
lightText
,
:
MyTheme
.
color
(
context
).
lightText
,
)),
)),
),
),
),
))
]
,
.
toList
()
,
);
);
}
}
}
}
src/lang/cn.rs
View file @
13fe2164
...
@@ -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"
,
"允许远程修改配置"
),
...
...
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