mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-11 07:40:21 -04:00
simplied/improved reputation system. Now ids can be banned based on their owner node using a single checkbox in the Person tab, with immediate effect
This commit is contained in:
parent
c4ef4d7743
commit
7545ad4d11
11 changed files with 407 additions and 196 deletions
|
@ -333,6 +333,7 @@ IdDialog::IdDialog(QWidget *parent) :
|
|||
|
||||
//connect(ui->treeWidget_membership, SIGNAL(itemSelectionChanged()), this, SLOT(circle_selected()));
|
||||
connect(ui->treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CircleListCustomPopupMenu(QPoint)));
|
||||
connect(ui->autoBanIdentities_CB, SIGNAL(toggled(bool)), this, SLOT(toggleAutoBanIdentities(bool)));
|
||||
|
||||
|
||||
/* Setup TokenQueue */
|
||||
|
@ -349,6 +350,17 @@ IdDialog::IdDialog(QWidget *parent) :
|
|||
tmer->start(10000) ; // update every 10 secs.
|
||||
}
|
||||
|
||||
void IdDialog::toggleAutoBanIdentities(bool b)
|
||||
{
|
||||
RsPgpId id(ui->lineEdit_GpgId->text().left(16).toStdString());
|
||||
|
||||
if(!id.isNull())
|
||||
{
|
||||
rsReputations->banNode(id,b) ;
|
||||
requestIdList();
|
||||
}
|
||||
}
|
||||
|
||||
void IdDialog::updateCirclesDisplay()
|
||||
{
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
|
@ -1676,6 +1688,8 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||
else
|
||||
ui->lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId.toStdString()) + tr(" [unverified]"));
|
||||
|
||||
ui->autoBanIdentities_CB->setVisible(!data.mPgpId.isNull()) ;
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ;
|
||||
ui->headerTextLabel_Person->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE));
|
||||
|
@ -1769,6 +1783,8 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||
ui->inviteButton->setEnabled(true);
|
||||
}
|
||||
|
||||
ui->autoBanIdentities_CB->setChecked(rsReputations->isNodeBanned(data.mPgpId));
|
||||
|
||||
/* now fill in the reputation information */
|
||||
|
||||
#ifdef SUSPENDED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue