on xenial help sign in
visual updates, new Account page
commitaaf0fef759e3811d2026414b9e79e3fef639cc79 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 25 Nov 2015, 23:59 (11 years ago) parent3eaf28c
6 files changed+58−64
qml/Wizard/Pages.qml+1−1 qml/Wizard/Pages/40-location.qml+1−2 qml/Wizard/Pages/50-timezone.qml+1−1 qml/Wizard/Pages/60-uaccount-signup.qml → qml/Wizard/Pages/60-account.qml+50−55 qml/Wizard/Pages/70-passwd-type.qml+3−3 qml/Wizard/Pages/sim.qml+2−2
qml/Wizard/Pages.qml+1−1
@@ -82,7 +82,7 @@ Item {
8282 }
8383
8484 function prev() {
85− var isPrimaryPage = !currentPage.customTitle;
85+ var isPrimaryPage = currentPage && !currentPage.customTitle;
8686 if (pageList.index >= pageStack.depth - 1) {
8787 pageList.prev(); // update pageList.index, but not for extra pages
8888 }
qml/Wizard/Pages/40-location.qml+1−2
@@ -233,7 +233,6 @@ LocalComponents.Page {
233233 rightMargin: rightMargin
234234 }
235235 wrapMode: Text.Wrap
236− textFormat: Text.RichText
237236 text: i18n.tr("You can change it later in System Settings.")
238237 color: textColor
239238 fontSize: "small"
@@ -260,7 +259,7 @@ LocalComponents.Page {
260259 locationActionGroup.gps.activate();
261260 }
262261 AccountsService.hereEnabled = hereOn;
263− pageStack.next()
262+ pageStack.next();
264263 }
265264 }
266265 }
qml/Wizard/Pages/50-timezone.qml+1−1
@@ -53,7 +53,7 @@ LocalComponents.Page {
5353 }
5454 }
5555
56− theme.palette.normal.backgroundText = textColor;
56+ theme.palette.normal.backgroundText = "#cdcdcd";
5757 searchField.forceActiveFocus();
5858 }
5959
qml/Wizard/Pages/60-uaccount-signup.qml → qml/Wizard/Pages/60-account.qmlrenamed+50−55
@@ -22,10 +22,13 @@ import ".." as LocalComponents
2222
2323LocalComponents.Page {
2424 objectName: "accountPage"
25+ title: i18n.tr("Set Administrator Details")
2526
26− title: i18n.tr("Create Device Account")
27− customTitle: true
28− buttonBarVisible: false
27+ forwardButtonSourceComponent: forwardButton
28+
29+ Component.onCompleted: {
30+ theme.palette.normal.backgroundText = "#cdcdcd";
31+ }
2932
3033 Flickable
3134 {
@@ -35,40 +38,53 @@ LocalComponents.Page {
3538 anchors.fill: content
3639 anchors.leftMargin: parent.leftMargin
3740 anchors.rightMargin: parent.rightMargin
41+ anchors.topMargin: customMargin
42+
43+// // email
44+// Label {
45+// id: emailLabel
46+// anchors.left: parent.left
47+// anchors.right: parent.right
48+// wrapMode: Text.Wrap
49+// text: i18n.tr("Email")
50+// color: textColor
51+// font.weight: Font.Light
52+// }
3853
39− // email
54+// LocalComponents.WizardTextField {
55+// id: emailInput
56+// anchors.left: parent.left
57+// anchors.right: parent.right
58+// anchors.top: emailLabel.bottom
59+// anchors.topMargin: units.gu(1)
60+// inputMethodHints: Qt.ImhEmailCharactersOnly
61+// validator: RegExpValidator {
62+// regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
63+// }
64+// KeyNavigation.tab: nameInput
65+// }
66+
67+ // notice
4068 Label {
41− id: emailLabel
69+ id: noticeLabel
4270 anchors.left: parent.left
4371 anchors.right: parent.right
4472 wrapMode: Text.Wrap
45− text: i18n.tr("Email")
73+ text: i18n.tr("Please enter a password to create your user account. You need this password to administer your device.")
4674 color: textColor
75+ fontSize: "small"
4776 font.weight: Font.Light
77+ width: content.width
4878 }
4979
50− LocalComponents.WizardTextField {
51− id: emailInput
52− anchors.left: parent.left
53− anchors.right: parent.right
54− anchors.top: emailLabel.bottom
55− anchors.topMargin: units.gu(1)
56− inputMethodHints: Qt.ImhEmailCharactersOnly
57− validator: RegExpValidator {
58− regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
59− }
60− KeyNavigation.tab: nameInput
61− }
62−
63− // name
80+ // username
6481 Label {
6582 id: nameLabel
6683 anchors.left: parent.left
6784 anchors.right: parent.right
68− anchors.top: emailInput.bottom
69− anchors.topMargin: units.gu(2)
70− wrapMode: Text.Wrap
71− text: i18n.tr("Your name")
85+ anchors.top: noticeLabel.bottom
86+ anchors.topMargin: units.gu(3)
87+ text: i18n.tr("User name")
7288 color: textColor
7389 font.weight: Font.Light
7490 }
@@ -89,7 +105,6 @@ LocalComponents.Page {
89105 anchors.right: parent.right
90106 anchors.top: nameInput.bottom
91107 anchors.topMargin: units.gu(2)
92− wrapMode: Text.Wrap
93108 text: i18n.tr("Password")
94109 color: textColor
95110 font.weight: Font.Light
@@ -102,6 +117,7 @@ LocalComponents.Page {
102117 anchors.top: passLabel.bottom
103118 anchors.topMargin: units.gu(1)
104119 echoMode: TextInput.Password
120+ placeholderText: i18n.tr("Use a combination of letters and numbers.")
105121 KeyNavigation.tab: pass2Input
106122 }
107123
@@ -135,43 +151,22 @@ LocalComponents.Page {
135151 anchors.top: pass2Label.bottom
136152 anchors.topMargin: units.gu(1)
137153 echoMode: TextInput.Password
138− KeyNavigation.tab: cancelButton
139− }
140−
141− // buttons
142− Button {
143− id: cancelButton
144− anchors {
145− top: pass2Input.bottom
146− left: parent.left
147− right: parent.horizontalCenter
148− rightMargin: units.gu(1)
149− topMargin: units.gu(4)
150− }
151− text: i18n.tr("Cancel")
152− onClicked: pageStack.prev()
153− KeyNavigation.tab: okButton
154+ KeyNavigation.tab: nameInput
154155 }
156+ }
155157
156− Button {
157− id: okButton
158− anchors {
159− top: pass2Input.bottom
160− left: parent.horizontalCenter
161− right: parent.right
162− leftMargin: units.gu(1)
163− topMargin: units.gu(4)
164− }
165− text: i18n.tr("Sign Up")
166− enabled: emailInput.acceptableInput && nameInput.text !== "" &&
158+ Component {
159+ id: forwardButton
160+ LocalComponents.StackButton {
161+ enabled: /*emailInput.acceptableInput && */nameInput.text !== "" &&
167162 pass2Input.text.length > 7 && passInput.text === pass2Input.text
163+ text: i18n.tr("Next")
168164 onClicked: {
169165 root.password = passInput.text;
170166 AccountsService.realName = nameInput.text;
171− AccountsService.email = emailInput.text;
172− pageStack.next() // TODO sign up against U1 in Phase 2
167+ //AccountsService.email = emailInput.text;
168+ pageStack.next();
173169 }
174− KeyNavigation.tab: emailInput
175170 }
176171 }
177172}
qml/Wizard/Pages/70-passwd-type.qml+3−3
@@ -89,11 +89,11 @@ LocalComponents.Page {
8989 text: {
9090 switch (index) {
9191 case 0:
92− return i18n.ctr("Label: Type of security method", "Device account password");
92+ return i18n.ctr("Label: Type of security method", "Ubuntu administrator password");
9393 case 1:
94− return i18n.ctr("Label: Type of security method", "New password");
94+ return i18n.ctr("Label: Type of security method", "Create new password");
9595 case 2:
96− return i18n.ctr("Label: Type of security method", "Passcode (numbers only)");
96+ return i18n.ctr("Label: Type of security method", "Create passcode (numbers only)");
9797 case 3:
9898 return i18n.ctr("Label: Type of security method", "No lock code");
9999 }
qml/Wizard/Pages/sim.qml+2−2
@@ -82,7 +82,7 @@ LocalComponents.Page {
8282 text: i18n.tr("You won’t be able to make calls or use text messaging without a SIM.")
8383 fontSize: "small"
8484 font.weight: Font.Light
85− color: restartDialog.visible ? Theme.palette.normal.backgroundText : textColor
85+ color: restartDialog.visible ? theme.palette.normal.backgroundText : textColor
8686 }
8787
8888 Label {
@@ -93,7 +93,7 @@ LocalComponents.Page {
9393 text: i18n.tr("To proceed with no SIM tap Skip.")
9494 fontSize: "small"
9595 font.weight: Font.Light
96− color: restartDialog.visible ? Theme.palette.normal.backgroundText : textColor
96+ color: restartDialog.visible ? theme.palette.normal.backgroundText : textColor
9797 }
9898 }
9999