@@ -21,7 +21,7 @@ import ".." as LocalComponents
22LocalComponents.Page {
22LocalComponents.Page {
23 objectName: "accountPage"
23 objectName: "accountPage"
24− title: i18n.tr("User Details")
24+ title: i18n.tr("Personalize Your Device")
26 forwardButtonSourceComponent: forwardButton
26 forwardButtonSourceComponent: forwardButton
@@ -32,12 +32,12 @@ LocalComponents.Page {
32 QtObject {
32 QtObject {
35− readonly property bool validInput: true //nameInput.text !== ""
36− // && pass2Input.text.length > 7 && passInput.text === pass2Input.text
38 function advance() {
35 function advance() {
39− //root.password = passInput.text;
36+ var tmp = nameInput.text + " " + surnameInput.text;
40− AccountsService.realName = nameInput.text;
37+ var realName = tmp.trim();
38+ if (realName !== "") {
39+ AccountsService.realName = realName;
41 pageStack.next();
41 pageStack.next();
@@ -50,132 +50,57 @@ LocalComponents.Page {
50 anchors.leftMargin: parent.leftMargin
50 anchors.leftMargin: parent.leftMargin
51 anchors.rightMargin: parent.rightMargin
51 anchors.rightMargin: parent.rightMargin
52 anchors.topMargin: customMargin
52 anchors.topMargin: customMargin
53− height: contentHeight - buttonBarHeight - (Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0) - titleRectHeight
54− contentHeight: contentItem.childrenRect.height
56− Behavior on contentY { UbuntuNumberAnimation{} }
60− id: noticeLabel
56+ id: nameLabel
61 anchors.left: parent.left
57 anchors.left: parent.left
62 anchors.right: parent.right
58 anchors.right: parent.right
63− wrapMode: Text.Wrap
59+ text: i18n.tr("Your Name")
64− text: i18n.tr("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.")
65 color: textColor
60 color: textColor
67 font.weight: Font.Light
61 font.weight: Font.Light
72− // username
64+ LocalComponents.WizardTextField {
66+ objectName: "nameInput"
67+ anchors.left: parent.left
68+ anchors.right: parent.right
69+ anchors.top: nameLabel.bottom
70+ anchors.topMargin: units.gu(1)
71+ inputMethodHints: Qt.ImhNoPredictiveText
72+ onAccepted: surnameInput.forceActiveFocus()
74− id: nameLabel
77+ id: surnameLabel
75 anchors.left: parent.left
78 anchors.left: parent.left
76 anchors.right: parent.right
79 anchors.right: parent.right
77− anchors.top: noticeLabel.bottom
80+ anchors.top: nameInput.bottom
78 anchors.topMargin: units.gu(3)
81 anchors.topMargin: units.gu(3)
79− text: i18n.tr("Your name")
82+ text: i18n.tr("Your Surname")
80 color: textColor
83 color: textColor
81 font.weight: Font.Light
84 font.weight: Font.Light
84 LocalComponents.WizardTextField {
87 LocalComponents.WizardTextField {
85− id: nameInput
88+ id: surnameInput
86− objectName: "nameInput"
89+ objectName: "surnameInput"
87 anchors.left: parent.left
90 anchors.left: parent.left
88 anchors.right: parent.right
91 anchors.right: parent.right
89− anchors.top: nameLabel.bottom
92+ anchors.top: surnameLabel.bottom
90 anchors.topMargin: units.gu(1)
93 anchors.topMargin: units.gu(1)
91−// onActiveFocusChanged: {
93−// column.contentY = nameLabel.y
96 inputMethodHints: Qt.ImhNoPredictiveText
94 inputMethodHints: Qt.ImhNoPredictiveText
97− //onAccepted: passInput.forceActiveFocus()
95+ onAccepted: d.advance()
103−// anchors.left: parent.left
104−// anchors.right: parent.right
105−// anchors.top: nameInput.bottom
106−// anchors.topMargin: units.gu(2)
107−// text: i18n.tr("Password")
109−// font.weight: Font.Light
112−// LocalComponents.WizardTextField {
114−// objectName: "passInput"
115−// anchors.left: parent.left
116−// anchors.right: parent.right
117−// anchors.top: passLabel.bottom
118−// anchors.topMargin: units.gu(1)
119−// echoMode: TextInput.Password
120−// placeholderText: i18n.tr("Use letters and numbers")
121−// inputMethodHints: Qt.ImhNoPredictiveText
122−// onActiveFocusChanged: {
123−// if (activeFocus) {
124−// column.contentY = passLabel.y
127−// onAccepted: pass2Input.forceActiveFocus()
131−// LocalComponents.PasswordMeter {
133−// anchors.left: parent.left
134−// anchors.right: parent.right
135−// anchors.top: passInput.bottom
136−// anchors.topMargin: units.gu(1)
137−// password: passInput.text
140−// // repeat password
143−// anchors.left: parent.left
144−// anchors.right: parent.right
145−// anchors.top: passMeter.bottom
146−// anchors.topMargin: passInput.text !== "" ? units.gu(4) : units.gu(2)
147−// wrapMode: Text.Wrap
148−// text: i18n.tr("Repeat password")
150−// font.weight: Font.Light
153−// LocalComponents.WizardTextField {
155−// objectName: "pass2Input"
156−// anchors.left: parent.left
157−// anchors.right: parent.right
158−// anchors.top: pass2Label.bottom
159−// anchors.topMargin: units.gu(1)
160−// echoMode: TextInput.Password
161−// inputMethodHints: Qt.ImhNoPredictiveText
162−// onActiveFocusChanged: {
163−// if (activeFocus) {
164−// column.contentY = pass2Label.y
167−// onAccepted: if (d.validInput) d.advance();
171 Component {
99 Component {
172 id: forwardButton
100 id: forwardButton
173 LocalComponents.StackButton {
101 LocalComponents.StackButton {
174− enabled: d.validInput
175 text: i18n.tr("Next")
102 text: i18n.tr("Next")
176− onClicked: {
103+ onClicked: d.advance();