Ability to set 7-digit TOTP codes from the UI (#2517)

This commit is contained in:
Lantizia 2018-11-28 16:23:06 +00:00 committed by Jonathan White
parent a67cac1322
commit 4e49de1afb
2 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,8 @@ void TotpSetupDialog::saveSettings()
uint digits = Totp::DEFAULT_DIGITS;
if (m_ui->radio8Digits->isChecked()) {
digits = 8;
} else if (m_ui->radio7Digits->isChecked()) {
digits = 7;
} else if (m_ui->radioSteam->isChecked()) {
digits = Totp::STEAM_DIGITS;
encShortName = Totp::STEAM_SHORTNAME;
@ -75,6 +77,8 @@ void TotpSetupDialog::init()
m_ui->radioCustom->setChecked(true);
if (settings->digits == 8) {
m_ui->radio8Digits->setChecked(true);
} else if (settings->digits == 7) {
m_ui->radio7Digits->setChecked(true);
} else {
m_ui->radio6Digits->setChecked(true);
}

View File

@ -153,6 +153,13 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QRadioButton" name="radio7Digits">
<property name="text">
<string>7 digits</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QRadioButton" name="radio8Digits">
<property name="text">
<string>8 digits</string>