mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
gui: Show permissions instead of whitelisted
Show detailed permissions instead of legacy "whitelisted" flag. These are formatted with `&` in between just like services flags. It reuses the "N/A" translation message if not. This removes the one-but-last use of `legacyWhitelisted`.
This commit is contained in:
parent
804ca26629
commit
784ef8be41
2 changed files with 11 additions and 3 deletions
|
@ -1082,12 +1082,12 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_30">
|
<widget class="QLabel" name="label_30">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Whitelisted</string>
|
<string>Permissions</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="peerWhitelisted">
|
<widget class="QLabel" name="peerPermissions">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -1120,7 +1120,15 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
|
||||||
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
||||||
ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
|
ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
|
||||||
ui->peerHeight->setText(QString::number(stats->nodeStats.nStartingHeight));
|
ui->peerHeight->setText(QString::number(stats->nodeStats.nStartingHeight));
|
||||||
ui->peerWhitelisted->setText(stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No"));
|
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
|
||||||
|
ui->peerPermissions->setText(tr("N/A"));
|
||||||
|
} else {
|
||||||
|
QStringList permissions;
|
||||||
|
for (const auto& permission : NetPermissions::ToStrings(stats->nodeStats.m_permissionFlags)) {
|
||||||
|
permissions.append(QString::fromStdString(permission));
|
||||||
|
}
|
||||||
|
ui->peerPermissions->setText(permissions.join(" & "));
|
||||||
|
}
|
||||||
ui->peerMappedAS->setText(stats->nodeStats.m_mapped_as != 0 ? QString::number(stats->nodeStats.m_mapped_as) : tr("N/A"));
|
ui->peerMappedAS->setText(stats->nodeStats.m_mapped_as != 0 ? QString::number(stats->nodeStats.m_mapped_as) : tr("N/A"));
|
||||||
|
|
||||||
// This check fails for example if the lock was busy and
|
// This check fails for example if the lock was busy and
|
||||||
|
|
Loading…
Add table
Reference in a new issue