added local updater, minor fixes
tests / package-smoke-linux (push) Skipped
tests / package-smoke-windows (push) Skipped
tests / package-smoke-macos (push) Skipped
tests / macos (push) Successful in 1m24s
tests / windows (pull_request) Skipped
tests / macos (pull_request) Skipped
tests / package-smoke-linux (pull_request) Skipped
tests / package-smoke-windows (pull_request) Skipped
tests / package-smoke-macos (pull_request) Skipped
tests / linux (push) Failing after 1m37s
tests / linux (pull_request) Failing after 1m39s
tests / windows (push) Canceled after 0s
tests / package-smoke-linux (push) Skipped
tests / package-smoke-windows (push) Skipped
tests / package-smoke-macos (push) Skipped
tests / macos (push) Successful in 1m24s
tests / windows (pull_request) Skipped
tests / macos (pull_request) Skipped
tests / package-smoke-linux (pull_request) Skipped
tests / package-smoke-windows (pull_request) Skipped
tests / package-smoke-macos (pull_request) Skipped
tests / linux (push) Failing after 1m37s
tests / linux (pull_request) Failing after 1m39s
tests / windows (push) Canceled after 0s
Signed-off-by: galeon <dertiellis@gmail.com>
This commit is contained in:
1 parent
98344a1870
commit
d4a17a4561
10 files changed
+777
-31
No files matched your search
@@ -46,6 +46,19 @@ Window {
|
||||
}
|
||||
}
|
||||
|
||||
LauncherUpdates {
|
||||
id: launcherUpdates
|
||||
Component.onCompleted: refresh(channel)
|
||||
onInstallationFailed: window.showToast(Loc.t.app.error.launcherInstall, "#cc3333", 8000)
|
||||
}
|
||||
|
||||
LauncherVersionsDialog {
|
||||
id: launcherVersions
|
||||
objectName: "launcherVersions"
|
||||
parent: Overlay.overlay
|
||||
updates: launcherUpdates
|
||||
}
|
||||
|
||||
function showToast(text, color, timeout) {
|
||||
toastLabel.text = text
|
||||
toastBackground.color = color
|
||||
@@ -86,33 +99,74 @@ Window {
|
||||
anchors.fill: parent
|
||||
source: "images/launcherBackground.png"
|
||||
|
||||
Text {
|
||||
Button {
|
||||
id: launcherVersion
|
||||
x: 8
|
||||
y: 8
|
||||
color: "#ffffff"
|
||||
height: 30
|
||||
hoverEnabled: true
|
||||
enabled: !backend.busy && !backend.gameRunning && !backend.switching && !backend.seasonalInstalling
|
||||
text: Loc.t.app.label.version.arg(Qt.application.version)
|
||||
font.pixelSize: 12
|
||||
|
||||
horizontalPadding: 8
|
||||
|
||||
contentItem: Row {
|
||||
spacing: 6
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: launcherVersion.text
|
||||
color: "#ffffff"
|
||||
font: launcherVersion.font
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: channelBadge
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: launcherUpdates.channel === "dev" || launcherUpdates.channel === "rc"
|
||||
width: channelLabel.implicitWidth + 8
|
||||
height: channelLabel.implicitHeight + 2
|
||||
radius: 3
|
||||
color: launcherUpdates.channel === "rc" ? "#c08a1e" : "#b03a3a"
|
||||
|
||||
Text {
|
||||
id: channelLabel
|
||||
anchors.centerIn: parent
|
||||
text: launcherUpdates.channel.toUpperCase()
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 10
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
opacity: 0.36
|
||||
color: launcherVersion.pressed || launcherVersions.opened ? "#91B315" : "#000000"
|
||||
radius: 6
|
||||
border.color: launcherVersion.hovered || launcherVersion.activeFocus ? "#91B315" : color
|
||||
}
|
||||
|
||||
onClicked: launcherVersions.open()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: channelBadge
|
||||
readonly property var channel: /-(dev|rc)/.exec(Qt.application.version)
|
||||
visible: channel !== null
|
||||
visible: launcherUpdates.latest !== ""
|
||||
anchors.left: launcherVersion.right
|
||||
anchors.leftMargin: 6
|
||||
anchors.verticalCenter: launcherVersion.verticalCenter
|
||||
width: channelLabel.implicitWidth + 8
|
||||
height: channelLabel.implicitHeight + 2
|
||||
radius: 3
|
||||
color: channel && channel[1] === "rc" ? "#c08a1e" : "#b03a3a"
|
||||
width: updateLabel.implicitWidth + 12
|
||||
height: updateLabel.implicitHeight + 6
|
||||
radius: 4
|
||||
color: "#4b631c"
|
||||
|
||||
Text {
|
||||
id: channelLabel
|
||||
id: updateLabel
|
||||
anchors.centerIn: parent
|
||||
text: channelBadge.channel ? channelBadge.channel[1].toUpperCase() : ""
|
||||
text: Loc.t.app.status.newVersion
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 10
|
||||
font.pixelSize: 11
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user