on xenial help sign in
visual updates, new Account page
aaf0fefLukáš Tinkl
qml/Wizard/Pages.qml+1−1
@@ -82,7 +82,7 @@ Item {
82 }
82 }
83
83
84 function prev() {
84 function prev() {
85− var isPrimaryPage = !currentPage.customTitle;
85+ var isPrimaryPage = currentPage && !currentPage.customTitle;
86 if (pageList.index >= pageStack.depth - 1) {
86 if (pageList.index >= pageStack.depth - 1) {
87 pageList.prev(); // update pageList.index, but not for extra pages
87 pageList.prev(); // update pageList.index, but not for extra pages
88 }
88 }
qml/Wizard/Pages/40-location.qml+1−2
@@ -233,7 +233,6 @@ LocalComponents.Page {
233 rightMargin: rightMargin
233 rightMargin: rightMargin
234 }
234 }
235 wrapMode: Text.Wrap
235 wrapMode: Text.Wrap
236− textFormat: Text.RichText
237 text: i18n.tr("You can change it later in System Settings.")
236 text: i18n.tr("You can change it later in System Settings.")
238 color: textColor
237 color: textColor
239 fontSize: "small"
238 fontSize: "small"
@@ -260,7 +259,7 @@ LocalComponents.Page {
260 locationActionGroup.gps.activate();
259 locationActionGroup.gps.activate();
261 }
260 }
262 AccountsService.hereEnabled = hereOn;
261 AccountsService.hereEnabled = hereOn;
263− pageStack.next()
262+ pageStack.next();
264 }
263 }
265 }
264 }
266 }
265 }
qml/Wizard/Pages/50-timezone.qml+1−1
@@ -53,7 +53,7 @@ LocalComponents.Page {
53 }
53 }
54 }
54 }
55
55
56− theme.palette.normal.backgroundText = textColor;
56+ theme.palette.normal.backgroundText = "#cdcdcd";
57 searchField.forceActiveFocus();
57 searchField.forceActiveFocus();
58 }
58 }
59
59
qml/Wizard/Pages/60-uaccount-signup.qml → qml/Wizard/Pages/60-account.qmlrenamed+50−55
@@ -22,10 +22,13 @@ import ".." as LocalComponents
22
22
23LocalComponents.Page {
23LocalComponents.Page {
24 objectName: "accountPage"
24 objectName: "accountPage"
25+ title: i18n.tr("Set Administrator Details")
25
26
26− title: i18n.tr("Create Device Account")
27+ forwardButtonSourceComponent: forwardButton
27− customTitle: true
28+
28− buttonBarVisible: false
29+ Component.onCompleted: {
30+ theme.palette.normal.backgroundText = "#cdcdcd";
31+ }
29
32
30 Flickable
33 Flickable
31 {
34 {
@@ -35,40 +38,53 @@ LocalComponents.Page {
35 anchors.fill: content
38 anchors.fill: content
36 anchors.leftMargin: parent.leftMargin
39 anchors.leftMargin: parent.leftMargin
37 anchors.rightMargin: parent.rightMargin
40 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+// }
38
53
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
40 Label {
68 Label {
41− id: emailLabel
69+ id: noticeLabel
42 anchors.left: parent.left
70 anchors.left: parent.left
43 anchors.right: parent.right
71 anchors.right: parent.right
44 wrapMode: Text.Wrap
72 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.")
46 color: textColor
74 color: textColor
75+ fontSize: "small"
47 font.weight: Font.Light
76 font.weight: Font.Light
77+ width: content.width
48 }
78 }
49
79
50− LocalComponents.WizardTextField {
80+ // username
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
64 Label {
81 Label {
65 id: nameLabel
82 id: nameLabel
66 anchors.left: parent.left
83 anchors.left: parent.left
67 anchors.right: parent.right
84 anchors.right: parent.right
68− anchors.top: emailInput.bottom
85+ anchors.top: noticeLabel.bottom
69− anchors.topMargin: units.gu(2)
86+ anchors.topMargin: units.gu(3)
70− wrapMode: Text.Wrap
71− text: i18n.tr("Your name")
87+ text: i18n.tr("User name")
72 color: textColor
88 color: textColor
73 font.weight: Font.Light
89 font.weight: Font.Light
74 }
90 }
@@ -89,7 +105,6 @@ LocalComponents.Page {
89 anchors.right: parent.right
105 anchors.right: parent.right
90 anchors.top: nameInput.bottom
106 anchors.top: nameInput.bottom
91 anchors.topMargin: units.gu(2)
107 anchors.topMargin: units.gu(2)
92− wrapMode: Text.Wrap
93 text: i18n.tr("Password")
108 text: i18n.tr("Password")
94 color: textColor
109 color: textColor
95 font.weight: Font.Light
110 font.weight: Font.Light
@@ -102,6 +117,7 @@ LocalComponents.Page {
102 anchors.top: passLabel.bottom
117 anchors.top: passLabel.bottom
103 anchors.topMargin: units.gu(1)
118 anchors.topMargin: units.gu(1)
104 echoMode: TextInput.Password
119 echoMode: TextInput.Password
120+ placeholderText: i18n.tr("Use a combination of letters and numbers.")
105 KeyNavigation.tab: pass2Input
121 KeyNavigation.tab: pass2Input
106 }
122 }
107
123
@@ -135,43 +151,22 @@ LocalComponents.Page {
135 anchors.top: pass2Label.bottom
151 anchors.top: pass2Label.bottom
136 anchors.topMargin: units.gu(1)
152 anchors.topMargin: units.gu(1)
137 echoMode: TextInput.Password
153 echoMode: TextInput.Password
138− KeyNavigation.tab: cancelButton
154+ KeyNavigation.tab: nameInput
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 }
155 }
156+ }
155
157
156− Button {
158+ Component {
157− id: okButton
159+ id: forwardButton
158− anchors {
160+ LocalComponents.StackButton {
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 !== "" &&
161+ enabled: /*emailInput.acceptableInput && */nameInput.text !== "" &&
167 pass2Input.text.length > 7 && passInput.text === pass2Input.text
162 pass2Input.text.length > 7 && passInput.text === pass2Input.text
163+ text: i18n.tr("Next")
168 onClicked: {
164 onClicked: {
169 root.password = passInput.text;
165 root.password = passInput.text;
170 AccountsService.realName = nameInput.text;
166 AccountsService.realName = nameInput.text;
171− AccountsService.email = emailInput.text;
167+ //AccountsService.email = emailInput.text;
172− pageStack.next() // TODO sign up against U1 in Phase 2
168+ pageStack.next();
173 }
169 }
174− KeyNavigation.tab: emailInput
175 }
170 }
176 }
171 }
177}
172}
qml/Wizard/Pages/70-passwd-type.qml+3−3
@@ -89,11 +89,11 @@ LocalComponents.Page {
89 text: {
89 text: {
90 switch (index) {
90 switch (index) {
91 case 0:
91 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");
93 case 1:
93 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");
95 case 2:
95 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)");
97 case 3:
97 case 3:
98 return i18n.ctr("Label: Type of security method", "No lock code");
98 return i18n.ctr("Label: Type of security method", "No lock code");
99 }
99 }
qml/Wizard/Pages/sim.qml+2−2
@@ -82,7 +82,7 @@ LocalComponents.Page {
82 text: i18n.tr("You won’t be able to make calls or use text messaging without a SIM.")
82 text: i18n.tr("You won’t be able to make calls or use text messaging without a SIM.")
83 fontSize: "small"
83 fontSize: "small"
84 font.weight: Font.Light
84 font.weight: Font.Light
85− color: restartDialog.visible ? Theme.palette.normal.backgroundText : textColor
85+ color: restartDialog.visible ? theme.palette.normal.backgroundText : textColor
86 }
86 }
87
87
88 Label {
88 Label {
@@ -93,7 +93,7 @@ LocalComponents.Page {
93 text: i18n.tr("To proceed with no SIM tap Skip.")
93 text: i18n.tr("To proceed with no SIM tap Skip.")
94 fontSize: "small"
94 fontSize: "small"
95 font.weight: Font.Light
95 font.weight: Font.Light
96− color: restartDialog.visible ? Theme.palette.normal.backgroundText : textColor
96+ color: restartDialog.visible ? theme.palette.normal.backgroundText : textColor
97 }
97 }
98 }
98 }
99
99