diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 21:10:26 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 21:10:26 +0100 |
commit | 07ad41230d663816e9894b59b110fa2f7075ca18 (patch) | |
tree | dfa951c61263f46bf54c40f04276ac401444fafa /gui/components/Splash.qml | |
parent | b25ec7c923924e53ddb65f9a34e9a669dcf066c7 (diff) |
[ui] style help links
Diffstat (limited to 'gui/components/Splash.qml')
-rw-r--r-- | gui/components/Splash.qml | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/gui/components/Splash.qml b/gui/components/Splash.qml index 0d49474..8c3c310 100644 --- a/gui/components/Splash.qml +++ b/gui/components/Splash.qml @@ -5,7 +5,7 @@ import "../themes/themes.js" as Theme Page { id: splash - property int timeoutInterval: qmlDebug ? 200 : 1600 + property int timeoutInterval: qmlDebug ? 600 : 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.canUpgrade)) { + if (needsUpgrade()) { 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" |