2 * Copyright (C) 2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import QtQuick.Layouts 1.1
19import Lomiri.Components 1.3
20import Lomiri.SystemSettings.Update 1.0
23import ".." as LocalComponents
24import "../../Components"
28 objectName: "systemUpdatePage"
30 title: i18n.tr("Update Device")
31 forwardButtonSourceComponent: forwardButton
33 skip: !root.updateDownloaded // skip the page when the system update is not ready to install
39 leftMargin: systemUpdatePage.leftMargin
40 rightMargin: systemUpdatePage.rightMargin
41 topMargin: systemUpdatePage.customMargin
44 opacity: spinner.running ? 0.5 : 1
46 LomiriNumberAnimation {}
50 anchors.left: parent.left
51 anchors.right: parent.right
52 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
53 font.weight: Font.Light
57 text: i18n.tr("There is a system update available and ready to install. Afterwards, the device will automatically restart.")
63 rowSpacing: units.gu(1)
64 columnSpacing: units.gu(2)
68 Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
69 sourceSize: Qt.size(units.gu(3), units.gu(3))
70 fillMode: Image.PreserveAspectFit
71 source: logoResolver.resolvedImage
76 objectName: "logoResolver"
78 readonly property url defaultLogo: "file://" + Constants.defaultLogo
82 schema.id: "com.lomiri.Shell.Launcher"
86 logoSettings.logoPictureUri,
87 "image://theme/start-here",
94 font.weight: Font.Normal
96 text: i18n.ctr("string identifying name of the update", "Ubuntu Touch system")
100 font.weight: Font.Light
103 text: i18n.ctr("version of the system update", "Version %1").arg(SystemImage.targetBuildNumber)
108 anchors.left: parent.left
109 anchors.right: parent.right
110 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
111 font.weight: Font.Light
115 text: i18n.tr("This could take a few minutes...")
119 anchors.left: parent.left
120 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
121 color: theme.palette.normal.foreground
123 width: buttonLabel.paintedWidth + units.gu(3)
124 height: buttonLabel.paintedHeight + units.gu(1.8)
129 text: i18n.tr("Install and restart now")
130 font.weight: Font.Light
131 anchors.centerIn: parent
136 objectName: "installButton"
139 System.skipUntilFinishedPage();
140 SystemImage.applyUpdate();
144 transformOrigin: Item.Top
145 scale: button.pressed ? 0.98 : 1.0
148 duration: LomiriAnimation.SnapDuration
149 easing.type: Easing.Linear
157 anchors.centerIn: systemUpdatePage
163 LocalComponents.StackButton {
164 text: i18n.tr("Skip")
165 onClicked: pageStack.next()