mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-26 22:36:59 -05:00
feature/AutoTypeTOTP
This commit is contained in:
parent
e660802fac
commit
2514c1d5c5
@ -713,6 +713,11 @@ void DatabaseWidget::performAutoTypePasswordEnter()
|
|||||||
performAutoType(QStringLiteral("{PASSWORD}{ENTER}"));
|
performAutoType(QStringLiteral("{PASSWORD}{ENTER}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DatabaseWidget::performAutoTypeTOTP()
|
||||||
|
{
|
||||||
|
performAutoType(QStringLiteral("{TOTP}"));
|
||||||
|
}
|
||||||
|
|
||||||
void DatabaseWidget::openUrl()
|
void DatabaseWidget::openUrl()
|
||||||
{
|
{
|
||||||
auto currentEntry = currentSelectedEntry();
|
auto currentEntry = currentSelectedEntry();
|
||||||
|
@ -187,6 +187,7 @@ public slots:
|
|||||||
void performAutoTypeUsernameEnter();
|
void performAutoTypeUsernameEnter();
|
||||||
void performAutoTypePassword();
|
void performAutoTypePassword();
|
||||||
void performAutoTypePasswordEnter();
|
void performAutoTypePasswordEnter();
|
||||||
|
void performAutoTypeTOTP();
|
||||||
void openUrl();
|
void openUrl();
|
||||||
void downloadSelectedFavicons();
|
void downloadSelectedFavicons();
|
||||||
void downloadAllFavicons();
|
void downloadAllFavicons();
|
||||||
|
@ -158,6 +158,7 @@ MainWindow::MainWindow()
|
|||||||
autotypeMenu->addAction(m_ui->actionEntryAutoTypeUsernameEnter);
|
autotypeMenu->addAction(m_ui->actionEntryAutoTypeUsernameEnter);
|
||||||
autotypeMenu->addAction(m_ui->actionEntryAutoTypePassword);
|
autotypeMenu->addAction(m_ui->actionEntryAutoTypePassword);
|
||||||
autotypeMenu->addAction(m_ui->actionEntryAutoTypePasswordEnter);
|
autotypeMenu->addAction(m_ui->actionEntryAutoTypePasswordEnter);
|
||||||
|
autotypeMenu->addAction(m_ui->actionEntryAutoTypeTOTP);
|
||||||
m_ui->actionEntryAutoType->setMenu(autotypeMenu);
|
m_ui->actionEntryAutoType->setMenu(autotypeMenu);
|
||||||
auto autoTypeButton = qobject_cast<QToolButton*>(m_ui->toolBar->widgetForAction(m_ui->actionEntryAutoType));
|
auto autoTypeButton = qobject_cast<QToolButton*>(m_ui->toolBar->widgetForAction(m_ui->actionEntryAutoType));
|
||||||
if (autoTypeButton) {
|
if (autoTypeButton) {
|
||||||
@ -379,6 +380,7 @@ MainWindow::MainWindow()
|
|||||||
m_ui->actionEntryAutoTypeUsernameEnter->setIcon(icons()->icon("auto-type"));
|
m_ui->actionEntryAutoTypeUsernameEnter->setIcon(icons()->icon("auto-type"));
|
||||||
m_ui->actionEntryAutoTypePassword->setIcon(icons()->icon("auto-type"));
|
m_ui->actionEntryAutoTypePassword->setIcon(icons()->icon("auto-type"));
|
||||||
m_ui->actionEntryAutoTypePasswordEnter->setIcon(icons()->icon("auto-type"));
|
m_ui->actionEntryAutoTypePasswordEnter->setIcon(icons()->icon("auto-type"));
|
||||||
|
m_ui->actionEntryAutoTypeTOTP->setIcon(icons()->icon("auto-type"));
|
||||||
m_ui->actionEntryMoveUp->setIcon(icons()->icon("move-up"));
|
m_ui->actionEntryMoveUp->setIcon(icons()->icon("move-up"));
|
||||||
m_ui->actionEntryMoveDown->setIcon(icons()->icon("move-down"));
|
m_ui->actionEntryMoveDown->setIcon(icons()->icon("move-down"));
|
||||||
m_ui->actionEntryCopyUsername->setIcon(icons()->icon("username-copy"));
|
m_ui->actionEntryCopyUsername->setIcon(icons()->icon("username-copy"));
|
||||||
@ -482,6 +484,7 @@ MainWindow::MainWindow()
|
|||||||
m_ui->actionEntryAutoTypePassword, SIGNAL(triggered()), SLOT(performAutoTypePassword()));
|
m_ui->actionEntryAutoTypePassword, SIGNAL(triggered()), SLOT(performAutoTypePassword()));
|
||||||
m_actionMultiplexer.connect(
|
m_actionMultiplexer.connect(
|
||||||
m_ui->actionEntryAutoTypePasswordEnter, SIGNAL(triggered()), SLOT(performAutoTypePasswordEnter()));
|
m_ui->actionEntryAutoTypePasswordEnter, SIGNAL(triggered()), SLOT(performAutoTypePasswordEnter()));
|
||||||
|
m_actionMultiplexer.connect(m_ui->actionEntryAutoTypeTOTP, SIGNAL(triggered()), SLOT(performAutoTypeTOTP()));
|
||||||
m_actionMultiplexer.connect(m_ui->actionEntryOpenUrl, SIGNAL(triggered()), SLOT(openUrl()));
|
m_actionMultiplexer.connect(m_ui->actionEntryOpenUrl, SIGNAL(triggered()), SLOT(openUrl()));
|
||||||
m_actionMultiplexer.connect(m_ui->actionEntryDownloadIcon, SIGNAL(triggered()), SLOT(downloadSelectedFavicons()));
|
m_actionMultiplexer.connect(m_ui->actionEntryDownloadIcon, SIGNAL(triggered()), SLOT(downloadSelectedFavicons()));
|
||||||
#ifdef WITH_XC_SSHAGENT
|
#ifdef WITH_XC_SSHAGENT
|
||||||
@ -823,6 +826,8 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||||||
m_ui->actionEntryAutoTypePassword->setEnabled(singleEntrySelected && dbWidget->currentEntryHasPassword());
|
m_ui->actionEntryAutoTypePassword->setEnabled(singleEntrySelected && dbWidget->currentEntryHasPassword());
|
||||||
m_ui->actionEntryAutoTypePasswordEnter->setEnabled(singleEntrySelected
|
m_ui->actionEntryAutoTypePasswordEnter->setEnabled(singleEntrySelected
|
||||||
&& dbWidget->currentEntryHasPassword());
|
&& dbWidget->currentEntryHasPassword());
|
||||||
|
m_ui->actionEntryAutoTypeTOTP->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
||||||
|
m_ui->actionEntryAutoTypeTOTP->setVisible(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
||||||
m_ui->actionEntryOpenUrl->setEnabled(singleEntrySelected && dbWidget->currentEntryHasUrl());
|
m_ui->actionEntryOpenUrl->setEnabled(singleEntrySelected && dbWidget->currentEntryHasUrl());
|
||||||
m_ui->actionEntryTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
m_ui->actionEntryTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
||||||
m_ui->actionEntryCopyTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
m_ui->actionEntryCopyTotp->setEnabled(singleEntrySelected && dbWidget->currentEntryHasTotp());
|
||||||
|
@ -741,6 +741,20 @@
|
|||||||
<string notr="true">{PASSWORD}{ENTER}</string>
|
<string notr="true">{PASSWORD}{ENTER}</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionEntryAutoTypeTOTP">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">{TOTP}</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconText">
|
||||||
|
<string notr="true">{TOTP}</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string notr="true">{TOTP}</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionEntryDownloadIcon">
|
<action name="actionEntryDownloadIcon">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Download &Favicon</string>
|
<string>Download &Favicon</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user