mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-26 08:15:32 -04:00
Fix TOTP visibility on unlock and setting change
Also fix invalid key message being visible when adding new TOTP secret to an entry.
This commit is contained in:
parent
217ee01572
commit
8c7cc90363
2 changed files with 4 additions and 0 deletions
|
@ -94,6 +94,8 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
|
||||||
connect(config(), &Config::changed, this, [this](Config::ConfigKey key) {
|
connect(config(), &Config::changed, this, [this](Config::ConfigKey key) {
|
||||||
if (key == Config::GUI_HidePreviewPanel) {
|
if (key == Config::GUI_HidePreviewPanel) {
|
||||||
setVisible(!config()->get(Config::GUI_HidePreviewPanel).toBool());
|
setVisible(!config()->get(Config::GUI_HidePreviewPanel).toBool());
|
||||||
|
} else if (key == Config::Security_HideTotpPreviewPanel) {
|
||||||
|
m_ui->entryTotpButton->setChecked(!config()->get(Config::Security_HideTotpPreviewPanel).toBool());
|
||||||
}
|
}
|
||||||
refresh();
|
refresh();
|
||||||
});
|
});
|
||||||
|
@ -258,6 +260,7 @@ void EntryPreviewWidget::updateEntryTotp()
|
||||||
m_totpTimer.start(1000);
|
m_totpTimer.start(1000);
|
||||||
m_ui->entryTotpProgress->setMaximum(m_currentEntry->totpSettings()->step);
|
m_ui->entryTotpProgress->setMaximum(m_currentEntry->totpSettings()->step);
|
||||||
updateTotpLabel();
|
updateTotpLabel();
|
||||||
|
m_ui->entryTotp->setVisible(m_ui->entryTotpButton->isChecked());
|
||||||
} else {
|
} else {
|
||||||
m_ui->entryTotp->hide();
|
m_ui->entryTotp->hide();
|
||||||
m_ui->entryTotpButton->setChecked(false);
|
m_ui->entryTotpButton->setChecked(false);
|
||||||
|
|
|
@ -108,6 +108,7 @@ void TotpSetupDialog::init()
|
||||||
m_ui->algorithmComboBox->addItem(item.first, item.second);
|
m_ui->algorithmComboBox->addItem(item.first, item.second);
|
||||||
}
|
}
|
||||||
m_ui->algorithmComboBox->setCurrentIndex(0);
|
m_ui->algorithmComboBox->setCurrentIndex(0);
|
||||||
|
m_ui->invalidKeyLabel->setVisible(false);
|
||||||
|
|
||||||
// Read entry totp settings
|
// Read entry totp settings
|
||||||
auto settings = m_entry->totpSettings();
|
auto settings = m_entry->totpSettings();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue