Skip to content

Commit

Permalink
add rpcport to settings > about
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Dec 21, 2023
1 parent 3151f80 commit 14b83d5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
33 changes: 27 additions & 6 deletions atomic_defi_design/Dex/Settings/SettingModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ Qaterial.Dialog
{
anchors.fill: parent
topPadding: 10
spacing: 15
spacing: 12

ModalLoader
{
Expand Down Expand Up @@ -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.")
}
}

Expand All @@ -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.")
}
}
}
}
}
Expand All @@ -777,7 +798,7 @@ Qaterial.Dialog

DexAppButton
{
text: qsTr("Search Update")
text: qsTr("Search for Update")
height: 48
radius: 20
leftPadding: 20
Expand Down
5 changes: 5 additions & 0 deletions src/core/atomicdex/pages/qt.settings.page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
1 change: 1 addition & 0 deletions src/core/atomicdex/pages/qt.settings.page.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 14b83d5

Please sign in to comment.