Log desktop join and offer results with request context

This commit is contained in:
evgeny committed 2026-10-27 12:53:21 +01:00
1 parent c25ed7c243
commit eca03747b3
2 files changed
+12

No files matched your search

+6
View File
@@ -41,6 +41,7 @@ InviteByLinkDialog::InviteByLinkDialog(const QString& channelId, UtunNode* node,
layout->addWidget(m_inviteLinkEdit);
m_inviteStatusLabel = new QLabel(this);
m_inviteStatusLabel->setObjectName(QStringLiteral("inviteStatus"));
m_inviteStatusLabel->setWordWrap(true);
m_inviteStatusLabel->setStyleSheet("color: gray; font-size: 11px; padding: 2px 0;");
layout->addWidget(m_inviteStatusLabel);
@@ -48,6 +49,7 @@ InviteByLinkDialog::InviteByLinkDialog(const QString& channelId, UtunNode* node,
auto *btnLayout = new QHBoxLayout();
btnLayout->addStretch();
m_inviteSendBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Invite"), this);
m_inviteSendBtn->setObjectName(QStringLiteral("inviteSend"));
m_inviteSendBtn->setStyleSheet(
"QPushButton { border: none; border-radius: 4px;"
" padding: 5px 14px; font-size: 12px; font-weight: bold;"
@@ -191,9 +193,13 @@ void InviteByLinkDialog::onConnectResult(uint64_t nodeId, uint64_t channelId, in
if (request != m_request || !m_inviteSending || nodeId != m_inviteTargetNodeId) return;
if (result == 0) {
GUI_INFO("offer dialog: completed request=%llu channel=%llu peer=%016llx", (unsigned long long)request,
(unsigned long long)channelId, (unsigned long long)nodeId);
setInviteStatus(QCoreApplication::translate("ChatGui", "The node has joined the channel."), false);
QTimer::singleShot(400, this, &QDialog::accept);
} else {
GUI_WARN("offer dialog: failed request=%llu channel=%llu peer=%016llx result=%d", (unsigned long long)request,
(unsigned long long)channelId, (unsigned long long)nodeId, result);
m_inviteSending = false;
m_inviteSendBtn->setEnabled(true);
m_inviteSendBtn->setFocus();
+6
View File
@@ -49,6 +49,7 @@ JoinDialog::JoinDialog(UtunNode* node, DbManager* db, QWidget* parent,
layout->addWidget(expiry);
m_statusLabel = new QLabel(this);
m_statusLabel->setObjectName(QStringLiteral("joinStatus"));
m_statusLabel->setWordWrap(true);
m_statusLabel->setStyleSheet("color: gray; font-size: 12px; padding: 4px 0;");
layout->addWidget(m_statusLabel);
@@ -69,6 +70,7 @@ JoinDialog::JoinDialog(UtunNode* node, DbManager* db, QWidget* parent,
btnLayout->addWidget(m_cancelBtn);
m_connectBtn = new QPushButton(QCoreApplication::translate("ChatGui", "Connect"), this);
m_connectBtn->setObjectName(QStringLiteral("joinConnect"));
m_connectBtn->setMinimumWidth(90);
m_connectBtn->setDefault(true);
m_connectBtn->setStyleSheet(
@@ -204,11 +206,15 @@ void JoinDialog::onConnectResult(uint64_t nodeId, uint64_t channelId, int result
if (request != m_request || !m_connecting || nodeId != m_pendingNodeId || channelId != m_pendingChannelId) return;
if (result == 0) {
GUI_INFO("join dialog: completed request=%llu channel=%llu peer=%016llx", (unsigned long long)request,
(unsigned long long)channelId, (unsigned long long)nodeId);
setStatus(QCoreApplication::translate("ChatGui", "Connected!"));
QString cid = QString::number(m_pendingChannelId);
emit joined(cid);
accept();
} else {
GUI_WARN("join dialog: failed request=%llu channel=%llu peer=%016llx result=%d", (unsigned long long)request,
(unsigned long long)channelId, (unsigned long long)nodeId, result);
m_connecting = false;
m_connectBtn->setEnabled(true);
m_linkEdit->setReadOnly(false);