feat: add contacts DB & page

This commit is contained in:
2023-03-12 18:30:18 -06:00
parent 701f71e942
commit 4fdfe2f824
9 changed files with 156 additions and 13 deletions

View File

@@ -1,5 +1,3 @@
import { Table } from "dexie";
export type Account = {
id?: number;
publicKey: string;
@@ -8,10 +6,6 @@ export type Account = {
dateCreated: number;
};
export type AccountsTable = {
accounts: Table<Account>;
};
// mark encrypted field by starting with a $ character
export const accountsSchema = {
accounts: "++id, publicKey, $mnemonic, $identity, dateCreated",

12
src/db/tables/contacts.ts Normal file
View File

@@ -0,0 +1,12 @@
export interface Contact {
did: string;
name?: string;
publicKeyBase64?: string;
seesMe?: boolean;
registered?: boolean;
}
// mark encrypted field by starting with a $ character
export const contactsSchema = {
contacts: "++did, name, publicKeyBase64, seesMe, registered",
};