Skip to content

Commit b684ed6

Browse files
committed
add import QR images/OTP URLs buttons to add account page
1 parent 60ea813 commit b684ed6

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

_locales/en/messages.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,18 @@
229229
"message": "Import QR Image Backup",
230230
"description": "Import qr image backup."
231231
},
232+
"import_qr_images": {
233+
"message": "Import QR Images",
234+
"description": "Import qr images. Shown as add account method."
235+
},
232236
"import_backup_code": {
233237
"message": "Import Text Backup",
234238
"description": "Import backup code."
235239
},
240+
"import_otp_urls": {
241+
"message": "Import OTP URLs",
242+
"description": "Import OTP URLs. Shown as add account method."
243+
},
236244
"import_backup_qr_partly_failed": {
237245
"message": "Import successful, but some QR codes could not be recognized.",
238246
"description": "Import successful, but some QR image cannot be recognized."

src/components/Import/TextImport.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<template>
22
<div>
33
<div class="import_code">
4-
<textarea spellcheck="false" v-model="importCode"></textarea>
4+
<textarea
5+
spellcheck="false"
6+
v-model="importCode"
7+
placeholder="otpauth://totp/...
8+
otpauth://totp/...
9+
otpauth://hotp/...
10+
..."
11+
></textarea>
512
</div>
613
<div class="import_encrypted">
714
<input type="checkbox" id="encryptedCode" v-model="importEncrypted" />

src/components/Popup/AddMethodPage.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<a-button @click="showInfo('AddAccountPage')">
55
{{ i18n.add_secret }}
66
</a-button>
7+
<a-button-link href="import.html?QrImport">{{
8+
i18n.import_qr_images
9+
}}</a-button-link>
10+
<a-button-link href="import.html?TextImport">{{
11+
i18n.import_otp_urls
12+
}}</a-button-link>
713
</div>
814
</template>
915
<script lang="ts">

0 commit comments

Comments
 (0)