-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuthenticationPage.qml
92 lines (88 loc) · 2.42 KB
/
AuthenticationPage.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import QtQuick
import "."
import QtQuick.Layouts
Item {
id: control
KeyInput {
id: keyInput
}
StyleButton {
buttonBackgroundColor: "black"
fontColor: "white"
anchors.top: keyInput.bottom
anchors.left: keyInput.left
anchors.right: keyInput.right
anchors.margins: 5
width: parent.width * 0.7
height: parent.height * 0.07
text: "Submit"
// font.pixelSize:32
onClicked: {
if (keyInput.length < 4) {
errorPopup.open()
} else {
confirmPopup.open()
}
}
}
StylePopUp {
id: errorPopup
anchors.centerIn: parent
width: parent.width * 0.7
height: parent.height * 0.5
text: "Error : Please Enter your Stockage Key first :)"
StyleButton {
anchors {
top: parent.bottom
left: parent.left
right: parent.right
margins: 15
// horizontalCenter:parent.horizontalCenter
}
height: rootWindow.height * 0.07
buttonBackgroundColor: "black"
fontColor: "white"
text: "Ok"
onClicked: {
errorPopup.close()
}
}
}
StylePopUp {
id: confirmPopup
anchors.centerIn: parent
width: parent.width * 0.7
height: parent.height * 0.5
text: "Confirmation : Are sure the key is correct?"
RowLayout {
anchors {
top: parent.bottom
left: parent.left
right: parent.right
// horizontalCenter:parent.horizontalCenter
}
height: rootWindow.height * 0.07
spacing: 15
StyleButton {
Layout.fillWidth: true
Layout.fillHeight: true
buttonBackgroundColor: "black"
fontColor: "white"
text: "Yes"
onClicked: {
confirmPopup.close()
}
}
StyleButton {
Layout.fillWidth: true
Layout.fillHeight: true
buttonBackgroundColor: "black"
fontColor: "white"
text: "No"
onClicked: {
confirmPopup.close()
}
}
}
}
}