Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
"message": "Counter Based",
"description": "Counter Based"
},
"counter": {
"message": "Counter",
"description": "HOTP counter value"
},
"resize_popup_page": {
"message": "Preferences",
"description": "Popup Page Settings"
Expand Down
16 changes: 16 additions & 0 deletions src/components/Popup/EntryComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@
v-on:change="entry.update(encryption)"
/>
</div>
<div
class="issuerEdit"
v-if="entry.type === OTPType.hotp || entry.type === OTPType.hhex"
>
<input
type="number"
min="0"
v-model.number="entry.counter"
v-bind:placeholder="i18n.counter"
v-on:change="onCounterChange(entry)"
/>
</div>
<div
class="showqr"
v-if="shouldShowQrIcon(entry)"
Expand Down Expand Up @@ -194,6 +206,10 @@ export default Vue.extend({
}, 3000);
return;
},
onCounterChange(entry: OTPEntry) {
entry.generate();
entry.update();
},
async copyCode(entry: OTPEntry) {
if (
this.$store.state.style.style.isEditing ||
Expand Down