summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-08-22 20:49:54 +0700
committerAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-08-22 20:49:54 +0700
commit9d617a46ca8537433eeeaec2d57c30694d3407cd (patch)
treefd53aceec150b18c9c498a1b3f0a45b3cfe69409
parent38f58c78c64fd7c7d555976306c2a9b6f5e6df5a (diff)
parent2679bcec2d5938125634d970f025518c42498628 (diff)
Merge branch 'development' of ssh://darapsa.co.id/usr/local/git/kelakon into development
# Conflicts: # kelakon.qrc
-rw-r--r--.gitignore1
-rw-r--r--Login.qml10
-rw-r--r--kelakon.qrc5
-rw-r--r--main.qml17
-rw-r--r--pages/Email.qml18
-rw-r--r--pages/EmailForm.ui.qml81
6 files changed, 125 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index a97d517..bd1952e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
build-*
*.pro.user
+*.swp
diff --git a/Login.qml b/Login.qml
index 495df70..1e450ce 100644
--- a/Login.qml
+++ b/Login.qml
@@ -1,6 +1,12 @@
import QtQuick 2.12
LoginForm {
- width: appWindow.width
- height: appWindow.height
+ width: appWindow.width
+ height: appWindow.height
+
+ emailButton {
+ onClicked: {
+ stackView.push("qrc:/pages/Email.qml")
+ }
+ }
}
diff --git a/kelakon.qrc b/kelakon.qrc
index 151de66..a3c2a2a 100644
--- a/kelakon.qrc
+++ b/kelakon.qrc
@@ -4,6 +4,11 @@
<file>Login.qml</file>
<file>LoginForm.ui.qml</file>
<file>kelakon-logo.png</file>
+<<<<<<< HEAD
<file>onboarding-1.png</file>
+=======
+ <file>pages/Email.qml</file>
+ <file>pages/EmailForm.ui.qml</file>
+>>>>>>> 2679bcec2d5938125634d970f025518c42498628
</qresource>
</RCC>
diff --git a/main.qml b/main.qml
index fcf3a4d..8fbb800 100644
--- a/main.qml
+++ b/main.qml
@@ -2,10 +2,17 @@ import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
- id: appWindow
- width: 362
- height: 628
- visible: true
+ id: appWindow
+ width: 362
+ height: 628
+ visible: true
+
+ StackView {
+ id: stackView
+ width: 362
+ height: 628
+
+ initialItem: Login {}
+ }
- Login {}
}
diff --git a/pages/Email.qml b/pages/Email.qml
new file mode 100644
index 0000000..05ecb45
--- /dev/null
+++ b/pages/Email.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.12
+
+EmailForm {
+ width: stackView.width
+ height: stackView.height
+
+ loginButton {
+ onClicked: {
+ appWindow.logIn("62" + phoneTextField.text, passwordTextField.text)
+ }
+ }
+
+ laterButton {
+ onClicked: {
+ stackView.pop()
+ }
+ }
+}
diff --git a/pages/EmailForm.ui.qml b/pages/EmailForm.ui.qml
new file mode 100644
index 0000000..498aa6a
--- /dev/null
+++ b/pages/EmailForm.ui.qml
@@ -0,0 +1,81 @@
+import QtQuick 2.12
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 2.12
+
+Rectangle {
+ width: 363
+ height: 628
+ color: "#f44236"
+ border.width: 0
+
+ property alias phoneTextField: phoneTextField
+ property alias passwordTextField: passwordTextField
+ property alias loginButton: loginButton
+ property alias laterButton: laterButton
+
+ Label {
+ x: 124
+ y: 177
+ width: 116
+ height: 17
+ text: qsTr("E-mail")
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ RowLayout {
+ x: 34
+ y: 411
+ width: loginButton.width
+ height: loginButton.height
+ anchors.bottom: passwordTextField.top
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Label {
+ id: prefixLabel
+ text: "+62"
+ }
+
+ TextField {
+ id: phoneTextField
+ width: 303
+ Layout.fillWidth: true
+ placeholderText: "812345678"
+ }
+ }
+
+ TextField {
+ id: passwordTextField
+ x: 34
+ y: 468
+ width: loginButton.width
+ height: loginButton.height
+ anchors.bottom: loginButton.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ echoMode: TextInput.Password
+ placeholderText: qsTr("Kata Sandi")
+ }
+
+ Button {
+ id: loginButton
+ x: 34
+ y: 525
+ width: 296
+ height: 57
+ text: qsTr("Masuk")
+ anchors.bottomMargin: -2
+ anchors.bottom: laterButton.top
+ anchors.horizontalCenterOffset: 0
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ Button {
+ id: laterButton
+ x: 41
+ y: 580
+ text: qsTr("NANTI SAJA")
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 0
+ anchors.left: parent.left
+ anchors.leftMargin: 41
+ }
+}