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
07ad4123
Unverified
Commit
07ad4123
authored
3 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[ui] style help links
parent
b25ec7c9
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/components/Help.qml
+26
-2
26 additions, 2 deletions
gui/components/Help.qml
gui/components/Splash.qml
+20
-15
20 additions, 15 deletions
gui/components/Splash.qml
pkg/config/version/checknewer.go
+3
-0
3 additions, 0 deletions
pkg/config/version/checknewer.go
with
49 additions
and
17 deletions
gui/components/Help.qml
+
26
−
2
View file @
07ad4123
import
QtQuick
2.
9
import
QtQuick
2.
15
import
QtQuick
.
Controls
2.2
import
"
../themes/themes.js
"
as
Theme
ThemedPage
{
title
:
qsTr
(
"
Help
"
)
property
var
issueTracker
:
"
https://0xacab.org/leap/bitmask-vpn/issues
"
property
var
uninstall
:
"
https://0xacab.org/leap/bitmask-vpn/-/blob/main/docs/uninstall.md
"
Column
{
anchors.centerIn
:
parent
...
...
@@ -11,15 +14,36 @@ ThemedPage {
Text
{
font.pixelSize
:
14
textFormat
:
Text
.
RichText
color
:
Theme
.
green
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
getDummyLink
(
qsTr
(
"
Troubleshooting and support
"
))
onLinkActivated
:
Qt
.
openUrlExternally
(
ctx
.
helpURL
)
HoverHandler
{
cursorShape
:
Qt
.
PointingHandCursor
}
}
Text
{
font.pixelSize
:
14
textFormat
:
Text
.
RichText
color
:
Theme
.
green
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
getDummyLink
(
qsTr
(
"
Report a bug
"
))
onLinkActivated
:
Qt
.
openUrlExternally
(
issueTracker
)
HoverHandler
{
cursorShape
:
Qt
.
PointingHandCursor
}
}
Text
{
font.pixelSize
:
14
textFormat
:
Text
.
RichText
color
:
Theme
.
green
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
getDummyLink
(
qsTr
(
"
How to uninstall
"
))
onLinkActivated
:
Qt
.
openUrlExternally
(
uninstall
)
HoverHandler
{
cursorShape
:
Qt
.
PointingHandCursor
}
}
/* XXX needs implementation in the backend
Button {
...
...
@@ -30,6 +54,6 @@ ThemedPage {
}
function
getDummyLink
(
text
)
{
return
"
<a href=
'#'
>
"
+
text
+
"
</a>
"
return
"
<
style>a:link {color: '
"
+
Theme
.
green
+
"
';}</style><
a href=
\"
#
\"
>
"
+
text
+
"
</a>
"
}
}
This diff is collapsed.
Click to expand it.
gui/components/Splash.qml
+
20
−
15
View file @
07ad4123
...
...
@@ -5,7 +5,7 @@ import "../themes/themes.js" as Theme
Page
{
id
:
splash
property
int
timeoutInterval
:
qmlDebug
?
2
00
:
1600
property
int
timeoutInterval
:
qmlDebug
?
6
00
:
1600
property
alias
errors
:
splashErrorBox
ToolButton
{
...
...
@@ -93,22 +93,11 @@ Page {
}
function
hasMotd
()
{
if
(
ctx
)
{
if
(
isTrue
(
ctx
.
canUpgrade
))
{
return
true
}
return
!
isEmpty
(
ctx
.
motd
)
}
return
false
return
needsUpgrade
()
||
(
ctx
&&
!
isEmpty
(
ctx
.
motd
))
}
function
getUpgradeText
()
{
let
t
=
""
let
platform
=
Qt
.
platform
.
os
if
(
platform
==
"
windows
"
||
platform
==
"
osx
"
||
platform
==
"
linux
"
)
{
t
=
qsTr
(
"
There is a newer version available.
"
)
}
return
t
return
qsTr
(
"
There is a newer version available.
"
)
+
qsTr
(
"
Make sure to uninstall the previous one before running the new installer.
"
)
}
function
getUpgradeLink
()
{
...
...
@@ -119,6 +108,21 @@ Page {
return
"
https://downloads.leap.se/RiseupVPN/
"
+
Qt
.
platform
.
os
+
"
/
"
}
function
needsUpgrade
()
{
if
(
ctx
&&
isTrue
(
ctx
.
canUpgrade
))
{
if
(
qmlDebug
)
{
return
true
}
let
platform
=
Qt
.
platform
.
os
//DEBUG --
//if (platform == "windows" || platform == "osx" || platform == "linux" ) {
if
(
platform
==
"
windows
"
||
platform
==
"
osx
"
)
{
return
true
}
}
return
false
}
function
showMotd
()
{
// XXX this is not picking locales configured by LANG or LC_ALL
let
isUpgrade
=
false
...
...
@@ -129,7 +133,7 @@ Page {
let
textLocale
=
""
let
link
=
""
if
(
ctx
&&
isTrue
(
ctx
.
can
Upgrade
))
{
if
(
needs
Upgrade
(
))
{
isUpgrade
=
true
;
textLocale
=
getUpgradeText
();
link
=
getUpgradeLink
();
...
...
@@ -186,6 +190,7 @@ Page {
if
(
ctx
&&
isTrue
(
ctx
.
isReady
)
||
qmlDebug
)
{
splashTimer
.
stop
()
if
(
hasMotd
())
{
console
.
debug
(
"
show motd
"
);
showMotd
();
}
else
{
loader
.
source
=
"
MainView.qml
"
...
...
This diff is collapsed.
Click to expand it.
pkg/config/version/checknewer.go
+
3
−
0
View file @
07ad4123
...
...
@@ -17,6 +17,9 @@ const verURI = "https://downloads.leap.se/RiseupVPN/"
// at the moment, we hardcode RiseupVPN in the path, assuming that all clients
// stay in sync.
func
CanUpgrade
()
bool
{
if
os
.
Getenv
(
"SKIP_VERSION_CHECK"
)
==
"1"
{
return
false
}
log
.
Println
(
"Checking for updates..."
)
uri
:=
verURI
switch
runtime
.
GOOS
{
...
...
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