diff --git a/src/components/FeedFilters.vue b/src/components/FeedFilters.vue index e9cbac1..e9581fc 100644 --- a/src/components/FeedFilters.vue +++ b/src/components/FeedFilters.vue @@ -133,18 +133,18 @@ export default class FeedFilters extends Vue { this.visible = true; } - toggleHasVisibleDid() { + async toggleHasVisibleDid() { this.settingChanged = true; this.hasVisibleDid = !this.hasVisibleDid; - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { filterFeedByVisible: this.hasVisibleDid, }); } - toggleNearby() { + async toggleNearby() { this.settingChanged = true; this.isNearby = !this.isNearby; - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { filterFeedByNearby: this.isNearby, }); } @@ -154,7 +154,7 @@ export default class FeedFilters extends Vue { this.settingChanged = true; } - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { filterFeedByNearby: false, filterFeedByVisible: false, }); @@ -168,7 +168,7 @@ export default class FeedFilters extends Vue { this.settingChanged = true; } - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { filterFeedByNearby: true, filterFeedByVisible: true, }); diff --git a/src/db/index.ts b/src/db/index.ts index 6bb59f2..7d60ebf 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -51,8 +51,8 @@ db.version(2).stores({ db.version(3).stores(TempSchema); // Event handler to initialize the non-sensitive database with default settings -db.on("populate", () => { - db.settings.add({ +db.on("populate", async () => { + await db.settings.add({ id: MASTER_SETTINGS_KEY, apiServer: DEFAULT_ENDORSER_API_SERVER, }); diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue index 0a7109c..4490211 100644 --- a/src/views/ContactQRScanShowView.vue +++ b/src/views/ContactQRScanShowView.vue @@ -278,7 +278,7 @@ export default class ContactQRScanShow extends Vue { text: "Do you want to register them?", onCancel: async (stopAsking: boolean) => { if (stopAsking) { - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { hideRegisterPromptOnNewContact: stopAsking, }); this.hideRegisterPromptOnNewContact = stopAsking; @@ -286,7 +286,7 @@ export default class ContactQRScanShow extends Vue { }, onNo: async (stopAsking: boolean) => { if (stopAsking) { - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { hideRegisterPromptOnNewContact: stopAsking, }); this.hideRegisterPromptOnNewContact = stopAsking; diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index b2dea9f..183cc58 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -691,7 +691,7 @@ export default class ContactsView extends Vue { text: "Do you want to register them?", onCancel: async (stopAsking: boolean) => { if (stopAsking) { - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { hideRegisterPromptOnNewContact: stopAsking, }); this.hideRegisterPromptOnNewContact = stopAsking; @@ -699,7 +699,7 @@ export default class ContactsView extends Vue { }, onNo: async (stopAsking: boolean) => { if (stopAsking) { - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { hideRegisterPromptOnNewContact: stopAsking, }); this.hideRegisterPromptOnNewContact = stopAsking; @@ -1109,7 +1109,7 @@ export default class ContactsView extends Vue { const newShowValue = !this.showGiveNumbers; try { await db.open(); - db.settings.update(MASTER_SETTINGS_KEY, { + await db.settings.update(MASTER_SETTINGS_KEY, { showContactGivesInline: newShowValue, }); } catch (err) { diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 785e57d..178f0a1 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -89,7 +89,7 @@ :to="{ name: 'contact-qr' }" class="block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md" > - Show Them Default Identifier Info + Show Them {{ PASSKEYS_ENABLED ? "Default" : "Your" }} Identifier Info