diff --git a/external/feather-docs b/external/feather-docs index 9abafde..6a9c825 160000 --- a/external/feather-docs +++ b/external/feather-docs @@ -1 +1 @@ -Subproject commit 9abafde37423c204401a2322d152e8b3cc5d267a +Subproject commit 6a9c825056cbec61f91295812556bb0d3c926b9b diff --git a/src/assets.qrc b/src/assets.qrc index 9f91524..b0ab187 100644 --- a/src/assets.qrc +++ b/src/assets.qrc @@ -40,6 +40,7 @@ assets/images/file.png assets/images/file_manager_32px.png assets/images/gnome-calc.png + assets/images/atomic-icon.png assets/images/hd_32px.png assets/images/history.png assets/images/i2p.png diff --git a/src/assets/images/atomic-icon.png b/src/assets/images/atomic-icon.png new file mode 100644 index 0000000..9b6b49d Binary files /dev/null and b/src/assets/images/atomic-icon.png differ diff --git a/src/plugins/atomic/AtomicConfigDialog.cpp b/src/plugins/atomic/AtomicConfigDialog.cpp index 1cd7d53..0b9e2ed 100644 --- a/src/plugins/atomic/AtomicConfigDialog.cpp +++ b/src/plugins/atomic/AtomicConfigDialog.cpp @@ -6,6 +6,7 @@ #include "utils/AppData.h" #include "utils/config.h" +#include "utils/Networking.h" AtomicConfigDialog::AtomicConfigDialog(QWidget *parent) : WindowModalDialog(parent) @@ -15,33 +16,19 @@ AtomicConfigDialog::AtomicConfigDialog(QWidget *parent) this->fillListWidgets(); - connect(ui->btn_selectAll, &QPushButton::clicked, this, &AtomicConfigDialog::selectAll); - connect(ui->btn_deselectAll, &QPushButton::clicked, this, &AtomicConfigDialog::deselectAll); - + connect(ui->btn_autoInstall,&QPushButton::clicked, this, &AtomicConfigDialog::downloadBinary); + connect(ui->btn_selectFile,&QPushButton::clicked, this, &AtomicConfigDialog::selectBinary); connect(ui->buttonBox, &QDialogButtonBox::accepted, [this]{ - conf()->set(Config::fiatSymbols, this->checkedFiat()); - conf()->set(Config::cryptoSymbols, this->checkedCrypto()); this->accept(); }); this->adjustSize(); } -QStringList AtomicConfigDialog::checkedFiat() { - return this->getChecked(ui->list_fiat); -} -QStringList AtomicConfigDialog::checkedCrypto() { - return this->getChecked(ui->list_crypto); -} -void AtomicConfigDialog::selectAll() { - this->setCheckState(this->getVisibleListWidget(), Qt::Checked); -} -void AtomicConfigDialog::deselectAll() { - this->setCheckState(this->getVisibleListWidget(), Qt::Unchecked); -} + void AtomicConfigDialog::setCheckState(QListWidget *widget, Qt::CheckState checkState) { QListWidgetItem *item; @@ -63,13 +50,7 @@ QStringList AtomicConfigDialog::getChecked(QListWidget *widget) { return checked; } -QListWidget* AtomicConfigDialog::getVisibleListWidget() { - if (ui->tabWidget->currentIndex() == 0) { - return ui->list_fiat; - } else { - return ui->list_crypto; - } -} + void AtomicConfigDialog::fillListWidgets() { QStringList cryptoCurrencies = appData()->prices.markets.keys(); @@ -78,8 +59,6 @@ void AtomicConfigDialog::fillListWidgets() { QStringList checkedCryptoCurrencies = conf()->get(Config::cryptoSymbols).toStringList(); QStringList checkedFiatCurrencies = conf()->get(Config::fiatSymbols).toStringList(); - ui->list_crypto->addItems(cryptoCurrencies); - ui->list_fiat->addItems(fiatCurrencies); auto setChecked = [](QListWidget *widget, const QStringList &checked){ QListWidgetItem *item; @@ -94,8 +73,13 @@ void AtomicConfigDialog::fillListWidgets() { } }; - setChecked(ui->list_crypto, checkedCryptoCurrencies); - setChecked(ui->list_fiat, checkedFiatCurrencies); } +void AtomicConfigDialog::downloadBinary() { + +}; + +void AtomicConfigDialog::selectBinary() { + +}; AtomicConfigDialog::~AtomicConfigDialog() = default; \ No newline at end of file diff --git a/src/plugins/atomic/AtomicConfigDialog.h b/src/plugins/atomic/AtomicConfigDialog.h index a51d28d..5370156 100644 --- a/src/plugins/atomic/AtomicConfigDialog.h +++ b/src/plugins/atomic/AtomicConfigDialog.h @@ -21,18 +21,13 @@ public: explicit AtomicConfigDialog(QWidget *parent = nullptr); ~AtomicConfigDialog() override; - QStringList checkedFiat(); - QStringList checkedCrypto(); - -private slots: - void selectAll(); - void deselectAll(); private: void setCheckState(QListWidget *widget, Qt::CheckState checkState); QStringList getChecked(QListWidget *widget); void fillListWidgets(); - QListWidget* getVisibleListWidget(); + void downloadBinary(); + void selectBinary(); QScopedPointer ui; }; diff --git a/src/plugins/atomic/AtomicConfigDialog.ui b/src/plugins/atomic/AtomicConfigDialog.ui index aa13d92..dfe1990 100644 --- a/src/plugins/atomic/AtomicConfigDialog.ui +++ b/src/plugins/atomic/AtomicConfigDialog.ui @@ -1,153 +1,102 @@ - AtomicConfigDialog - - - - 0 - 0 - 509 - 574 - - - - Atomic config - - - - - - 0 - - - - Fiat - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - Crypto - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - Qt::Vertical - - - - - - - - - Select all - - - - - - - Deselect all - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - + AtomicConfigDialog + + + + 0 + 0 + 509 + 574 + + + + Atomic config + + + + + + Qt::Vertical + - - - - buttonBox - accepted() - AtomicConfigDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - AtomicConfigDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - + + + + + + + Auto Install Swap Tool + + + + + + + Select Path to Binary + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + AtomicConfigDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + AtomicConfigDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + diff --git a/src/plugins/atomic/AtomicPlugin.cpp b/src/plugins/atomic/AtomicPlugin.cpp index cd2bdb4..ddaf240 100644 --- a/src/plugins/atomic/AtomicPlugin.cpp +++ b/src/plugins/atomic/AtomicPlugin.cpp @@ -36,7 +36,7 @@ QString AtomicPlugin::description() { } QString AtomicPlugin::icon() { - return "gnome-calc.png"; + return "atomic-icon.png"; } QStringList AtomicPlugin::socketData() { diff --git a/src/plugins/atomic/README.md b/src/plugins/atomic/README.md new file mode 100644 index 0000000..0876758 --- /dev/null +++ b/src/plugins/atomic/README.md @@ -0,0 +1,9 @@ +### Atomic Plugin +Built in xmr-btc atomic swap + +## Installation + +## Usage +Navigate to the Atomic tab after opening your wallet. Click the configure button. + +// Config Settings diff --git a/src/utils/config.cpp b/src/utils/config.cpp index 0544a39..d78ccb9 100644 --- a/src/utils/config.cpp +++ b/src/utils/config.cpp @@ -134,6 +134,14 @@ static const QHash configStrings = { {Config::tickers, {QS("tickers"), QStringList{"XMR", "BTC", "XMR/BTC"}}}, {Config::tickersShowFiatBalance, {QS("tickersShowFiatBalance"), true}}, + + // Atomic + {Config::rendezVous, {QS("rendezVous"), QStringList{"/dns4/xmr-btc-asb.coblox.tech/tcp/9939/p2p/12D3KooWCdMKjesXMJz1SiZ7HgotrxuqhQJbP5sgBm2BwP1cqThi", + "/dnsaddr/atomic.money/p2p/12D3KooWNfiwKyDpAbW7XSgw5xmoMJzMXsJxR91FbUJiuWU1vBGb", + "/dnsaddr/xmr.darkness.su/p2p/12D3KooWLWpQtmuPoQvMJxs6KRGMrc39ohkNbRNaXWJhW3DfQD6e", + "/dnsaddr/swapanarchy.cfd/p2p/12D3KooWMgGjeW7ErQxCQzaeHiXxJn42wegCPFepixEXfBJT1PNS", + "/onion3/spqfqxirmlrhq7gbiwn4jn35c77gu2kof26i6psoc6bbyduol3zty6qd:9841/p2p/12D3KooWM9ipr33nEtxyCBF7fdbHsMrRzHaSf1bEVYzV8XSBSMet"}}}, + {Config::swapPath, {QS("swapPath"), ""}}, }; diff --git a/src/utils/config.h b/src/utils/config.h index 215ec6b..87fd3ba 100644 --- a/src/utils/config.h +++ b/src/utils/config.h @@ -148,6 +148,10 @@ public: // Tickers tickers, tickersShowFiatBalance, + + // Atomic Settings + rendezVous, + swapPath, }; enum PrivacyLevel {