import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import "larva/features"
ApplicationWindow {
signal signUp(string brand)
function push(view, arg) {
busy.visible = false
busy.running = false
stack.push(view + ".qml", {
"arg": arg
})
pushed()
}
signal pushed()
id: window
width: 360
height: 640
visible: true
StackView {
id: stack
anchors.fill: parent
initialItem : Column {
RowLayout {
ColumnLayout {
Text {
text: "namatoko_arm64-v8a.apk"
onLinkActivated: Qt.openUrlExternally(link)
}
Text {
text: "namatoko_armeabi-v7a.apk"
onLinkActivated: Qt.openUrlExternally(link)
}
}
Image {
fillMode: Image.PreserveAspectFit
source: "images/onboarding-illustration-1.png"
}
}
EmailForm {
anchors.bottom: parent.bottom
width: parent.width
backButton.visible: false
instructionLabel {
text: qsTr("Cukup masukkan nama toko Anda, et voilĂ !")
font.pointSize: 18
}
emailTextField {
placeholderText: "Contoh: Tokomata"
validator: RegularExpressionValidator {
regularExpression: /[a-zA-Z0-9]+/
}
onTextChanged: if (!emailTextField.text || !loginButton.enabled)
loginButton.enabled = !loginButton.enabled
}
loginButton {
text: qsTr("Mulai berjualan!")
onClicked: {
this.enabled = false
busy.running = true
busy.visible = true
signUp(emailTextField.text)
}
}
}
}
}
BusyIndicator {
id: busy
anchors.centerIn: parent
visible: false
running: false
}
}