Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vladimir KozLove
bitmask-vpn
Commits
a0fd057b
Unverified
Commit
a0fd057b
authored
3 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[feat] hide window by default, raise for picking location
parent
c2a582fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gui/qml/MainBar.qml
+0
-1
0 additions, 1 deletion
gui/qml/MainBar.qml
gui/qml/VpnState.qml
+6
-6
6 additions, 6 deletions
gui/qml/VpnState.qml
gui/qml/main.qml
+21
-15
21 additions, 15 deletions
gui/qml/main.qml
with
27 additions
and
22 deletions
gui/qml/MainBar.qml
+
0
−
1
View file @
a0fd057b
...
...
@@ -2,7 +2,6 @@ import QtQuick 2.9
import
QtQuick
.
Controls
2.4
TabBar
{
//id: bar
width
:
parent
.
width
TabButton
{
text
:
qsTr
(
"
Status
"
)
...
...
This diff is collapsed.
Click to expand it.
gui/qml/VpnState.qml
+
6
−
6
View file @
a0fd057b
...
...
@@ -69,9 +69,9 @@ StateGroup {
text
:
{
if
(
autoSelectionButton
.
checked
)
{
//: %1 -> location to which the client is connected to
qsTr
(
"
Best
(%1)
"
).
arg
(
locationStr
())
qsTr
(
"
Recommended
(%1)
"
).
arg
(
locationStr
())
}
else
{
qsTr
(
"
Best
"
)
qsTr
(
"
Recommended
"
)
}
}
}
...
...
@@ -101,9 +101,9 @@ StateGroup {
text
:
{
if
(
autoSelectionButton
.
checked
)
{
//: %1 -> location to which the client is connected to
qsTr
(
"
Best
(%1)
"
).
arg
(
locationStr
())
qsTr
(
"
Recommended
(%1)
"
).
arg
(
locationStr
())
}
else
{
qsTr
(
"
Best
"
)
qsTr
(
"
Recommended
"
)
}
}
}
...
...
@@ -129,7 +129,7 @@ StateGroup {
}
PropertyChanges
{
target
:
autoSelectionItem
text
:
qsTr
(
"
Best
"
)
text
:
qsTr
(
"
Recommended
"
)
}
PropertyChanges
{
target
:
mainStatus
...
...
@@ -153,7 +153,7 @@ StateGroup {
}
PropertyChanges
{
target
:
autoSelectionItem
text
:
qsTr
(
"
Best
"
)
text
:
qsTr
(
"
Recommended
"
)
}
PropertyChanges
{
target
:
mainStatus
...
...
This diff is collapsed.
Click to expand it.
gui/qml/main.qml
+
21
−
15
View file @
a0fd057b
...
...
@@ -9,7 +9,7 @@ import "logic.js" as Logic
ApplicationWindow
{
id
:
app
visible
:
tru
e
visible
:
fals
e
width
:
300
height
:
600
maximumWidth
:
300
...
...
@@ -118,7 +118,10 @@ ApplicationWindow {
id
:
autoSelectionButton
checked
:
!
isManualLocation
()
text
:
qsTr
(
"
Recommended
"
)
onClicked
:
backend
.
useAutomaticGateway
()
onClicked
:
{
backend
.
useAutomaticGateway
()
manualSelectionItem
.
checked
=
false
}
}
RadioButton
{
id
:
manualSelectionButton
...
...
@@ -136,6 +139,7 @@ ApplicationWindow {
onActivated
:
{
console
.
debug
(
"
Selected gateway:
"
,
currentText
)
backend
.
useLocation
(
currentText
.
toString
())
manualSelectionItem
.
checked
=
true
}
delegate
:
ItemDelegate
{
...
...
@@ -253,6 +257,18 @@ ApplicationWindow {
if
(
!
ctx
.
currentLocation
)
{
return
}
if
(
!
isManualLocation
())
{
//manualSelectionItem.checked = isManualLocation()
manualSelectionItem
.
checked
=
false
bar
.
currentIndex
=
1
app
.
visible
=
true
app
.
hide
()
app
.
show
()
app
.
raise
()
return
}
// last used manual selection
const
location
=
ctx
.
currentLocation
.
toLowerCase
()
const
idx
=
gwSelector
.
model
.
indexOf
(
location
)
gwSelector
.
currentIndex
=
idx
...
...
@@ -265,8 +281,8 @@ ApplicationWindow {
allowEmptyPass
=
Logic
.
shouldAllowEmptyPass
(
providers
)
needsRestart
=
false
;
/* TODO get appVisible flag from backend */
app
.
visible
=
true
app
.
raise
()
//
app.visible = true
//
app.raise()
}
...
...
@@ -286,17 +302,6 @@ ApplicationWindow {
id
:
systray
visible
:
systrayVisible
onActivated
:
{
if
(
reason
!=
SystemTrayIcon
.
Context
)
{
if
(
app
.
visible
)
{
app
.
hide
()
}
else
{
app
.
show
()
}
}
}
/* the systray menu cannot be buried in a child qml file because
* otherwise the ids are not available
* from other components
...
...
@@ -320,6 +325,7 @@ ApplicationWindow {
checked
:
!
isManualLocation
()
onTriggered
:
{
backend
.
useAutomaticGateway
()
manualSelectionItem
.
checked
=
false
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment