summaryrefslogtreecommitdiff
path: root/rockwork/qml/FirmwareUpgradePage.qml
blob: 3281a128d262583a42388ee54548c9f1996455fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import QtQuick 2.4
import Ubuntu.Components 1.3

Page {
    id: root
    title: i18n.tr("Firmware upgrade")

    property var pebble: null

    Column {
        anchors.fill: parent
        anchors.margins: units.gu(1)
        spacing: units.gu(2)

        Label {
            text: i18n.tr("A new firmware upgrade is available for your Pebble smartwatch.")
            fontSize: "large"
            width: parent.width
            wrapMode: Text.WordWrap
        }

        Label {
            text: i18n.tr("Currently installed firmware: %1").arg("<b>" + root.pebble.softwareVersion + "</b>")
            width: parent.width
            wrapMode: Text.WordWrap
        }

        Label {
            text: i18n.tr("Candidate firmware version: %1").arg("<b>" + root.pebble.candidateVersion + "</b>")
            width: parent.width
            wrapMode: Text.WordWrap
        }

        Label {
            text: "<b>" + i18n.tr("Release Notes: %1").arg("</b><br>" + root.pebble.firmwareReleaseNotes)
            width: parent.width
            wrapMode: Text.WordWrap
        }

        Label {
            text: "<b>" + i18n.tr("Important:") + "</b> " + i18n.tr("This update will also upgrade recovery data. Make sure your Pebble smartwarch is connected to a power adapter.")
            width: parent.width
            wrapMode: Text.WordWrap
            visible: root.pebble.candidateVersion.indexOf("mig") > 0
        }

        Button {
            text: "Upgrade now"
            anchors.horizontalCenter: parent.horizontalCenter
            color: UbuntuColors.blue
            onClicked: {
                root.pebble.performFirmwareUpgrade();
                pageStack.pop();
            }
        }
    }
}