mirror of
https://github.com/wownero/wowlet.git
synced 2026-11-19 06:34:12 +01:00
defeather
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
|
||||
#ifndef FEATHER_CCSENTRY_H
|
||||
#define FEATHER_CCSENTRY_H
|
||||
#ifndef WOWLET_CCSENTRY_H
|
||||
#define WOWLET_CCSENTRY_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@@ -21,4 +21,4 @@ struct CCSEntry {
|
||||
int contributions = 0;
|
||||
};
|
||||
|
||||
#endif //FEATHER_CCSENTRY_H
|
||||
#endif //WOWLET_CCSENTRY_H
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
// Copyright (c) 2012 thomasv@gitorious
|
||||
|
||||
#ifndef FEATHER_PAYTOEDIT_H
|
||||
#define FEATHER_PAYTOEDIT_H
|
||||
#ifndef WOWLET_PAYTOEDIT_H
|
||||
#define WOWLET_PAYTOEDIT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPlainTextEdit>
|
||||
@@ -67,4 +67,4 @@ private:
|
||||
QVector<PartialTxOutput> m_outputs;
|
||||
};
|
||||
|
||||
#endif //FEATHER_PAYTOEDIT_H
|
||||
#endif //WOWLET_PAYTOEDIT_H
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
|
||||
#ifndef FEATHER_REDDITPOST_H
|
||||
#define FEATHER_REDDITPOST_H
|
||||
#ifndef WOWLET_REDDITPOST_H
|
||||
#define WOWLET_REDDITPOST_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@@ -16,4 +16,4 @@ struct RedditPost {
|
||||
int comments;
|
||||
};
|
||||
|
||||
#endif //FEATHER_REDDITPOST_H
|
||||
#endif //WOWLET_REDDITPOST_H
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
|
||||
#ifndef FEATHER_CSSPROGRESSDELEGATE_H
|
||||
#define FEATHER_CSSPROGRESSDELEGATE_H
|
||||
#ifndef WOWLET_CSSPROGRESSDELEGATE_H
|
||||
#define WOWLET_CSSPROGRESSDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include "model/CCSModel.h"
|
||||
@@ -20,4 +20,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif //FEATHER_CSSPROGRESSDELEGATE_H
|
||||
#endif //WOWLET_CSSPROGRESSDELEGATE_H
|
||||
|
||||
+13
-13
@@ -49,7 +49,7 @@ NodeWidget::NodeWidget(QWidget *parent)
|
||||
|
||||
void NodeWidget::onShowWSContextMenu(const QPoint &pos) {
|
||||
m_activeView = ui->wsView;
|
||||
FeatherNode node = this->selectedNode();
|
||||
WowletNode node = this->selectedNode();
|
||||
if (node.full.isEmpty()) return;
|
||||
|
||||
this->showContextMenu(pos, node);
|
||||
@@ -57,13 +57,13 @@ void NodeWidget::onShowWSContextMenu(const QPoint &pos) {
|
||||
|
||||
void NodeWidget::onShowCustomContextMenu(const QPoint &pos) {
|
||||
m_activeView = ui->customView;
|
||||
FeatherNode node = this->selectedNode();
|
||||
WowletNode node = this->selectedNode();
|
||||
if (node.full.isEmpty()) return;
|
||||
|
||||
this->showContextMenu(pos, node);
|
||||
}
|
||||
|
||||
void NodeWidget::showContextMenu(const QPoint &pos, const FeatherNode &node) {
|
||||
void NodeWidget::showContextMenu(const QPoint &pos, const WowletNode &node) {
|
||||
QMenu menu(this);
|
||||
|
||||
if (!node.isActive) {
|
||||
@@ -86,27 +86,27 @@ void NodeWidget::onContextConnect() {
|
||||
else
|
||||
m_activeView = ui->wsView;
|
||||
|
||||
FeatherNode node = this->selectedNode();
|
||||
WowletNode node = this->selectedNode();
|
||||
if (!node.full.isEmpty())
|
||||
emit connectToNode(node);
|
||||
}
|
||||
|
||||
void NodeWidget::onContextStatusURL() {
|
||||
FeatherNode node = this->selectedNode();
|
||||
WowletNode node = this->selectedNode();
|
||||
if (!node.full.isEmpty())
|
||||
Utils::externalLinkWarning(this, node.as_url());
|
||||
}
|
||||
|
||||
void NodeWidget::onContextNodeCopy() {
|
||||
FeatherNode node = this->selectedNode();
|
||||
WowletNode node = this->selectedNode();
|
||||
Utils::copyToClipboard(node.full);
|
||||
}
|
||||
|
||||
FeatherNode NodeWidget::selectedNode() {
|
||||
WowletNode NodeWidget::selectedNode() {
|
||||
QModelIndex index = m_activeView->currentIndex();
|
||||
if (!index.isValid()) return FeatherNode();
|
||||
if (!index.isValid()) return WowletNode();
|
||||
|
||||
FeatherNode node;
|
||||
WowletNode node;
|
||||
if (m_activeView == ui->customView) {
|
||||
node = m_customModel->node(index.row());
|
||||
} else {
|
||||
@@ -118,10 +118,10 @@ FeatherNode NodeWidget::selectedNode() {
|
||||
void NodeWidget::onContextCustomNodeRemove() {
|
||||
QModelIndex index = ui->customView->currentIndex();
|
||||
if (!index.isValid()) return;
|
||||
FeatherNode node = m_customModel->node(index.row());
|
||||
WowletNode node = m_customModel->node(index.row());
|
||||
|
||||
auto nodes = m_ctx->nodes->customNodes();
|
||||
QMutableListIterator<FeatherNode> i(nodes);
|
||||
QMutableListIterator<WowletNode> i(nodes);
|
||||
while (i.hasNext())
|
||||
if (i.next() == node)
|
||||
i.remove();
|
||||
@@ -141,14 +141,14 @@ void NodeWidget::onCustomAddClicked(){
|
||||
if (!ok || text.isEmpty())
|
||||
return;
|
||||
|
||||
QList<FeatherNode> nodesList;
|
||||
QList<WowletNode> nodesList;
|
||||
auto newNodesList = text.split("\n");
|
||||
for(auto &newNodeText: newNodesList) {
|
||||
newNodeText = newNodeText.replace("\r", "").trimmed();
|
||||
if(newNodeText.isEmpty())
|
||||
continue;
|
||||
|
||||
auto node = FeatherNode(newNodeText);
|
||||
auto node = WowletNode(newNodeText);
|
||||
node.custom = true;
|
||||
nodesList.append(node);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ private slots:
|
||||
void onContextNodeCopy();
|
||||
|
||||
signals:
|
||||
void connectToNode(FeatherNode node);
|
||||
void connectToNode(WowletNode node);
|
||||
void nodeSourceChanged(NodeSource nodeSource);
|
||||
|
||||
private:
|
||||
@@ -56,8 +56,8 @@ private:
|
||||
QAction *m_contextActionOpenStatusURL;
|
||||
QAction *m_contextActionCopy;
|
||||
|
||||
void showContextMenu(const QPoint &pos, const FeatherNode &node);
|
||||
FeatherNode selectedNode();
|
||||
void showContextMenu(const QPoint &pos, const WowletNode &node);
|
||||
WowletNode selectedNode();
|
||||
};
|
||||
|
||||
#endif // NODEWIDGET_H
|
||||
|
||||
@@ -57,6 +57,7 @@ signals:
|
||||
void thumbReceived(SuchWowPost *test);
|
||||
|
||||
private:
|
||||
// @TODO: Replace url
|
||||
QString m_weburl = "http://feathercitimllbmdktu6cmjo3fizgmyfrntntqzu6xguqa2rlq5cgid.onion/suchwow";
|
||||
AppContext *m_ctx = nullptr;
|
||||
UtilsNetworking *m_networkThumb = nullptr;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
|
||||
#ifndef FEATHER_TXPROOFWIDGET_H
|
||||
#define FEATHER_TXPROOFWIDGET_H
|
||||
#ifndef WOWLET_TXPROOFWIDGET_H
|
||||
#define WOWLET_TXPROOFWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@@ -30,4 +30,4 @@ private:
|
||||
Wallet *m_wallet;
|
||||
};
|
||||
|
||||
#endif //FEATHER_TXPROOFWIDGET_H
|
||||
#endif //WOWLET_TXPROOFWIDGET_H
|
||||
|
||||
@@ -83,11 +83,11 @@ XMRigWidget::XMRigWidget(AppContext *ctx, QWidget *parent) :
|
||||
|
||||
// username/password
|
||||
connect(ui->lineEdit_password, &QLineEdit::editingFinished, [=]() {
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_password", ui->lineEdit_password->text());
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_password", ui->lineEdit_password->text());
|
||||
m_ctx->storeWallet();
|
||||
});
|
||||
connect(ui->lineEdit_address, &QLineEdit::editingFinished, [=]() {
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_username", ui->lineEdit_address->text());
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_username", ui->lineEdit_address->text());
|
||||
m_ctx->storeWallet();
|
||||
});
|
||||
|
||||
@@ -104,17 +104,17 @@ void XMRigWidget::onWalletClosed() {
|
||||
|
||||
void XMRigWidget::onWalletOpened(Wallet *wallet){
|
||||
// Xmrig username
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_username");
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_username");
|
||||
if(!username.isEmpty())
|
||||
ui->lineEdit_address->setText(username);
|
||||
|
||||
// Xmrig passwd
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_password");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_password");
|
||||
if(!password.isEmpty()) {
|
||||
ui->lineEdit_password->setText(password);
|
||||
} else {
|
||||
ui->lineEdit_password->setText("featherwallet");
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_password", ui->lineEdit_password->text());
|
||||
ui->lineEdit_password->setText("wowlet");
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_password", ui->lineEdit_password->text());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,8 +145,8 @@ void XMRigWidget::onStartClicked() {
|
||||
xmrigPath = config()->get(Config::xmrigPath).toString();
|
||||
|
||||
// username is receiving address usually
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_username");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_password");
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_username");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_password");
|
||||
|
||||
if(username.isEmpty()) {
|
||||
QString err = "Please specify a receiving address on the Settings screen";
|
||||
|
||||
Reference in New Issue
Block a user