From 14b83d5f50d95c63e9df7913bcd5dd9a64618435 Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 22 Dec 2023 03:44:53 +0800 Subject: [PATCH] add rpcport to settings > about --- .../Dex/Settings/SettingModal.qml | 33 +++++++++++++++---- src/core/atomicdex/pages/qt.settings.page.cpp | 5 +++ src/core/atomicdex/pages/qt.settings.page.hpp | 1 + 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/atomic_defi_design/Dex/Settings/SettingModal.qml b/atomic_defi_design/Dex/Settings/SettingModal.qml index 7dcb86d2b3..332e245c6b 100644 --- a/atomic_defi_design/Dex/Settings/SettingModal.qml +++ b/atomic_defi_design/Dex/Settings/SettingModal.qml @@ -650,7 +650,7 @@ Qaterial.Dialog { anchors.fill: parent topPadding: 10 - spacing: 15 + spacing: 12 ModalLoader { @@ -721,15 +721,15 @@ Qaterial.Dialog { Layout.alignment: Qt.AlignVCenter Layout.fillWidth: true - text: qsTr("Qt version") + text: qsTr("RPC Port") } DexCopyableLabel { Layout.alignment: Qt.AlignVCenter - text: qtversion - onCopyNotificationTitle: qsTr("Qt Version") - onCopyNotificationMsg: qsTr("Qt Version copied to clipboard.") + text: API.app.settings_pg.get_rpcport() + onCopyNotificationTitle: qsTr("RPC Port") + onCopyNotificationMsg: qsTr("RPC Port copied to clipboard.") } } @@ -755,6 +755,27 @@ Qaterial.Dialog } } + RowLayout + { + width: parent.width - 30 + anchors.horizontalCenter: parent.horizontalCenter + height: 60 + + DexLabel + { + Layout.alignment: Qt.AlignVCenter + Layout.fillWidth: true + text: qsTr("Qt version") + } + + DexCopyableLabel + { + Layout.alignment: Qt.AlignVCenter + text: qtversion + onCopyNotificationTitle: qsTr("Qt Version") + onCopyNotificationMsg: qsTr("Qt Version copied to clipboard.") + } + } } } } @@ -777,7 +798,7 @@ Qaterial.Dialog DexAppButton { - text: qsTr("Search Update") + text: qsTr("Search for Update") height: 48 radius: 20 leftPadding: 20 diff --git a/src/core/atomicdex/pages/qt.settings.page.cpp b/src/core/atomicdex/pages/qt.settings.page.cpp index d1aea10aeb..05438a08c5 100644 --- a/src/core/atomicdex/pages/qt.settings.page.cpp +++ b/src/core/atomicdex/pages/qt.settings.page.cpp @@ -763,6 +763,11 @@ namespace atomic_dex return QString::fromStdString(mm2::rpc_version()); } + QString settings_page::get_rpcport() + { + return QString::fromStdString(atomic_dex::g_dex_rpcport); + } + QString settings_page::get_peerid() { return QString::fromStdString(mm2::peer_id()); diff --git a/src/core/atomicdex/pages/qt.settings.page.hpp b/src/core/atomicdex/pages/qt.settings.page.hpp index 6d98178989..5ce98412a7 100644 --- a/src/core/atomicdex/pages/qt.settings.page.hpp +++ b/src/core/atomicdex/pages/qt.settings.page.hpp @@ -126,6 +126,7 @@ namespace atomic_dex Q_INVOKABLE QStringList retrieve_seed(const QString& wallet_name, const QString& password); Q_INVOKABLE static QString get_mm2_version(); Q_INVOKABLE static QString get_peerid(); + Q_INVOKABLE static QString get_rpcport(); Q_INVOKABLE static QString get_log_folder(); Q_INVOKABLE static QString get_export_folder(); Q_INVOKABLE static QString get_version();