Skip to content
Merged
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: 2 additions & 2 deletions src/components/Popup/MainBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
v-bind:entry="entry"
v-bind:tabindex="getTabindex(entry)"
/>
<div class="no-entry" v-if="entries.length === 0">
<div class="no-entry" v-if="entries.length === 0 && initComplete">
<IconKey />
<p>
{{ i18n.no_entires }}
Expand Down Expand Up @@ -68,7 +68,7 @@ const computed: {
shouldFilter: () => boolean;
entries: () => OTPEntry[];
} = {
...mapState("accounts", ["filter", "showSearch"]),
...mapState("accounts", ["filter", "showSearch", "initComplete"]),
...mapGetters("accounts", ["shouldFilter", "entries"]),
};

Expand Down
1 change: 1 addition & 0 deletions src/definitions/module-interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ interface AccountsState {
exportEncData: { [k: string]: OTPEntryInterface };
key: { enc: string; hash: string } | null;
wrongPassword: boolean;
initComplete: boolean;
}

interface NotificationState {
Expand Down
3 changes: 3 additions & 0 deletions src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ async function init() {
instance.$store.commit("style/showInfo", true);
instance.$store.commit("currentView/changeView", "EnterPasswordPage");
}
} else {
// Set init complete if no encryption is present, otherwise this will be set in updateEntries.
instance.$store.commit("accounts/initComplete");
}

// Auto focus on first entry
Expand Down
5 changes: 5 additions & 0 deletions src/store/Accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class Accounts implements Module {
exportEncData: await EntryStorage.getExport(entries, true),
key: await BrowserStorage.getKey(),
wrongPassword: false,
initComplete: false,
},
getters: {
shouldFilter(
Expand Down Expand Up @@ -156,6 +157,9 @@ export class Accounts implements Module {
wrongPassword(state: AccountsState) {
state.wrongPassword = true;
},
initComplete(state: AccountsState) {
state.initComplete = true;
},
},
actions: {
deleteCode: async (
Expand Down Expand Up @@ -435,6 +439,7 @@ export class Accounts implements Module {
await EntryStorage.getExport(state.state.entries, true)
);
state.commit("updateKeyExport", await BrowserStorage.getKey());
state.commit("initComplete");
return;
},
clearFilter: (state: ActionContext<AccountsState, {}>) => {
Expand Down