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
Container Registry
Model registry
Operate
Environments
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
leap
bitmask-vpn
Commits
45c13d49
Unverified
Commit
45c13d49
authored
3 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[feat] only show donate dialog after first connect when due
- Cloases:
#470
parent
326dc244
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG
+2
-1
2 additions, 1 deletion
CHANGELOG
gui/qml/VpnState.qml
+6
-0
6 additions, 0 deletions
gui/qml/VpnState.qml
gui/qml/logic.js
+12
-8
12 additions, 8 deletions
gui/qml/logic.js
gui/qml/main.qml
+4
-4
4 additions, 4 deletions
gui/qml/main.qml
pkg/backend/donate.go
+2
-0
2 additions, 0 deletions
pkg/backend/donate.go
with
26 additions
and
13 deletions
CHANGELOG
+
2
−
1
View file @
45c13d49
...
...
@@ -4,4 +4,5 @@
- First iteration of the gateway selector.
- Allow to select obfs4 gateways (bridges) to bypass censorship.
- Ability to define explicitly allowed addresses for local networks.
- Update translations. New locales: greek, farsi, hungarian, dutch, polish and uyghur.
- Make the donate dialog less intrusive (#470)
- Updated translations. New locales: greek, farsi, hungarian, dutch, polish and uyghur.
This diff is collapsed.
Click to expand it.
gui/qml/VpnState.qml
+
6
−
0
View file @
45c13d49
...
...
@@ -48,6 +48,12 @@ StateGroup {
script
:
{
Logic
.
setNeedsReconnect
(
false
);
brReconnect
=
false
;
if
(
needsDonate
&&
!
shownDonate
)
{
donate
.
visible
=
true
;
shownDonate
=
true
;
backend
.
donateSeen
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
gui/qml/logic.js
+
12
−
8
View file @
45c13d49
let
status
=
'
off
'
;
let
needsReconnect
=
false
;
var
status
=
'
off
'
;
var
needsReconnect
=
false
;
function
setNeedsReconnect
(
val
)
{
needsReconnect
=
val
;
}
function
getNeedsReconnect
()
{
return
needsReconnect
;
}
function
setStatus
(
st
)
{
status
=
st
;
...
...
@@ -9,12 +17,8 @@ function getStatus() {
return
status
;
}
function
setNeedsReconnect
(
val
)
{
needsReconnect
=
val
;
}
function
getNeedsReconnect
()
{
return
needsReconnect
;
function
setNeedsDonate
(
val
)
{
needsDonate
=
val
;
}
function
toHuman
(
st
)
{
...
...
This diff is collapsed.
Click to expand it.
gui/qml/main.qml
+
4
−
4
View file @
45c13d49
...
...
@@ -21,7 +21,8 @@ ApplicationWindow {
property
var
loginDone
property
var
allowEmptyPass
property
var
needsRestart
property
var
needsDonate
property
var
shownDonate
onSceneGraphError
:
function
(
error
,
msg
)
{
console
.
debug
(
"
ERROR while initializing scene
"
)
...
...
@@ -189,9 +190,7 @@ ApplicationWindow {
gwSelector
.
model
=
Object
.
keys
(
ctx
.
locations
)
if
(
ctx
.
donateDialog
==
'
true
'
)
{
console
.
debug
(
jsonModel
.
getJson
())
donate
.
visible
=
true
backend
.
donateSeen
()
Logic
.
setNeedsDonate
(
true
);
}
if
(
ctx
.
loginDialog
==
'
true
'
)
{
console
.
debug
(
jsonModel
.
getJson
())
...
...
@@ -276,6 +275,7 @@ ApplicationWindow {
loginDone
=
false
allowEmptyPass
=
Logic
.
shouldAllowEmptyPass
(
providers
)
needsRestart
=
false
;
shownDonate
=
false
;
if
(
!
systrayAvailable
)
{
app
.
visible
=
true
app
.
raise
()
...
...
This diff is collapsed.
Click to expand it.
pkg/backend/donate.go
+
2
−
0
View file @
45c13d49
...
...
@@ -15,6 +15,8 @@ func runDonationReminder() {
}
}
}()
// to test manually, uncomment this line.
// time.AfterFunc(1*time.Minute, func() { showDonate() })
}
func
needsDonationReminder
()
bool
{
...
...
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