diff --git a/CellFrameDashboardGUI/DapUiQmlRecoveryNotesForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlRecoveryNotesForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..8ed1b631b173aaa028354bc49908bee4ce3c4b0c --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlRecoveryNotesForm.ui.qml @@ -0,0 +1,314 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.5 +import QtQuick.Layouts 1.1 + +Rectangle { + property alias pressedBackButton: mouseAreaBackButton.pressed + property alias pressedNextButtonForCreateWallet: nextButton.pressed + + id: recoveryNoteMenu + width: 400 + height: 640 + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#edeff2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } + + Rectangle { + id: newWalletArea + height: 36 + color: "#edeff2" + border.width: 0 + anchors.right: parent.right + anchors.rightMargin: 1 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: parent.top + anchors.topMargin: 0 + + Text { + id: newWalletText + text: qsTr("New wallet") + anchors.verticalCenter: parent.verticalCenter + anchors.left: backButton.right + anchors.leftMargin: 12 + font.pointSize: 12 + } + + Button { + id: backButton + width: 20 + height: 20 + anchors.leftMargin: 16 + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.horizontalCenter: newNameArea.Center + + MouseArea { + id: mouseAreaBackButton + anchors.leftMargin: 0 + anchors.fill: parent + hoverEnabled: true + } + + background: Image { + id: imageButton + source: mouseAreaBackButton.containsMouse ? "qrc:/Resources/Icons/back_icon_hover.png" : "qrc:/Resources/Icons/back_icon.png" + fillMode: Image.PreserveAspectFit + } + } + } + + Rectangle { + id: wordTextArea + height: 30 + color: "#757184" + anchors.rightMargin: 1 + anchors.leftMargin: 1 + anchors.right: parent.right + anchors.left: parent.left + anchors.top: newWalletArea.bottom + + Text { + id: wordText + color: "#ffffff" + text: qsTr("24 words") + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.top: parent.top + anchors.topMargin: 8 + anchors.left: parent.left + anchors.leftMargin: 16 + font.pointSize: 10 + horizontalAlignment: Text.AlignLeft + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + } + } + + Rectangle { + id: saveNotesDescription + color: "#edeff2" + height: 42 + anchors.top: wordTextArea.bottom + anchors.topMargin: 24 + anchors.left: wordTextArea.left + anchors.right: wordTextArea.right + + Text { + anchors.fill: parent + text: qsTr("Keep these words in a safe place. They will be\nrequired to restore your wallet in case of loss of\naccess to it") + anchors.leftMargin: 1 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + color: "#FF0300" + + font { + pointSize: 10 + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + } + } + + Rectangle { + id: recoveryWords + height: 210 + anchors.top: saveNotesDescription.bottom + anchors.topMargin: 24 + anchors.right: parent.right + anchors.left: parent.left + anchors.leftMargin: 1 * pt + anchors.rightMargin: 1 * pt + color: "#edeff2" + + ListModel { + id: listRecoveryWords + ListElement { + word: "Word1" + } + ListElement { + word: "Word2" + } + ListElement { + word: "Word3" + } + ListElement { + word: "Word4" + } + ListElement { + word: "Word5" + } + ListElement { + word: "Word6" + } + ListElement { + word: "Word7" + } + ListElement { + word: "Word8" + } + ListElement { + word: "Word9" + } + ListElement { + word: "Word10" + } + ListElement { + word: "Word11" + } + ListElement { + word: "Word12" + } + } + + RowLayout { + spacing: 60 + height: parent.height + anchors.right: parent.right + anchors.rightMargin: 1 + anchors.left: parent.left + anchors.leftMargin: 1 + + ListView { + height: parent.height + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 50 + model: listRecoveryWords + delegate: Text { + text: word + color: "#070023" + font { + pointSize: 12 + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + } + } + + ListView { + height: parent.height + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 50 + model: listRecoveryWords + delegate: Text { + text: word + color: "#070023" + font { + pointSize: 12 + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + } + } + } + } + + Rectangle { + id: notifyNotesSavedArea + height: 70 + anchors.top: recoveryWords.bottom + anchors.topMargin: 24 + anchors.left: parent.left + anchors.right: parent.right + color: "#EDEFF2" + anchors.leftMargin: 1 + + Text { + id: notifyText + anchors.centerIn: parent + text: qsTr("") + color: "#6F9F00" + font.pointSize: 14 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + } + + RowLayout { + id: actionButtons + height: 44 + anchors.leftMargin: 1 + spacing: 30 + anchors.top: notifyNotesSavedArea.bottom + anchors.topMargin: 24 + anchors.left: parent.left + anchors.right: parent.right + Layout.leftMargin: 26 + Layout.columnSpan: 2 + + Button { + id: nextButton + height: 44 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 130 + + Text { + id: nextButtonText + text: qsTr("Next") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: "#ffffff" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 16 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: "#3E3853" + } + } + + Button { + id: copyNotesButton + height: 44 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 130 + checkable: true + + Text { + id: copyNotesButtonText + text: qsTr("Copy") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: copyNotesButton.checked ? "#3E3853" : "#FFFFFF" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 16 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: copyNotesButton.checked ? "#EDEFF2" : "#3E3853" + border.color: "#3E3853" + border.width: 1 * pt + } + + onClicked: notifyText.text = qsTr( + "Recovery words copied to clipboard. Keep them in a\nsafe place before proceeding to the next step.") + } + } +} + +/*##^## +Designer { + D{i:24;anchors_width:400} +} +##^##*/ + diff --git a/CellFrameDashboardGUI/DapUiQmlRecoveryQrForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlRecoveryQrForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..a21fe3d86a651b7089c9d1696974d3135031ab06 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlRecoveryQrForm.ui.qml @@ -0,0 +1,227 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.5 +import QtQuick.Layouts 1.1 + +Rectangle { + property alias pressedBackButton: mouseAreaBackButton.pressed + property alias pressedNextButtonForCreateWallet: nextButton.pressed + + id: recoveryQrMenu + width: 400 + height: 640 + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#edeff2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } + + Rectangle { + id: newWalletArea + height: 36 + color: "#edeff2" + anchors.right: parent.right + anchors.rightMargin: 1 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: parent.top + anchors.topMargin: 0 + + Text { + id: newWalletText + text: qsTr("New wallet") + anchors.verticalCenter: parent.verticalCenter + anchors.left: backButton.right + anchors.leftMargin: 12 + font.pointSize: 12 + } + + Button { + id: backButton + width: 20 + height: 20 + anchors.verticalCenter: parent.verticalCenter + anchors.left: newNameArea.left + anchors.horizontalCenter: newNameArea.Center + + MouseArea { + id: mouseAreaBackButton + anchors.fill: parent + hoverEnabled: true + } + + background: Image { + id: imageButton + source: mouseAreaBackButton.containsMouse ? "qrc:/Resources/Icons/back_icon_hover.png" : "qrc:/Resources/Icons/back_icon.png" + fillMode: Image.PreserveAspectFit + } + } + } + + Rectangle { + id: qrCodeTextArea + height: 30 + color: "#757184" + anchors.right: parent.right + anchors.left: parent.left + anchors.top: newWalletArea.bottom + + Text { + id: qrCodeText + color: "#ffffff" + text: qsTr("QR Code") + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.top: parent.top + anchors.topMargin: 8 + anchors.left: parent.left + anchors.leftMargin: 16 + font.pointSize: 10 + horizontalAlignment: Text.AlignLeft + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + } + } + + Rectangle { + id: saveQrCodeDescription + color: "#edeff2" + height: 42 + anchors.top: qrCodeTextArea.bottom + anchors.topMargin: 24 + anchors.left: qrCodeTextArea.left + anchors.right: qrCodeTextArea.right + anchors.leftMargin: 1 * pt + anchors.rightMargin: 1 * pt + + Text { + anchors.fill: parent + text: qsTr("Keep these QR-code in a safe place. They will be\nrequired to restore your wallet in case of loss of\naccess to it") + font.pointSize: 10 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + color: "#FF0300" + + font { + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + } + } + + Rectangle { + id: qrCodeImageArea + height: 200 + anchors.top: saveQrCodeDescription.bottom + anchors.topMargin: 24 + anchors.left: parent.left + anchors.right: parent.right + color: "#EDEFF2" + anchors.leftMargin: 1 + + Image { + id: qrCodeImage + width: parent.height + height: parent.height + anchors.horizontalCenter: parent.horizontalCenter + source: "Resources/QRCode.png" + } + } + + Rectangle { + id: notifyQrCodeSavedArea + height: 100 + anchors.top: qrCodeImageArea.bottom + anchors.topMargin: 24 + anchors.left: parent.left + anchors.right: parent.right + color: "#EDEFF2" + anchors.leftMargin: 1 + + Text { + id: notifyText + anchors.centerIn: parent + text: qsTr("") + color: "#6F9F00" + font.pointSize: 14 + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + } + + RowLayout { + id: actionButtons + height: 44 + anchors.leftMargin: 1 + spacing: 60 + anchors.top: notifyQrCodeSavedArea.bottom + anchors.topMargin: 24 + anchors.left: parent.left + anchors.right: parent.right + Layout.leftMargin: 26 + Layout.columnSpan: 2 + + Button { + id: nextButton + height: 44 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 130 + + Text { + id: nextButtonText + text: qsTr("Next") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: "#ffffff" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 16 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: "#3E3853" + } + } + + Button { + id: saveQrCodeButton + height: 44 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + width: 130 + checkable: true + + Text { + id: saveQrCodeButtonText + text: qsTr("Save") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: saveQrCodeButton.checked ? "#3E3853" : "#FFFFFF" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 16 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: saveQrCodeButton.checked ? "#EDEFF2" : "#3E3853" + border.color: "#3E3853" + border.width: 1 * pt + } + + onClicked: notifyText.text = qsTr( + "QR-code saved. Keep them in a\nsafe place before proceeding to the next step.") + } + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlScreenDialog.qml b/CellFrameDashboardGUI/DapUiQmlScreenDialog.qml index 7423cdc55b25e9133b9ba8b0a9573c86155f0473..fe66219f2cca8f6cd25d911abbb8653ffd589a61 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenDialog.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenDialog.qml @@ -3,6 +3,8 @@ import QtQuick.Controls 2.2 import CellFrameDashboard 1.0 Page { + property alias rightPanelLoaderSource: rightPanelLoader.source + id: dapUiQmlScreenDialog title: qsTr("Dashboard") anchors.fill: parent @@ -58,14 +60,59 @@ Page { } } - DapUiQmlWidgetLastActions { - viewModel: dapHistoryModel - viewDelegate: DapUiQmlWidgetLastActionsDelegateForm {} - viewSection.property: "date" - viewSection.criteria: ViewSection.FullString - viewSection.delegate: DapUiQmlWidgetLastActionsSectionForm { - width: parent.width - height: 30 * pt +// DapUiQmlWidgetLastActions { +// id: lastActionsHistory +// viewModel: dapHistoryModel +// viewDelegate: DapUiQmlWidgetLastActionsDelegateForm {} +// viewSection.property: "date" +// viewSection.criteria: ViewSection.FullString +// viewSection.delegate: DapUiQmlWidgetLastActionsSectionForm { +// width: parent.width +// height: 30 * pt +// } +// } + + Rectangle { + id: rightPanel + anchors.bottom: parent.bottom + anchors.top: parent.top + anchors.right: parent.right + width: 400 * pt + + Loader { + id: rightPanelLoader + clip: true + anchors.fill: parent + source: "DapUiQmlWidgetLastActions.qml" + } + + Connections { + target: rectangleStatusBar + onAddWalletPressedChanged: rightPanelLoader.source = "DapUiQmlScreenDialogAddWalletForm.ui.qml" + } + + Connections { + target: rightPanelLoader.item + onPressedCloseAddWalletChanged: rightPanelLoader.source = "DapUiQmlWidgetLastActions.qml" + onPressedDoneCreateWalletChanged: rightPanelLoader.source = "DapUiQmlWidgetLastActions.qml" + onPressedNextButtonChanged: { + if(rightPanelLoader.item.isWordsRecoveryMethodChecked) rightPanelLoader.source = "DapUiQmlRecoveryNotesForm.ui.qml"; + else if(rightPanelLoader.item.isQRCodeRecoveryMethodChecked) rightPanelLoader.source = "DapUiQmlRecoveryQrForm.ui.qml"; + else if(rightPanelLoader.item.isExportToFileRecoveryMethodChecked) console.debug("Export to file"); /*TODO: create dialog select file to export */ + else rightPanelLoader.source = "DapUiQmlWalletCreatedForm.ui.qml" + } + onPressedBackButtonChanged: rightPanelLoader.source = "DapUiQmlScreenDialogAddWalletForm.ui.qml" + onPressedNextButtonForCreateWalletChanged: rightPanelLoader.source = "DapUiQmlWalletCreatedForm.ui.qml" } } } + + + + + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWallet.qml b/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWallet.qml index 6b7f671717022e688deab1814f7b18e86ddb84cf..3d9d8efb6fc86bd2937664f50ddbf93805113876 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWallet.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWallet.qml @@ -2,141 +2,13 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import CellFrameDashboard 1.0 -Dialog { +DapUiQmlScreenDialogAddWalletForm { id: dialogAddWallet focus: true - modal: true - - header: - Rectangle - { - height: 30 - color: "#353841" - - Text - { - id: textTitle - leftPadding: 10 - anchors.verticalCenter: parent.verticalCenter - text: qsTr("Add wallet...") - font.family: "Roboto" - font.pixelSize: 16 - color: "white" - } - Rectangle - { - anchors.bottom: parent.bottom - height: 2 - width: parent.width - color: "green" - } - } - - width: parent.width/1.5 - height: 150 - - x: parent.width / 2 - width / 2 - y: parent.height / 2 - height / 2 - - function show() { - dialogAddWallet.open(); - } - contentItem: - - Rectangle - { - anchors.fill: parent - - TextField - { - background: Rectangle { - radius: 1 - border.color: "green" - border.width: 1 - } - - id: textFieldNameWallet - selectByMouse: true - height: 35 - anchors.bottom: buttonOk.top - anchors.bottomMargin: 20 - anchors.right: parent.right - anchors.rightMargin: 10 - anchors.left: parent.left - anchors.leftMargin: 10 - font.pixelSize: 20 - clip: true - placeholderText: qsTr("Enter the name of the wallet") - - } - - Button - { - id: buttonCancel - text: qsTr("Cancel") - anchors.right: buttonOk.left - anchors.rightMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 - - contentItem: Text { - text: buttonCancel.text - font: buttonCancel.font - opacity: enabled ? 1.0 : 0.3 - color: buttonCancel.down ? "#353841" : "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 30 - opacity: enabled ? 1 : 0.3 - color: buttonCancel.down ? "white" : "#353841" - radius: 4 - } - - onClicked: - { - textFieldNameWallet.clear() - close() - } - } - - Button - { - id: buttonOk - text: "OK" - anchors.right: parent.right - anchors.rightMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 - contentItem: Text { - text: buttonOk.text - font: buttonOk.font - opacity: enabled ? 1.0 : 0.3 - color: buttonOk.down ? "#353841" : "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 30 - opacity: enabled ? 1 : 0.3 - color: buttonOk.down ? "white" : "#353841" - radius: 4 - } - - onClicked: - { - dapServiceController.addWallet(textFieldNameWallet.text) - textFieldNameWallet.clear() - close() - } - } - } +} +/*##^## +Designer { + D{i:0;autoSize:true;height:0;width:0} } +##^##*/ diff --git a/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWalletForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWalletForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..57feb1d440214611b4a115bc4eabcaf525ae47bf --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlScreenDialogAddWalletForm.ui.qml @@ -0,0 +1,283 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.1 + +Rectangle { + property alias pressedCloseAddWallet: mouseAreaCloseAddWallet.pressed + property alias pressedNextButton: mouseAreaNextButton.pressed + property bool isWordsRecoveryMethodChecked: selectionWords.checked + property bool isQRCodeRecoveryMethodChecked: selectionQRcode.checked + property bool isExportToFileRecoveryMethodChecked: selectionExportToFile.checked + + id: addWalletMenu + width: 640 + height: 800 + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#EDEFF2" + visible: true + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } + + Rectangle { + id: newNameArea + height: 36 + color: "#edeff2" + anchors.right: parent.right + anchors.rightMargin: 1 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: parent.top + anchors.topMargin: 0 + + Text { + id: newNameAreaText + text: qsTr("New wallet") + anchors.verticalCenter: parent.verticalCenter + anchors.left: buttonCloseAddWallet.right + anchors.leftMargin: 12 + font.pointSize: 14 + } + + Button { + id: buttonCloseAddWallet + width: 20 + height: 20 + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 8 + anchors.left: newNameArea.left + anchors.horizontalCenter: newNameArea.Center + background: Image { + source: mouseAreaCloseAddWallet.containsMouse ? "qrc:/Resources/Icons/close_icon_hover.png" : "qrc:/Resources/Icons/close_icon.png" + fillMode: Image.PreserveAspectFit + } + + MouseArea { + id: mouseAreaCloseAddWallet + anchors.fill: parent + hoverEnabled: true + } + } + } + + Rectangle { + id: nameWalletTextArea + height: 30 + color: "#757184" + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: newNameArea.bottom + anchors.topMargin: 0 + + Text { + id: nameWalletText + color: "#ffffff" + text: qsTr("Name of wallet") + anchors.left: parent.left + anchors.leftMargin: 16 + anchors.verticalCenter: parent.verticalCenter + font.pointSize: 12 + horizontalAlignment: Text.AlignLeft + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + } + } + + Rectangle { + id: inputNameWalletArea + height: 68 + color: "#EDEFF2" + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.right: parent.right + anchors.top: nameWalletTextArea.bottom + + TextInput { + id: textInputNameWallet + text: qsTr("Pocket of happiness") + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 20 + font.pointSize: 16 + color: "#070023" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + horizontalAlignment: Text.AlignLeft + } + } + + Rectangle { + id: chooseSignatureTypeTextArea + height: 30 + color: "#757184" + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: inputNameWalletArea.bottom + + Text { + id: chooseSignatureTypeText + color: "#ffffff" + text: qsTr("Choose signature type") + font.pointSize: 12 + anchors.leftMargin: 16 + horizontalAlignment: Text.AlignLeft + font.styleName: "Normal" + font.family: "Roboto" + font.weight: Font.Normal + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + } + } + + Rectangle { + id: chooseSignatureTypeArea + height: 68 + color: "#EDEFF2" + anchors.leftMargin: 1 + anchors.left: parent.left + anchors.right: parent.right + anchors.top: chooseSignatureTypeTextArea.bottom + + DapUiQmlWidgetSignatureTypeComboBox { + id: comboBoxChooseSignatureType + height: 20 * pt + anchors { + verticalCenter: chooseSignatureTypeArea.verticalCenter + left: parent.left + right: parent.right + leftMargin: 8 + rightMargin: 32 + verticalCenterOffset: 0 + } + } + } + + Rectangle { + id: recoveryMethodTextArea + height: 30 + color: "#757184" + anchors.leftMargin: 1 + anchors.left: parent.left + anchors.right: parent.right + anchors.top: chooseSignatureTypeArea.bottom + + Text { + id: recoveryMethodText + color: "#ffffff" + text: qsTr("Recovery method") + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + anchors.left: parent.left + font.pointSize: 12 + horizontalAlignment: Text.AlignLeft + anchors.leftMargin: 16 + anchors.verticalCenter: parent.verticalCenter + } + } + + ColumnLayout { + id: chooseRecoveryMethod + height: 272 + anchors.leftMargin: 1 + spacing: 32 + anchors.top: recoveryMethodTextArea.bottom + anchors.left: parent.left + anchors.right: parent.right + + RadioButton { + id: selectionWords + text: qsTr("24 words") + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.topMargin: 32 + checked: true + spacing: 16 + autoExclusive: true + display: AbstractButton.TextBesideIcon + font.pointSize: 14 + font.wordSpacing: 0 + font.family: "Roboto" + Layout.leftMargin: 16 + } + + RadioButton { + id: selectionQRcode + y: 120 + text: qsTr("QR code") + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.topMargin: 0 + Layout.leftMargin: 16 + spacing: 16 + font.pointSize: 14 + font.family: "Roboto" + } + + RadioButton { + id: selectionExportToFile + text: qsTr("Export to file") + spacing: 16 + font.pointSize: 14 + font.family: "Roboto" + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.topMargin: 0 + Layout.leftMargin: 16 + } + + RadioButton { + id: selectionNothing + y: 235 + text: qsTr("Nothing") + spacing: 16 + checked: false + font.family: "Roboto" + font.pointSize: 14 + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.topMargin: 0 + Layout.leftMargin: 16 + } + } + + Button { + id: nextButton + height: 44 + width: 130 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: chooseRecoveryMethod.bottom + anchors.topMargin: 32 + + MouseArea { + id: mouseAreaNextButton + anchors.fill: parent + hoverEnabled: true + } + + Text { + id: nextButtonText + text: qsTr("Next") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: "#ffffff" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 18 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: mouseAreaNextButton.containsMouse ? "#D51F5D" : "#070023" + } + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml index 952162476a18cdcc8ba1360a02735258b68db0ad..6d32d7684e885e29170854e2cd3a24588eeba691 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml @@ -11,16 +11,18 @@ Page { /// ----------- Load fonts ----------- /// using example: font.family: fontRobotoLight.name - readonly property FontLoader fontRobotoLight: FontLoader { source: "qrc:/Resources/Fonts/roboto_light.ttf" } - readonly property FontLoader fontRobotoRegular: FontLoader { source: "qrc:/Resources/Fonts/roboto_regular.ttf" } - /// ----------- + readonly property FontLoader fontRobotoLight: FontLoader { + source: "qrc:/Resources/Fonts/roboto_light.ttf" + } + readonly property FontLoader fontRobotoRegular: FontLoader { + source: "qrc:/Resources/Fonts/roboto_regular.ttf" + } + /// ----------- property alias listViewTabs: listViewTabs property alias stackViewScreenDashboard: stackViewScreenDashboard - - DapUiQmlWidgetStatusBar - { + DapUiQmlWidgetStatusBar { id: rectangleStatusBar anchors.left: rectangleTabsBorder.right anchors.top: parent.top @@ -29,8 +31,7 @@ Page { height: 60 * pt } - Rectangle - { + Rectangle { id: rectangleTabsBorder anchors.top: parent.top anchors.bottom: parent.bottom @@ -49,49 +50,49 @@ Page { id: listModelTabs ListElement { - name: qsTr("Dashboard") + name: qsTr("Dashboard") page: "DapUiQmlScreenDialog.qml" normal: "qrc:/Resources/Icons/icon_dashboard.png" hover: "qrc:/Resources/Icons/icon_dashboard_hover.png" } ListElement { - name: qsTr("Exchange") + name: qsTr("Exchange") page: "DapUiQmlScreenExchangeForm.ui.qml" normal: "qrc:/Resources/Icons/icon_exchange.png" hover: "qrc:/Resources/Icons/icon_exchange_hover.png" } ListElement { - name: qsTr("History") + name: qsTr("History") page: "DapUiQmlScreenHistory.qml" normal: "qrc:/Resources/Icons/icon_history.png" hover: "qrc:/Resources/Icons/icon_history_hover.png" } ListElement { - name: qsTr("Console") + name: qsTr("Console") page: "DapUiQmlScreenConsoleForm.ui.qml" normal: "qrc:/Resources/Icons/icon_console.png" hover: "qrc:/Resources/Icons/icon_console_hover.png" } ListElement { - name: qsTr("Logs") + name: qsTr("Logs") page: "DapUiQmlWidgetChainNodeLogs.qml" normal: "qrc:/Resources/Icons/icon_logs.png" hover: "qrc:/Resources/Icons/icon_logs_hover.png" } ListElement { - name: qsTr("Settings") + name: qsTr("Settings") page: "DapUiQmlScreenSettings.qml" normal: "qrc:/Resources/Icons/icon_settings.png" hover: "qrc:/Resources/Icons/icon_settings_hover.png" } ListElement { - name: qsTr("VPN") + name: qsTr("VPN") page: "DapUiQmlScreenVpn.qml" normal: "qrc:/Resources/Icons/defaul_icon.png" hover: "qrc:/Resources/Icons/defaul_icon.png" @@ -106,39 +107,37 @@ Page { // } } delegate: componentItemMainMenuTab - } focus: true -// DapUiQmlWidgetStatusBar { -// id: rectangleStatusBar -// anchors.left: rectangleTabsBorder.right -// anchors.top: parent.top -// anchors.right: parent.right -// color: "#B5B5B5" -// height: 60 * pt - } + // DapUiQmlWidgetStatusBar { + // id: rectangleStatusBar + // anchors.left: rectangleTabsBorder.right + // anchors.top: parent.top + // anchors.right: parent.right + // color: "#B5B5B5" + // height: 60 * pt + } - Rectangle { - id: mainDashboard - anchors.left: rectangleTabsBorder.right - anchors.top: rectangleStatusBar.bottom - anchors.bottom: parent.bottom - anchors.right: parent.right - border.color: "whitesmoke" - - Loader { - id: stackViewScreenDashboard - clip: true - anchors.fill: parent - source: "DapUiQmlScreenDialog.qml" - } + Rectangle { + id: mainDashboard + anchors.left: rectangleTabsBorder.right + anchors.top: rectangleStatusBar.bottom + anchors.bottom: parent.bottom + anchors.right: parent.right + border.color: "whitesmoke" + + Loader { + id: stackViewScreenDashboard + clip: true + anchors.fill: parent + source: "DapUiQmlScreenDialog.qml" } } -//} - +} -/*##^## Designer { +/*##^## +Designer { D{i:0;autoSize:true;height:480;width:640} } - ##^##*/ +##^##*/ diff --git a/CellFrameDashboardGUI/DapUiQmlWalletCreatedForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlWalletCreatedForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..4b86a0525575b5d3df46eeffaf8f21195a7e034b --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWalletCreatedForm.ui.qml @@ -0,0 +1,114 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.5 +import QtQuick.Layouts 1.1 + +Rectangle { + property alias pressedCloseAddWallet: mouseAreaCloseAddWallet.pressed + property alias pressedDoneCreateWallet: doneCreateWalletButton.pressed + + id: walletCreatedMenu + width: 400 + height: 640 + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#edeff2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } + + Rectangle { + id: newWalletArea + height: 36 + color: "#edeff2" + anchors.right: parent.right + anchors.rightMargin: 1 + anchors.left: parent.left + anchors.leftMargin: 1 + anchors.top: parent.top + anchors.topMargin: 0 + + Button { + id: closeButton + width: 20 + height: 20 + anchors.leftMargin: 16 + anchors.verticalCenterOffset: 0 + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.horizontalCenter: newNameArea.Center + + MouseArea { + id: mouseAreaCloseAddWallet + width: parent.width + height: parent.height + anchors.left: parent.left + anchors.leftMargin: 0 + hoverEnabled: true + } + + background: Image { + id: imageButton + source: mouseAreaCloseAddWallet.containsMouse ? "Resources/Icons/close_icon_hover.png" : "Resources/Icons/close_icon.png" + fillMode: Image.PreserveAspectFit + } + } + } + + Button { + id: doneCreateWalletButton + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 189 + 24 + height: 44 + width: 130 + + Text { + id: doneCreateWalletButtonText + text: qsTr("Done") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: doneCreateWalletButton.checked ? "#3E3853" : "#FFFFFF" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pointSize: 16 + horizontalAlignment: Text.AlignLeft + } + + background: Rectangle { + implicitWidth: parent.width + implicitHeight: parent.height + color: "#3E3853" + } + } + + Rectangle { + id: createWalletDescription + color: "#edeff2" + height: 50 + anchors.bottom: doneCreateWalletButton.top + anchors.bottomMargin: 24 + 118 + 24 + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 1 * pt + anchors.rightMargin: 1 * pt + + Text { + anchors.fill: parent + text: qsTr("Wallet created\nsuccessfully") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + color: "#070023" + + font { + pointSize: 16 + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + } + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetChainWallet.qml b/CellFrameDashboardGUI/DapUiQmlWidgetChainWallet.qml index b466600aa53e5910d12c41566d307c705efb9837..a49037b58301046c491e15837c50e0b91cec0abb 100755 --- a/CellFrameDashboardGUI/DapUiQmlWidgetChainWallet.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetChainWallet.qml @@ -50,9 +50,9 @@ DapUiQmlWidgetChainWalletForm { addressWallet.text = listViewWallet.model.get(listViewWallet.currentIndex).address } - buttonSaveWallet.onClicked: { - dialogAddWallet.show() - } +// buttonSaveWallet.onClicked: { +// dialogAddWallet.show() +// } buttonDeleteWallet.onClicked: { dialogRemoveWallet.show() diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml index c712296ae40d8b455e107e8fe64764adc6d368a7..887a96ae253e5106601f6c583092e306cb2bca98 100755 --- a/CellFrameDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml @@ -196,9 +196,9 @@ Page { } } - DapUiQmlScreenDialogAddWallet { - id: dialogAddWallet - } +// DapUiQmlScreenDialogAddWallet { +// id: dialogAddWallet +// } DapUiQmlScreenDialogSendToken { id: dialogSendToken } diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetScreenDialogAddWallet.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetScreenDialogAddWallet.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..27c038bccdac2e0064179f19529f0dc3684d6cc4 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetScreenDialogAddWallet.ui.qml @@ -0,0 +1,14 @@ +import QtQuick 2.4 + +Rectangle { + width: 400 * pt + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#EDEFF2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSignatureTypeComboBox.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSignatureTypeComboBox.qml new file mode 100644 index 0000000000000000000000000000000000000000..6a977301a4c8c20c010df0cda9cc62bb89c8e41a --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSignatureTypeComboBox.qml @@ -0,0 +1,57 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.5 +import QtQuick.Controls.Styles 1.4 + +DapUiQmlWidgetStatusBarComboBoxTokenForm { + + model: ListModel { + id: signatureType + ListElement { + signatureName: "Dilithium" + } + ListElement { + signatureName: "Bliss" + } + ListElement { + signatureName: "Picnic" + } + ListElement { + signatureName: "Tesla" + } + } + + headerTextColor: "#070023" + widthArrow: 20 * pt + heightArrow: 20 * pt + + font { + pointSize: 16 + family: "Roboto" + styleName: "Normal" + weight: Font.Normal + } + + currentIndex: 0 + displayText: currentText + + delegate: ItemDelegate { + width: parent.width + contentItem: DapUiQmlWidgetStatusBarContentItem { + text: signatureName + color: hovered ? "#FFFFFF" : "#070023" + } + + background: Rectangle { + height: 32 * pt + color: hovered ? "#330F54" : "#FFFFFF" + } + + highlighted: parent.highlightedIndex === index + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml index 06a9f7fb4fc9f777ea2d2ae792209f40252baaa3..7022003f59be669ed0e383b444926721ba38b2ce 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml @@ -5,7 +5,7 @@ import QtGraphicalEffects 1.0 import QtQuick.Layouts 1.3 Rectangle { - + property alias addWalletPressed: statusBarAddWalletButton.pressed Rectangle { anchors.fill: parent anchors.bottomMargin: 1 @@ -77,13 +77,8 @@ Rectangle { } } - DapUiQmlScreenDialogAddWallet - { - id: dialogAddWallet - } - DapUiQmlWidgetStatusBarButton { - id: buttonAddWallet + id: statusBarAddWalletButton width: 130 * pt anchors.right: parent.right anchors.top: parent.top @@ -91,9 +86,12 @@ Rectangle { anchors.rightMargin: 20 * pt anchors.bottom: parent.bottom anchors.bottomMargin: 10 * pt - - onClicked: addWallet() - onAddWallet: dialogAddWallet.show() } } } + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarButton.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarButton.ui.qml index 5c9560a4f1d795176a2a680a9a1e913700b399c6..8072bbcb0c7991f12de4a98171ac9b25d88e2af6 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarButton.ui.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarButton.ui.qml @@ -3,7 +3,6 @@ import QtQuick.Controls 2.5 Button { id: button - signal addWallet contentItem: Rectangle { anchors.fill: parent border.color: "#B5B5B5" diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml index 6f5333f44b834dff271bc2a030c2a1a58cd19cea..80ac254b2f76a17aa1ae86c5b47e1462a10aca5f 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBox.qml @@ -4,9 +4,14 @@ import QtQuick.Controls.Styles 1.4 import QtGraphicalEffects 1.0 ComboBox { + property alias headerTextColor: headerText.color + property alias widthArrow: arrow.width + property alias heightArrow: arrow.height + id: customComboBox width: 190 * pt indicator: Image { + id: arrow source: parent.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png" width: 24 * pt height: 24 * pt @@ -22,6 +27,7 @@ ComboBox { } contentItem: Text { + id: headerText anchors.fill: parent anchors.leftMargin: 12 * pt anchors.rightMargin: 48 * pt diff --git a/CellFrameDashboardGUI/Resources/Icons/back_icon.png b/CellFrameDashboardGUI/Resources/Icons/back_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f24db8c01d5a675b44a55fb59e27488c22a1831d Binary files /dev/null and b/CellFrameDashboardGUI/Resources/Icons/back_icon.png differ diff --git a/CellFrameDashboardGUI/Resources/Icons/back_icon_hover.png b/CellFrameDashboardGUI/Resources/Icons/back_icon_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..a3a102770fcaa8b0ae1b1b6e4a2147e69ac2b1a6 Binary files /dev/null and b/CellFrameDashboardGUI/Resources/Icons/back_icon_hover.png differ diff --git a/CellFrameDashboardGUI/Resources/Icons/close_icon.png b/CellFrameDashboardGUI/Resources/Icons/close_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..82b7d676b9efd94d5d899922c6b682b8be379362 Binary files /dev/null and b/CellFrameDashboardGUI/Resources/Icons/close_icon.png differ diff --git a/CellFrameDashboardGUI/Resources/Icons/close_icon_hover.png b/CellFrameDashboardGUI/Resources/Icons/close_icon_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..01969771736724aee37ad6f6c4890ad4547360dd Binary files /dev/null and b/CellFrameDashboardGUI/Resources/Icons/close_icon_hover.png differ diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index 03b9a582ef07595f318acfeaf459538c7e971763..c8c06f7139081607a3f6dbb001d2dbe153e5ceea 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -94,5 +94,14 @@ <file>DapUiQmlWidgetSettingsVpnComboBox.qml</file> <file>DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml</file> <file>DapUiQmlWidgetStatusBarComboBoxDelegate.qml</file> + <file>DapUiQmlScreenDialogAddWalletForm.ui.qml</file> + <file>DapUiQmlWidgetSignatureTypeComboBox.qml</file> + <file>DapUiQmlRecoveryQrForm.ui.qml</file> + <file>DapUiQmlRecoveryNotesForm.ui.qml</file> + <file>DapUiQmlWalletCreatedForm.ui.qml</file> + <file>Resources/Icons/back_icon.png</file> + <file>Resources/Icons/back_icon_hover.png</file> + <file>Resources/Icons/close_icon.png</file> + <file>Resources/Icons/close_icon_hover.png</file> </qresource> </RCC>