@@ -0,0 +1,121 @@
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/>.
18+import QtQuick.Layouts 1.1
19+import Ubuntu.Components 1.3
20+import Ubuntu.SystemImage 0.1
21+import ".." as LocalComponents
23+LocalComponents.Page {
25+ objectName: "systemUpdatePage"
27+ title: i18n.tr("Update Device")
28+ forwardButtonSourceComponent: forwardButton
30+ skip: !SystemImage.updateDownloaded // skip the page when the system update is not ready to install
36+ leftMargin: leftMargin
37+ rightMargin: rightMargin
38+ topMargin: customMargin
43+ anchors.left: parent.left
44+ anchors.right: parent.right
45+ anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
46+ font.weight: Font.Light
49+ text: i18n.tr("There is a system update available and ready to install. Afterwards, the device will automatically restart.")
53+ anchors.left: parent.left
54+ anchors.right: parent.right
57+ rowSpacing: units.gu(1)
58+ columnSpacing: units.gu(2)
62+ aspect: UbuntuShape.Flat
63+ backgroundColor: theme.palette.normal.base
66+ sourceScale: Qt.vector2d(0.5,0.5)
68+ source: Qt.resolvedUrl("/usr/share/icons/suru/apps/scalable/ubuntu-logo-symbolic.svg")
73+ Layout.fillWidth: true
75+ font.weight: Font.Normal
76+ text: i18n.tr("Ubuntu system")
80+ font.weight: Font.Light
82+ text: i18n.tr("Version %1").arg(SystemImage.availableVersion)
86+ font.weight: Font.Light
88+ text: SystemImage.updateSize
93+ anchors.left: parent.left
94+ anchors.right: parent.right
95+ anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
96+ font.weight: Font.Light
100+ text: i18n.tr("This could take a few minutes...")
104+ anchors.left: parent.left
105+ anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
106+ text: i18n.tr("Install and restart now")
108+ // TODO mark the wizard to skip until the finished page for the next boot
109+ SystemImage.applyUpdate();
116+ LocalComponents.StackButton {
117+ text: i18n.tr("Skip")
118+ onClicked: pageStack.next()