Skip to content
additem.qml 1.29 KiB
Newer Older
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2

Item {
    ToolBar {
        id:tools
        anchors.right: parent.right
        anchors.left: parent.left
        RowLayout {
            id:toolrow
            anchors.fill: parent
            ToolButton {
                id:back
                Layout.alignment: Qt.AlignLeft
                onClicked: tools.parent.parent.goBack()
            }
        }
    }
    GridLayout {
        id:grid
        anchors.top: tools.bottom
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        rowSpacing: 2
        columns: 2

        Text {
            text: "Account Name:"
        }
        TextField {
            id: account
        }
        Text {
            text: "Account Secret:"
        }
        TextField {
            id:secret
            echoMode: TextInput.Password
        }
        Text {
            text: "Account Type:"
        }
        ComboBox {
            id:otpType
            model: ["TOTP"] //TODO: later add HOTP
        }
        Text {}
        Button {
            text: "Add"
            onClicked: {
                otpListModel.addItem(account.text,otpType.currentText,secret.text)