Skip to content

Commit a64300d

Browse files
committed
fix issue with qr export
1 parent 78dcebe commit a64300d

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/TODO

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/components/Popup/EntryComponent.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
import Vue from "vue";
7272
import { mapState } from "vuex";
7373
import * as QRGen from "qrcode-generator";
74-
import { OTPEntry, OTPType, CodeState } from "../../models/otp";
74+
import { OTPEntry, OTPType, CodeState, OTPAlgorithm } from "../../models/otp";
7575
7676
import IconMinusCircle from "../../../svg/minus-circle.svg";
7777
import IconRedo from "../../../svg/redo.svg";
@@ -252,7 +252,9 @@ function getQrUrl(entry: OTPEntry) {
252252
? "&period=" + entry.period
253253
: "") +
254254
(entry.digits !== 6 ? "&digits=" + entry.digits : "") +
255-
(entry.algorithm ? "&algorithm=" + entry.algorithm : "");
255+
(entry.algorithm !== OTPAlgorithm.SHA1
256+
? "&algorithm=" + OTPAlgorithm[entry.algorithm]
257+
: "");
256258
const qr = QRGen(0, "L");
257259
qr.addData(otpauth);
258260
qr.make();

0 commit comments

Comments
 (0)