diff --git a/qml/AboutDialog.qml b/qml/AboutDialog.qml new file mode 100644 index 0000000..1c95fde --- /dev/null +++ b/qml/AboutDialog.qml @@ -0,0 +1,64 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.1 as Controls +import QtQuick.Layouts 1.2 +import QtQuick.Dialogs 1.3 +import org.kde.kirigami 2.4 as Kirigami + +BasicDialog { + standardButtons: Controls.Dialog.Ok + padding: Kirigami.Units.smallSpacing + + ColumnLayout { + anchors.fill: parent + Image { + readonly property double size: Kirigami.Units.gridUnit * 13 + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: size + Layout.preferredHeight: size + source: "qrc:/icons/hicolor/scalable/apps/passwordmanager.svg" + sourceSize.width: size + sourceSize.height: size + } + Controls.Label { + Layout.fillWidth: true + text: app.applicationName + font.bold: true + font.pointSize: font.pointSize * 1.2 + horizontalAlignment: Text.AlignHCenter + } + Controls.Label { + Layout.fillWidth: true + text: app.applicationVersion + horizontalAlignment: Text.AlignHCenter + } + Controls.Label { + Layout.fillWidth: true + text: description + font.italic: true + horizontalAlignment: Text.AlignHCenter + wrapMode: Text.Wrap + } + Controls.Label { + Layout.fillWidth: true + text: "" + + app.organizationDomain + "" + horizontalAlignment: Text.AlignHCenter + onLinkActivated: openWebsite() + wrapMode: Text.Wrap + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: parent.openWebsite() + } + function openWebsite() { + Qt.openUrlExternally(app.organizationDomain) + } + } + Controls.Label { + Layout.fillWidth: true + text: qsTr("developed by %1").arg(app.organizationName) + horizontalAlignment: Text.AlignHCenter + wrapMode: Text.Wrap + } + } +} diff --git a/qml/main.qml b/qml/main.qml index d6e8719..db69b3e 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -210,64 +210,8 @@ Kirigami.ApplicationWindow { } Component.onCompleted: nativeInterface.init() - BasicDialog { + AboutDialog { id: aboutDialog - standardButtons: Controls.Dialog.Ok - padding: Kirigami.Units.smallSpacing - - ColumnLayout { - anchors.fill: parent - Image { - readonly property double size: Kirigami.Units.gridUnit * 13 - Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: size - Layout.preferredHeight: size - source: "qrc:/icons/hicolor/scalable/apps/passwordmanager.svg" - sourceSize.width: size - sourceSize.height: size - } - Controls.Label { - Layout.fillWidth: true - text: app.applicationName - font.bold: true - font.pointSize: font.pointSize * 1.2 - horizontalAlignment: Text.AlignHCenter - } - Controls.Label { - Layout.fillWidth: true - text: app.applicationVersion - horizontalAlignment: Text.AlignHCenter - } - Controls.Label { - Layout.fillWidth: true - text: description - font.italic: true - horizontalAlignment: Text.AlignHCenter - wrapMode: Text.Wrap - } - Controls.Label { - Layout.fillWidth: true - text: "" - + app.organizationDomain + "" - horizontalAlignment: Text.AlignHCenter - onLinkActivated: openWebsite() - wrapMode: Text.Wrap - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: parent.openWebsite() - } - function openWebsite() { - Qt.openUrlExternally(app.organizationDomain) - } - } - Controls.Label { - Layout.fillWidth: true - text: qsTr("developed by %1").arg(app.organizationName) - horizontalAlignment: Text.AlignHCenter - wrapMode: Text.Wrap - } - } } PasswordDialog { @@ -475,6 +419,10 @@ Kirigami.ApplicationWindow { } function pushStackEntry(entryModel, rootIndex) { + console.warn("push stack entry") + console.warn(entryModel) + console.warn(rootIndex) + console.warn(entryModel.data(rootIndex)) pageStack.push(lastEntriesPage = entriesComponent.createObject(root, { "entryModel": entryModel, "rootIndex": rootIndex diff --git a/resources/qml.qrc b/resources/qml.qrc index 7e094d2..92f55d3 100644 --- a/resources/qml.qrc +++ b/resources/qml.qrc @@ -5,6 +5,7 @@ ../qml/main.qml ../qml/BasicDialog.qml + ../qml/AboutDialog.qml ../qml/PasswordDialog.qml ../qml/EntriesPage.qml ../qml/FieldsPage.qml