2 * Copyright (C) 2015-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/>.
18import Lomiri.Components 1.3
19import AccountsService 0.1
20import ".." as LocalComponents
23 objectName: "accountPage"
24 title: i18n.tr("Personalize Your Device")
27 forwardButtonSourceComponent: forwardButton
30 readonly property string validName: nameInput.text.trim()
32 function saveNameAndGoNext() {
34 AccountsService.realName = validName;
44 leftMargin: parent.leftMargin
45 rightMargin: parent.rightMargin
46 topMargin: customMargin
52 anchors.left: parent.left
53 anchors.right: parent.right
54 text: i18n.tr("Preferred Name")
56 font.weight: Font.Light
59 LocalComponents.WizardTextField {
61 objectName: "nameInput"
62 anchors.left: parent.left
63 anchors.right: parent.right
64 inputMethodHints: Qt.ImhNoPredictiveText
65 onAccepted: saveNameAndGoNext()
71 LocalComponents.StackButton {
72 text: validName ? i18n.tr("Next") : i18n.tr("Skip")
73 onClicked: saveNameAndGoNext()