diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index a4ff4850efa73d4816ded57970302b7dfa044a66..871e8d518fd7d2166c565ed70e37adad825a9b10 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -97,11 +97,17 @@ <file>screen/desktop/Dashboard/RightPanel/DapRecoveryWalletRightPanelForm.ui.qml</file> <file>screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanel.qml</file> <file>screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanelForm.ui.qml</file> + <file>screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanel.qml</file> + <file>screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanelForm.ui.qml</file> <file>res/icons/back_icon_hover.png</file> <file>res/icons/back_icon.png</file> <file>res/icons/close_icon_hover.png</file> <file>res/icons/close_icon.png</file> <file>res/icons/ic_arrow_drop_down_dark.png</file> + <file>res/icons/ic_scroll-down.png</file> + <file>res/icons/ic_scroll-down_hover.png</file> + <file>res/icons/ic_scroll-up.png</file> + <file>res/icons/ic_scroll-up_hover.png</file> <file>screen/desktop/Settings/DapSettingsTab.qml</file> <file>screen/desktop/Settings/DapSettingsTabForm.ui.qml</file> <file>screen/desktop/Settings/DapSettingsTopPanel.qml</file> diff --git a/CellFrameDashboardGUI/res/icons/ic_scroll-down.png b/CellFrameDashboardGUI/res/icons/ic_scroll-down.png new file mode 100644 index 0000000000000000000000000000000000000000..d818c8143a6559934f39f7dff38f40f45286023d Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_scroll-down.png differ diff --git a/CellFrameDashboardGUI/res/icons/ic_scroll-down_hover.png b/CellFrameDashboardGUI/res/icons/ic_scroll-down_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..aa00573edda7f485f7616a97337b101fd4ad6844 Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_scroll-down_hover.png differ diff --git a/CellFrameDashboardGUI/res/icons/ic_scroll-up.png b/CellFrameDashboardGUI/res/icons/ic_scroll-up.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ace3f8ac7d1cf8f0b2c264d58682bc68fed2f4 Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_scroll-up.png differ diff --git a/CellFrameDashboardGUI/res/icons/ic_scroll-up_hover.png b/CellFrameDashboardGUI/res/icons/ic_scroll-up_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..8c698e0bd164cd4efac4da44d0103201411a26ca Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_scroll-up_hover.png differ diff --git a/CellFrameDashboardGUI/screen/DapAbstractRightPanelForm.ui.qml b/CellFrameDashboardGUI/screen/DapAbstractRightPanelForm.ui.qml index 52be372e5d688a300995b9133dcd56113444cb11..7367ee6e757b08f2c85789e58b1ea7a64de5ff79 100644 --- a/CellFrameDashboardGUI/screen/DapAbstractRightPanelForm.ui.qml +++ b/CellFrameDashboardGUI/screen/DapAbstractRightPanelForm.ui.qml @@ -20,6 +20,7 @@ DapRightPanel normalImageButton: "qrc:/res/icons/close_icon.png" hoverImageButton: "qrc:/res/icons/close_icon_hover.png" } + dapHeader.height: 36 * pt dapFrame.height: parent.height color: "#F8F7FA" diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml index 1e874c2250bc3324bbb77d88bf7f8f638b8f3727..197d76d99dd353cb9b7370a970971ef8bfaf5d72 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml @@ -4,18 +4,14 @@ DapDashboardTabForm { ///@detalis Path to the right panel of transaction history. readonly property string transactionHistoryWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapTransactionHistoryRightPanel.qml" - ///@detalis Path to the right panel of transaction history. + ///@detalis Path to the right panel of input name wallet. readonly property string inputNameWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml" - ///@detalis Path to the right panel of transaction history. + ///@detalis Path to the right panel of recovery. readonly property string recoveryWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapRecoveryWalletRightPanel.qml" - ///@detalis Path to the right panel of transaction history. + ///@detalis Path to the right panel of done. readonly property string doneWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapDoneWalletRightPanel.qml" + ///@detalis Path to the right panel of last actions. + readonly property string lastActionsWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapLastActionsRightPanel.qml" - dapDashboardRightPanel.source: Qt.resolvedUrl(inputNameWallet) - - dapDashboardTopPanel.dapAddWalletButton.onClicked: - { - if(dapDashboardRightPanel.source != Qt.resolvedUrl(inputNameWallet)) - dapDashboardRightPanel.setSource(Qt.resolvedUrl(inputNameWallet)) - } + dapDashboardRightPanel.source: Qt.resolvedUrl(lastActionsWallet) } diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanel.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanel.qml new file mode 100644 index 0000000000000000000000000000000000000000..0bb86b51b957a46450a2aac7c9cb13409b3e84df --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanel.qml @@ -0,0 +1,380 @@ +import QtQuick 2.4 +import QtQuick.Layouts 1.3 +import "qrc:/widgets" +import "../../../" + +DapLastActionsRightPanelForm +{ + ////@ Variables to calculate Today, Yesterdat etc. + property date today: new Date() + property date yesterday: new Date(new Date().setDate(new Date().getDate()-1)) + + ListModel + { + id: modelActions + ListElement + { + name: "Token 2" + status: "Received" + amount: 892.145 + currency: "TKN2" + date: "2020-01-15" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2020-01-14" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2020-01-13" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2020-01-13" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-12-30" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-12-30" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-12-28" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-12-15" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-11-12" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-11-12" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-10-05" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-10-04" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-10-04" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-10-02" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-10-01" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-08-20" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-08-20" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-08-16" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-07-25" + } + ListElement + { + name: "Token 2" + status: "Received" + amount: 892.145 + currency: "TKN2" + date: "2020-01-15" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2020-01-14" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2020-01-13" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2020-01-13" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-12-30" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-12-30" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-12-28" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-12-15" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-11-12" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-11-12" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-10-05" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-10-04" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-10-04" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-10-02" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-10-01" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-08-20" + } + ListElement + { + name: "Kelvin" + status: "Received" + amount: 753.987 + currency: "KLVN" + date: "2019-08-20" + } + ListElement + { + name: "NewGold" + status: "Sent" + amount: 300.986 + currency: "NGD" + date: "2019-08-16" + } + ListElement + { + name: "Token 2" + status: "Sent" + amount: 500.986 + currency: "TKN2" + date: "2019-07-25" + } + } + + Component + { + id: delegateSection + Rectangle + { + height: 30 * pt + width: parent.width + color: "#757184" + + Text + { + property date payDate: new Date(Date.parse(section)) + anchors.fill: parent + anchors.leftMargin: 16 * pt + anchors.rightMargin: 16 * pt + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignLeft + color: "#FFFFFF" + text: getDateString(payDate) + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pixelSize: 12 * pt + } + } + } + + ////@ Functions for "Today" or "Yesterday" or "Month, Day" or "Month, Day, Year" output + function getDateString(date) + { + if (isSameDay(today, date)) + { + return qsTr("Today") + } + else if (isSameDay(yesterday, date)) + { + return qsTr("Yesterday") + } + else if (!isSameYear(today, date)) + { + return date.toLocaleString(Qt.locale("en_EN"), "MMMM, d, yyyy") + } + else + { + return date.toLocaleString(Qt.locale("en_EN"), "MMMM, d") // Does locale should be changed? + } + } + + ////@ Checks if dates are same + function isSameDay(date1, date2) + { + return (isSameYear(date1, date2) && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate()) ? true : false + } + + ////@ Checks if dates have same year + function isSameYear(date1, date2) + { + return (date1.getFullYear() === date2.getFullYear()) ? true : false + } +} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanelForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..001ea7c5d045a1344151cba25a62441ba75f5cdf --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapLastActionsRightPanelForm.ui.qml @@ -0,0 +1,132 @@ +import QtQuick 2.4 +import QtQuick.Layouts 1.3 +import "qrc:/widgets" +import "../../../" + +DapAbstractRightPanel +{ + dapHeaderData: + Rectangle + { + anchors.fill: parent + color: "transparent" + + Text + { + anchors.fill: parent + anchors.leftMargin: 16 * pt + text: qsTr("Last actions") + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Text.AlignLeft + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pixelSize: 12 * pt + color: "#3E3853" + } + + Rectangle + { + id: borderBottom + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: 1 * pt + color: "#757184" + } + } + + dapContentItemData: + ListView + { + id: lastActionsView + anchors.fill: parent + clip: true + model: modelActions + delegate: + Rectangle + { + id: dapContentDelegate + width: parent.width + height: 50 * pt + color: "transparent" + + RowLayout + { + anchors.fill: parent + anchors.rightMargin: 20 * pt + anchors.leftMargin: 16 * pt + + ColumnLayout + { + Layout.fillHeight: true + Layout.fillWidth: true + spacing: 2 * pt + + Text + { + Layout.fillWidth: true + text: model.name + color: "#3E3853" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pixelSize: 14 * pt + elide: Text.ElideRight + } + + Text + { + Layout.fillWidth: true + text: model.status + color: "#757184" + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pixelSize: 12 * pt + } + } + + Text + { + property string sign: (model.status === "Sent") ? "- " : "+ " + Layout.fillHeight: true + Layout.fillWidth: true + horizontalAlignment: Qt.AlignRight + verticalAlignment: Qt.AlignVCenter + color: "#3E3853" + text: sign + model.amount + " " + model.currency + font.family: "Roboto" + font.styleName: "Normal" + font.weight: Font.Normal + font.pixelSize: 14 * pt + } + } + + Rectangle + { + width: parent.width + height: 1 * pt + color: "#E3E2E6" + anchors.bottom: parent.bottom + } + } + + section.property: "date" + section.criteria: ViewSection.FullString + section.delegate: delegateSection + + DapScrollView + { + id: scrollButtons + viewData: lastActionsView + + scrollDownButtonImageSource: "qrc:/res/icons/ic_scroll-down.png" + scrollDownButtonHoveredImageSource: "qrc:/res/icons/ic_scroll-down_hover.png" + scrollUpButtonImageSource: "qrc:/res/icons/ic_scroll-up.png" + scrollUpButtonHoveredImageSource: "qrc:/res/icons/ic_scroll-up_hover.png" + } + } +} + + diff --git a/libdap-qt-ui-qml b/libdap-qt-ui-qml index a4c2dcf495eea6f3663caadbda94257575954517..bca1afe6ba3bbf9ef85bfaa64b679d99265ea7e8 160000 --- a/libdap-qt-ui-qml +++ b/libdap-qt-ui-qml @@ -1 +1 @@ -Subproject commit a4c2dcf495eea6f3663caadbda94257575954517 +Subproject commit bca1afe6ba3bbf9ef85bfaa64b679d99265ea7e8