forked from jsnbuchanan/crowd-funder-for-time-pwa
modify the settings to allow account-specific settings, eg. for "isRegistered"
This commit is contained in:
@@ -146,9 +146,9 @@ import InfiniteScroll from "@/components/InfiniteScroll.vue";
|
||||
import ProjectIcon from "@/components/ProjectIcon.vue";
|
||||
import TopMessage from "@/components/TopMessage.vue";
|
||||
import { NotificationIface } from "@/constants/app";
|
||||
import { accountsDB, db } from "@/db/index";
|
||||
import { accountsDB, db, retrieveSettingsForActiveAccount } from "@/db/index";
|
||||
import { Contact } from "@/db/tables/contacts";
|
||||
import { BoundingBox, MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||
import { BoundingBox } from "@/db/tables/settings";
|
||||
import { didInfo, getHeaders, PlanData } from "@/libs/endorserServer";
|
||||
|
||||
@Component({
|
||||
@@ -179,11 +179,10 @@ export default class DiscoverView extends Vue {
|
||||
didInfo = didInfo;
|
||||
|
||||
async mounted() {
|
||||
await db.open();
|
||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||
this.activeDid = (settings?.activeDid as string) || "";
|
||||
this.apiServer = (settings?.apiServer as string) || "";
|
||||
this.searchBox = settings?.searchBoxes?.[0] || null;
|
||||
const settings = await retrieveSettingsForActiveAccount();
|
||||
this.activeDid = (settings.activeDid as string) || "";
|
||||
this.apiServer = (settings.apiServer as string) || "";
|
||||
this.searchBox = settings.searchBoxes?.[0] || null;
|
||||
|
||||
this.allContacts = await db.contacts.toArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user