on xenial help sign in
add a spinner
ab4b8a6Lukáš Tinkl
qml/Wizard/Pages/77-system-update.qml+16−2
@@ -21,7 +21,7 @@ import Ubuntu.SystemImage 0.1
21import ".." as LocalComponents
21import ".." as LocalComponents
22
22
23LocalComponents.Page {
23LocalComponents.Page {
24− id: reportingPage
24+ id: systemUpdatePage
25 objectName: "systemUpdatePage"
25 objectName: "systemUpdatePage"
26
26
27 title: i18n.tr("Update Device")
27 title: i18n.tr("Update Device")
@@ -38,6 +38,10 @@ LocalComponents.Page {
38 topMargin: customMargin
38 topMargin: customMargin
39 }
39 }
40 spacing: units.gu(3)
40 spacing: units.gu(3)
41+ opacity: spinner.running ? 0.5 : 1
42+ Behavior on opacity {
43+ UbuntuNumberAnimation {}
44+ }
41
45
42 Label {
46 Label {
43 anchors.left: parent.left
47 anchors.left: parent.left
@@ -117,7 +121,10 @@ LocalComponents.Page {
117 id: button
121 id: button
118 objectName: "installButton"
122 objectName: "installButton"
119 anchors.fill: parent
123 anchors.fill: parent
124+ onClicked: {
125+ spinner.running = true;
120− onClicked: SystemImage.applyUpdate(); // TODO mark the wizard to skip until the finished page for the next boot
126+ SystemImage.applyUpdate(); // TODO mark the wizard to skip until the finished page for the next boot
127+ }
121 }
128 }
122
129
123 transformOrigin: Item.Top
130 transformOrigin: Item.Top
@@ -131,6 +138,13 @@ LocalComponents.Page {
131 }
138 }
132 }
139 }
133
140
141+ ActivityIndicator {
142+ id: spinner
143+ anchors.centerIn: systemUpdatePage
144+ running: false
145+ visible: running
146+ }
147+
134 Component {
148 Component {
135 id: forwardButton
149 id: forwardButton
136 LocalComponents.StackButton {
150 LocalComponents.StackButton {