Skip to content

Commit c1a416a

Browse files
committed
digits in qr export
1 parent ecbe547 commit c1a416a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/Popup/AddAccountPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<option v-bind:value="6">6</option>
2222
<option v-bind:value="8">8</option>
2323
</select>
24-
<br>
24+
<br />
2525
<label class="combo-label">{{ i18n.type }}</label>
2626
<select v-model="newAccount.type">
2727
<option v-bind:value="OTPType.totp">{{ i18n.based_on_time }}</option>

src/components/Popup/EntryComponent.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,10 @@ function getQrUrl(entry: OTPEntry) {
248248
(entry.type === OTPType.hotp || entry.type === OTPType.hhex
249249
? "&counter=" + entry.counter
250250
: "") +
251-
(entry.type === OTPType.totp && entry.period
251+
(entry.type === OTPType.totp && entry.period !== 30
252252
? "&period=" + entry.period
253-
: "");
253+
: "") +
254+
(entry.digits !== 6 ? "&digits=" + entry.digits : "");
254255
const qr = QRGen(0, "L");
255256
qr.addData(otpauth);
256257
qr.make();

0 commit comments

Comments
 (0)