blob: c41dcef1a62f215582a8e16e717471f4f949911f [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001/*
2 * Copyright (C) 2020 by Savoir-faire Linux
3 * Author: Yang Wang <yang.wang@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.14
20import QtQuick.Layouts 1.3
21import QtQuick.Controls 2.14
22
23import "../../constant"
24import "../../commoncomponents"
25
26ColumnLayout {
27 property alias text_usernameManagerEditAlias: usernameManagerEdit.text
28 property alias text_passwordManagerEditAlias: passwordManagerEdit.text
29 property alias text_accountManagerEditAlias: accountManagerEdit.text
30
31 function initializeOnShowUp() {
32 clearAllTextFields()
33 }
34
35 function clearAllTextFields() {
36 usernameManagerEdit.clear()
37 passwordManagerEdit.clear()
38 accountManagerEdit.clear()
39 }
40
41 Layout.fillWidth: true
42 Layout.fillHeight: true
43
44 Item {
45 Layout.alignment: Qt.AlignHCenter
46 Layout.preferredHeight: 40
47 Layout.fillWidth: true
48 Layout.fillHeight: true
49 }
50
51 ColumnLayout {
52 Layout.alignment: Qt.AlignCenter
53 Layout.fillWidth: true
54
55 spacing: 12
56
57 Label {
58 id: signInLabel
59
60 Layout.alignment: Qt.AlignHCenter
61 Layout.minimumWidth: 256
62 Layout.preferredHeight: 21
63 text: qsTr("Sign in")
64 font.pointSize: 13
65 font.kerning: true
66 }
67
68 InfoLineEdit {
69 id: usernameManagerEdit
70
71 Layout.alignment: Qt.AlignHCenter
72
73 selectByMouse: true
74 placeholderText: qsTr("Username")
75 }
76
77 InfoLineEdit {
78 id: passwordManagerEdit
79
80 Layout.alignment: Qt.AlignHCenter
81 selectByMouse: true
82 echoMode: TextInput.Password
83 placeholderText: qsTr("Password")
84 }
85
86 InfoLineEdit {
87 id: accountManagerEdit
88
89 Layout.alignment: Qt.AlignHCenter
90
91 selectByMouse: true
92 placeholderText: qsTr("Account Manager")
93 }
94 }
95
96 Item {
97 Layout.alignment: Qt.AlignHCenter
98 Layout.preferredHeight: 40
99 Layout.fillWidth: true
100 Layout.fillHeight: true
101 }
102}