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
0679d01a
Commit
0679d01a
authored
Sep 19, 2022
by
rustdesk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix connection status style
parent
e0d759c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
connection_page.dart
flutter/lib/desktop/pages/connection_page.dart
+21
-11
No files found.
flutter/lib/desktop/pages/connection_page.dart
View file @
0679d01a
...
@@ -94,8 +94,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -94,8 +94,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
),
]),
]),
);
);
}
}
...
@@ -303,6 +303,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -303,6 +303,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
,
...
@@ -310,13 +312,13 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -310,13 +312,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
();
...
@@ -324,19 +326,25 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -324,19 +326,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
)
],
);
);
}
}
}
}
...
@@ -344,13 +352,15 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -344,13 +352,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
()
...
@@ -424,7 +434,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -424,7 +434,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
translate
(
"
${model.abError}
"
)),
Text
(
translate
(
model
.
abError
)),
TextButton
(
TextButton
(
onPressed:
()
{
onPressed:
()
{
setState
(()
{});
setState
(()
{});
...
...
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