mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-22 13:02:10 -04:00
Show YubiKey message from MainWindow to ensure it's always shown when a challenge is generated
This commit is contained in:
parent
d6c48a5cf1
commit
b10cb1c83c
7 changed files with 17 additions and 32 deletions
|
@ -177,8 +177,6 @@ void ChangeMasterKeyWidget::generateKey()
|
|||
bool blocking = i & true;
|
||||
int slot = i >> 1;
|
||||
auto key = QSharedPointer<YkChallengeResponseKey>(new YkChallengeResponseKey(slot, blocking));
|
||||
connect(key.data(), SIGNAL(userInteractionRequired()), SLOT(showYubiKeyPopup()));
|
||||
connect(key.data(), SIGNAL(userConfirmed()), SLOT(hideYubiKeyPopup()));
|
||||
m_key.addChallengeResponseKey(key);
|
||||
}
|
||||
#endif
|
||||
|
@ -241,15 +239,3 @@ void ChangeMasterKeyWidget::setCancelEnabled(bool enabled)
|
|||
{
|
||||
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void ChangeMasterKeyWidget::showYubiKeyPopup()
|
||||
{
|
||||
KEEPASSXC_MAIN_WINDOW->displayGlobalMessage(tr("Please touch the button on your YubiKey!"), MessageWidget::Information);
|
||||
KEEPASSXC_MAIN_WINDOW->setEnabled(false);
|
||||
}
|
||||
|
||||
void ChangeMasterKeyWidget::hideYubiKeyPopup()
|
||||
{
|
||||
KEEPASSXC_MAIN_WINDOW->hideGlobalMessage();
|
||||
KEEPASSXC_MAIN_WINDOW->setEnabled(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue