Compare commits
9 Commits
tweaks
...
b94e36ef3b
| Author | SHA1 | Date | |
|---|---|---|---|
| b94e36ef3b | |||
| fc7c1187e8 | |||
| 30b8b941ae | |||
| e4f3f9b2e0 | |||
| d7d53a5b8c | |||
| 44ed39b5c1 | |||
|
|
0dbc018c8d | ||
| fb7d51ac4c | |||
| 85031f84c0 |
@@ -6,14 +6,13 @@
|
|||||||
- replace user-affecting console.logs with error messages (eg. catches)
|
- replace user-affecting console.logs with error messages (eg. catches)
|
||||||
|
|
||||||
- contacts v1 :
|
- contacts v1 :
|
||||||
- .2 warn about amounts when you cannot see them
|
- .1 remove 'copy' until it works
|
||||||
- .1 add confirmation message when 'copy' succeeds
|
|
||||||
- .5 switch to prod server
|
|
||||||
- .5 Add page to show seed.
|
- .5 Add page to show seed.
|
||||||
- 01 Provide a way to import the non-sensitive data.
|
- 01 Provide a way to import the non-sensitive data.
|
||||||
- 01 Provide way to share your contact info.
|
- 01 Provide way to share your contact info.
|
||||||
- .2 move all "identity" references to temporary account access
|
- .2 move all "identity" references to temporary account access
|
||||||
- .5 make deploy for give-only features
|
- .5 make deploy for give-only features
|
||||||
|
- .5 get 'copy' to work on account page
|
||||||
|
|
||||||
- contacts v+ :
|
- contacts v+ :
|
||||||
- .5 make advanced "show/hide amounts" button into a nice UI toggle
|
- .5 make advanced "show/hide amounts" button into a nice UI toggle
|
||||||
@@ -42,3 +41,6 @@
|
|||||||
- Peer DID
|
- Peer DID
|
||||||
|
|
||||||
- DIDComm
|
- DIDComm
|
||||||
|
|
||||||
|
- v video for multiple identities https://youtu.be/p8L87AeD76w
|
||||||
|
- v video for adding time to contacts https://youtu.be/7Yylczevp10
|
||||||
|
|||||||
42
src/components/InfiniteScroll.vue
Normal file
42
src/components/InfiniteScroll.vue
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="scrollContainer">
|
||||||
|
<slot />
|
||||||
|
<div ref="sentinel" style="height: 1px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component, Emit, Prop, Vue } from "vue-facing-decorator";
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class InfiniteScroll extends Vue {
|
||||||
|
@Prop({ default: 100 })
|
||||||
|
readonly distance!: number;
|
||||||
|
private observer!: IntersectionObserver;
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
const options = {
|
||||||
|
root: this.$refs.scrollContainer as HTMLElement,
|
||||||
|
rootMargin: `0px 0px ${this.distance}px 0px`,
|
||||||
|
threshold: 1.0,
|
||||||
|
};
|
||||||
|
this.observer = new IntersectionObserver(this.handleIntersection, options);
|
||||||
|
this.observer.observe(this.$refs.sentinel as HTMLElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeUnmount() {
|
||||||
|
this.observer.disconnect();
|
||||||
|
}
|
||||||
|
@Emit("reached-bottom")
|
||||||
|
handleIntersection(entries: IntersectionObserverEntry[]) {
|
||||||
|
const entry = entries[0];
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style scoped></style>
|
||||||
@@ -2,8 +2,11 @@
|
|||||||
* Generic strings that could be used throughout the app.
|
* Generic strings that could be used throughout the app.
|
||||||
*/
|
*/
|
||||||
export enum AppString {
|
export enum AppString {
|
||||||
APP_NAME = "KickStart with Time",
|
APP_NAME = "Kick-Start with Time",
|
||||||
VERSION = "0.1",
|
|
||||||
DEFAULT_ENDORSER_API_SERVER = "https://test.endorser.ch:8000",
|
PROD_ENDORSER_API_SERVER = "https://endorser.ch:3000",
|
||||||
//DEFAULT_ENDORSER_API_SERVER = "http://localhost:3000",
|
TEST_ENDORSER_API_SERVER = "https://test.endorser.ch:8000",
|
||||||
|
LOCAL_ENDORSER_API_SERVER = "http://localhost:3000",
|
||||||
|
|
||||||
|
DEFAULT_ENDORSER_API_SERVER = TEST_ENDORSER_API_SERVER,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
Settings,
|
Settings,
|
||||||
SettingsSchema,
|
SettingsSchema,
|
||||||
} from "./tables/settings";
|
} from "./tables/settings";
|
||||||
|
import { AppString } from "@/constants/app";
|
||||||
|
|
||||||
// a separate DB because the seed is super-sensitive data
|
// a separate DB because the seed is super-sensitive data
|
||||||
type SensitiveTables = {
|
type SensitiveTables = {
|
||||||
@@ -57,5 +58,8 @@ db.version(1).stores(NonsensitiveSchemas);
|
|||||||
// initialize, a la https://dexie.org/docs/Tutorial/Design#the-populate-event
|
// initialize, a la https://dexie.org/docs/Tutorial/Design#the-populate-event
|
||||||
db.on("populate", function () {
|
db.on("populate", function () {
|
||||||
// ensure there's an initial entry for settings
|
// ensure there's an initial entry for settings
|
||||||
db.settings.add({ id: MASTER_SETTINGS_KEY });
|
db.settings.add({
|
||||||
|
id: MASTER_SETTINGS_KEY,
|
||||||
|
apiServer: AppString.DEFAULT_ENDORSER_API_SERVER,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
export type Settings = {
|
export type Settings = {
|
||||||
id: number; // there's only one entry: MASTER_SETTINGS_KEY
|
id: number; // there's only one entry: MASTER_SETTINGS_KEY
|
||||||
activeDid?: string;
|
activeDid?: string;
|
||||||
|
apiServer?: string;
|
||||||
firstName?: string;
|
firstName?: string;
|
||||||
lastName?: string;
|
lastName?: string;
|
||||||
showContactGivesInline?: boolean;
|
showContactGivesInline?: boolean;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
faEye,
|
faEye,
|
||||||
faEyeSlash,
|
faEyeSlash,
|
||||||
faFileLines,
|
faFileLines,
|
||||||
|
faFloppyDisk,
|
||||||
faFolderOpen,
|
faFolderOpen,
|
||||||
faHand,
|
faHand,
|
||||||
faHouseChimney,
|
faHouseChimney,
|
||||||
@@ -53,6 +54,7 @@ library.add(
|
|||||||
faEye,
|
faEye,
|
||||||
faEyeSlash,
|
faEyeSlash,
|
||||||
faFileLines,
|
faFileLines,
|
||||||
|
faFloppyDisk,
|
||||||
faFolderOpen,
|
faFolderOpen,
|
||||||
faHand,
|
faHand,
|
||||||
faHouseChimney,
|
faHouseChimney,
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ export async function testServerRegisterUser() {
|
|||||||
// Make the xhr request payload
|
// Make the xhr request payload
|
||||||
|
|
||||||
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const endorserApiServer =
|
||||||
|
settings?.apiServer || AppString.TEST_ENDORSER_API_SERVER;
|
||||||
const url = endorserApiServer + "/api/claim";
|
const url = endorserApiServer + "/api/claim";
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -89,9 +89,15 @@
|
|||||||
<div class="text-slate-500 text-sm font-bold">ID</div>
|
<div class="text-slate-500 text-sm font-bold">ID</div>
|
||||||
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
||||||
<code class="truncate">{{ activeDid }}</code>
|
<code class="truncate">{{ activeDid }}</code>
|
||||||
<button @click="copy(activeDid)" class="ml-2">
|
<button
|
||||||
|
@click="
|
||||||
|
doCopyTwoSecRedo(activeDid, () => (showDidCopy = !showDidCopy))
|
||||||
|
"
|
||||||
|
class="ml-2"
|
||||||
|
>
|
||||||
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
||||||
</button>
|
</button>
|
||||||
|
<span v-show="showDidCopy">Copied!</span>
|
||||||
<span class="whitespace-nowrap ml-4">
|
<span class="whitespace-nowrap ml-4">
|
||||||
<button
|
<button
|
||||||
class="text-xs uppercase bg-slate-500 text-white px-1.5 py-1 rounded-md"
|
class="text-xs uppercase bg-slate-500 text-white px-1.5 py-1 rounded-md"
|
||||||
@@ -109,25 +115,43 @@
|
|||||||
<div class="text-slate-500 text-sm font-bold">Public Key (base 64)</div>
|
<div class="text-slate-500 text-sm font-bold">Public Key (base 64)</div>
|
||||||
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
||||||
<code class="truncate">{{ publicBase64 }}</code>
|
<code class="truncate">{{ publicBase64 }}</code>
|
||||||
<button @click="copy(publicBase64)" class="ml-2">
|
<button
|
||||||
|
@click="
|
||||||
|
doCopyTwoSecRedo(publicBase64, () => (showB64Copy = !showB64Copy))
|
||||||
|
"
|
||||||
|
class="ml-2"
|
||||||
|
>
|
||||||
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
||||||
</button>
|
</button>
|
||||||
|
<span v-show="showB64Copy">Copied!</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-slate-500 text-sm font-bold">Public Key (hex)</div>
|
<div class="text-slate-500 text-sm font-bold">Public Key (hex)</div>
|
||||||
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
||||||
<code class="truncate">{{ publicHex }}</code>
|
<code class="truncate">{{ publicHex }}</code>
|
||||||
<button @click="copy(publicHex)" class="ml-2">
|
<button
|
||||||
|
@click="
|
||||||
|
doCopyTwoSecRedo(publicHex, () => (showPubCopy = !showPubCopy))
|
||||||
|
"
|
||||||
|
class="ml-2"
|
||||||
|
>
|
||||||
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
||||||
</button>
|
</button>
|
||||||
|
<span v-show="showPubCopy">Copied!</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-slate-500 text-sm font-bold">Derivation Path</div>
|
<div class="text-slate-500 text-sm font-bold">Derivation Path</div>
|
||||||
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
<div class="text-sm text-slate-500 flex justify-start items-center mb-1">
|
||||||
<code class="truncate">{{ derivationPath }}</code>
|
<code class="truncate">{{ derivationPath }}</code>
|
||||||
<button @click="copy(derivationPath)" class="ml-2">
|
<button
|
||||||
|
@click="
|
||||||
|
doCopyTwoSecRedo(derivationPath, () => (showDerCopy = !showDerCopy))
|
||||||
|
"
|
||||||
|
class="ml-2"
|
||||||
|
>
|
||||||
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
<fa icon="copy" class="text-slate-400 fa-fw"></fa>
|
||||||
</button>
|
</button>
|
||||||
|
<span v-show="showDerCopy">Copied!</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -206,7 +230,7 @@
|
|||||||
|
|
||||||
<div class="flex py-2">
|
<div class="flex py-2">
|
||||||
<button class="text-center text-md text-blue-500" @click="checkLimits()">
|
<button class="text-center text-md text-blue-500" @click="checkLimits()">
|
||||||
Check Registration and Claim Limits
|
Check Limits
|
||||||
</button>
|
</button>
|
||||||
<div v-if="!!limits?.nextWeekBeginDateTime" class="px-9">
|
<div v-if="!!limits?.nextWeekBeginDateTime" class="px-9">
|
||||||
<span class="font-bold">Rate Limits</span>
|
<span class="font-bold">Rate Limits</span>
|
||||||
@@ -224,6 +248,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex py-2">
|
||||||
|
Claim Server
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="block w-full rounded border border-slate-400 px-3 py-2"
|
||||||
|
v-model="apiServerInput"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
v-if="apiServerInput != apiServer"
|
||||||
|
class="px-4 rounded bg-slate-200 border border-slate-400"
|
||||||
|
@click="onClickSaveApiServer()"
|
||||||
|
>
|
||||||
|
<fa icon="floppy-disk" class="fa-fw"></fa>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="px-4 rounded bg-slate-200 border border-slate-400"
|
||||||
|
@click="setApiServerInput(Constants.PROD_ENDORSER_API_SERVER)"
|
||||||
|
>
|
||||||
|
Use Prod
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="px-4 rounded bg-slate-200 border border-slate-400"
|
||||||
|
@click="setApiServerInput(Constants.TEST_ENDORSER_API_SERVER)"
|
||||||
|
>
|
||||||
|
Use Test
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="px-4 rounded bg-slate-200 border border-slate-400"
|
||||||
|
@click="setApiServerInput(Constants.LOCAL_ENDORSER_API_SERVER)"
|
||||||
|
>
|
||||||
|
Use Local
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="numAccounts > 0" class="flex py-2">
|
<div v-if="numAccounts > 0" class="flex py-2">
|
||||||
Switch Account
|
Switch Account
|
||||||
<span v-for="accountNum in numAccounts" :key="accountNum">
|
<span v-for="accountNum in numAccounts" :key="accountNum">
|
||||||
@@ -278,7 +336,11 @@ interface RateLimits {
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class AccountViewView extends Vue {
|
export default class AccountViewView extends Vue {
|
||||||
|
Constants = AppString;
|
||||||
|
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
apiServer = "";
|
||||||
|
apiServerInput = "";
|
||||||
derivationPath = "";
|
derivationPath = "";
|
||||||
firstName = "";
|
firstName = "";
|
||||||
lastName = "";
|
lastName = "";
|
||||||
@@ -288,7 +350,18 @@ export default class AccountViewView extends Vue {
|
|||||||
limits: RateLimits | null = null;
|
limits: RateLimits | null = null;
|
||||||
showContactGives = false;
|
showContactGives = false;
|
||||||
|
|
||||||
copy = useClipboard().copy;
|
showDidCopy = false;
|
||||||
|
showDerCopy = false;
|
||||||
|
showB64Copy = false;
|
||||||
|
showPubCopy = false;
|
||||||
|
|
||||||
|
// call fn, copy text to the clipboard, then redo fn after 2 seconds
|
||||||
|
doCopyTwoSecRedo(text, fn) {
|
||||||
|
fn();
|
||||||
|
useClipboard()
|
||||||
|
.copy(text)
|
||||||
|
.then(() => setTimeout(fn, 2000));
|
||||||
|
}
|
||||||
|
|
||||||
handleChange() {
|
handleChange() {
|
||||||
this.showContactGives = !this.showContactGives;
|
this.showContactGives = !this.showContactGives;
|
||||||
@@ -306,11 +379,12 @@ export default class AccountViewView extends Vue {
|
|||||||
// assign this to a class variable, eg. "registerThisUser = testServerRegisterUser",
|
// assign this to a class variable, eg. "registerThisUser = testServerRegisterUser",
|
||||||
// select a component in the extension, and enter in the console: $vm.ctx.registerThisUser()
|
// select a component in the extension, and enter in the console: $vm.ctx.registerThisUser()
|
||||||
//testServerRegisterUser();
|
//testServerRegisterUser();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
this.activeDid = settings?.activeDid || "";
|
this.activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
this.apiServerInput = settings?.apiServer || "";
|
||||||
this.firstName = settings?.firstName || "";
|
this.firstName = settings?.firstName || "";
|
||||||
this.lastName = settings?.lastName || "";
|
this.lastName = settings?.lastName || "";
|
||||||
this.showContactGives = !!settings?.showContactGivesInline;
|
this.showContactGives = !!settings?.showContactGivesInline;
|
||||||
@@ -399,8 +473,7 @@ export default class AccountViewView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkLimits() {
|
async checkLimits() {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/report/rateLimits";
|
||||||
const url = endorserApiServer + "/api/report/rateLimits";
|
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
const accounts = await accountsDB.accounts.toArray();
|
const accounts = await accountsDB.accounts.toArray();
|
||||||
const account = R.find((acc) => acc.did === this.activeDid, accounts);
|
const account = R.find((acc) => acc.did === this.activeDid, accounts);
|
||||||
@@ -457,6 +530,18 @@ export default class AccountViewView extends Vue {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async onClickSaveApiServer() {
|
||||||
|
await db.open();
|
||||||
|
db.settings.update(MASTER_SETTINGS_KEY, {
|
||||||
|
apiServer: this.apiServerInput,
|
||||||
|
});
|
||||||
|
this.apiServer = this.apiServerInput;
|
||||||
|
}
|
||||||
|
|
||||||
|
setApiServerInput(value) {
|
||||||
|
this.apiServerInput = value;
|
||||||
|
}
|
||||||
|
|
||||||
alertMessage = "";
|
alertMessage = "";
|
||||||
alertTitle = "";
|
alertTitle = "";
|
||||||
isAlertVisible = false;
|
isAlertVisible = false;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" />
|
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" />
|
||||||
<span class="tooltiptext">Confirmed</span>
|
<span class="tooltiptext">Confirmed</span>
|
||||||
</span>
|
</span>
|
||||||
<button v-else class="tooltip" @click="confirmGiven(record)">
|
<button v-else class="tooltip" @click="confirm(record)">
|
||||||
<fa icon="circle" class="text-blue-600 fa-fw ml-1" />
|
<fa icon="circle" class="text-blue-600 fa-fw ml-1" />
|
||||||
<span class="tooltiptext">Unconfirmed</span>
|
<span class="tooltiptext">Unconfirmed</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -144,6 +144,7 @@ import { AxiosError } from "axios";
|
|||||||
@Options({})
|
@Options({})
|
||||||
export default class ContactsView extends Vue {
|
export default class ContactsView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
apiServer = "";
|
||||||
contact: Contact | null = null;
|
contact: Contact | null = null;
|
||||||
giveRecords: Array<GiveServerRecord> = [];
|
giveRecords: Array<GiveServerRecord> = [];
|
||||||
|
|
||||||
@@ -155,6 +156,7 @@ export default class ContactsView extends Vue {
|
|||||||
|
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
this.activeDid = settings?.activeDid || "";
|
this.activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
|
||||||
if (this.activeDid && this.contact) {
|
if (this.activeDid && this.contact) {
|
||||||
this.loadGives(this.activeDid, this.contact);
|
this.loadGives(this.activeDid, this.contact);
|
||||||
@@ -168,14 +170,12 @@ export default class ContactsView extends Vue {
|
|||||||
const account = R.find((acc) => acc.did === activeDid, accounts);
|
const account = R.find((acc) => acc.did === activeDid, accounts);
|
||||||
const identity = JSON.parse(account?.identity || "undefined");
|
const identity = JSON.parse(account?.identity || "undefined");
|
||||||
|
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
|
||||||
|
|
||||||
// load all the time I have given to them
|
// load all the time I have given to them
|
||||||
try {
|
try {
|
||||||
let result = [];
|
let result = [];
|
||||||
|
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/v2/report/gives?agentDid=" +
|
"/api/v2/report/gives?agentDid=" +
|
||||||
encodeURIComponent(identity.did) +
|
encodeURIComponent(identity.did) +
|
||||||
"&recipientDid=" +
|
"&recipientDid=" +
|
||||||
@@ -201,7 +201,7 @@ export default class ContactsView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const url2 =
|
const url2 =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/v2/report/gives?agentDid=" +
|
"/api/v2/report/gives?agentDid=" +
|
||||||
encodeURIComponent(contact.did) +
|
encodeURIComponent(contact.did) +
|
||||||
"&recipientDid=" +
|
"&recipientDid=" +
|
||||||
@@ -239,11 +239,7 @@ export default class ContactsView extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async confirmGiven(record: GiveServerRecord) {
|
async confirm(record: GiveServerRecord) {
|
||||||
if (!confirm("Are you sure you want to mark this as confirmed?")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make claim
|
// Make claim
|
||||||
// I use clone here because otherwise it gets a Proxy object.
|
// I use clone here because otherwise it gets a Proxy object.
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -286,8 +282,7 @@ export default class ContactsView extends Vue {
|
|||||||
|
|
||||||
// Make the xhr request payload
|
// Make the xhr request payload
|
||||||
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/v2/claim";
|
||||||
const url = endorserApiServer + "/api/v2/claim";
|
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -49,6 +49,18 @@
|
|||||||
Your Contacts
|
Your Contacts
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<div class="flex justify-between py-2">
|
||||||
|
<span />
|
||||||
|
<span>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'help' }"
|
||||||
|
class="text-xs uppercase bg-blue-500 text-white px-1.5 py-1 rounded-md ml-1"
|
||||||
|
>
|
||||||
|
Help
|
||||||
|
</router-link>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- New Contact -->
|
<!-- New Contact -->
|
||||||
<div class="mb-4 flex">
|
<div class="mb-4 flex">
|
||||||
<input
|
<input
|
||||||
@@ -165,12 +177,11 @@
|
|||||||
: (givenByMeUnconfirmed[contact.did] || 0)
|
: (givenByMeUnconfirmed[contact.did] || 0)
|
||||||
/* eslint-enable prettier/prettier */
|
/* eslint-enable prettier/prettier */
|
||||||
}}
|
}}
|
||||||
<span class="tooltiptext-left">
|
<span
|
||||||
{{
|
v-if="givenByMeDescriptions[contact.did]"
|
||||||
givenByMeDescriptions[contact.did]
|
class="tooltiptext-left"
|
||||||
? "Most recently: " + givenByMeDescriptions[contact.did]
|
>
|
||||||
: "(None given yet.)"
|
{{ givenByMeDescriptions[contact.did] }}
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mb-6"
|
class="text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mb-6"
|
||||||
@@ -191,12 +202,11 @@
|
|||||||
: (givenToMeUnconfirmed[contact.did] || 0)
|
: (givenToMeUnconfirmed[contact.did] || 0)
|
||||||
/* eslint-enable prettier/prettier */
|
/* eslint-enable prettier/prettier */
|
||||||
}}
|
}}
|
||||||
<span class="tooltiptext-left">
|
<span
|
||||||
{{
|
v-if="givenToMeDescriptions[contact.did]"
|
||||||
givenToMeDescriptions[contact.did]
|
class="tooltiptext-left"
|
||||||
? "Most recently: " + givenToMeDescriptions[contact.did]
|
>
|
||||||
: "(None received yet.)"
|
{{ givenToMeDescriptions[contact.did] }}
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mb-6"
|
class="text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mb-6"
|
||||||
@@ -261,6 +271,7 @@ const Buffer = require("buffer/").Buffer;
|
|||||||
})
|
})
|
||||||
export default class ContactsView extends Vue {
|
export default class ContactsView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
apiServer = "";
|
||||||
contacts: Array<Contact> = [];
|
contacts: Array<Contact> = [];
|
||||||
contactInput = "";
|
contactInput = "";
|
||||||
// { "did:...": concatenated-descriptions } entry for each contact
|
// { "did:...": concatenated-descriptions } entry for each contact
|
||||||
@@ -286,6 +297,7 @@ export default class ContactsView extends Vue {
|
|||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
this.activeDid = settings?.activeDid || "";
|
this.activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
|
||||||
this.showGiveNumbers = !!settings?.showContactGivesInline;
|
this.showGiveNumbers = !!settings?.showContactGivesInline;
|
||||||
if (this.showGiveNumbers) {
|
if (this.showGiveNumbers) {
|
||||||
@@ -311,12 +323,10 @@ export default class ContactsView extends Vue {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
|
||||||
|
|
||||||
// load all the time I have given
|
// load all the time I have given
|
||||||
try {
|
try {
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/v2/report/gives?agentDid=" +
|
"/api/v2/report/gives?agentDid=" +
|
||||||
encodeURIComponent(identity.did);
|
encodeURIComponent(identity.did);
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
@@ -325,15 +335,15 @@ export default class ContactsView extends Vue {
|
|||||||
Authorization: "Bearer " + token,
|
Authorization: "Bearer " + token,
|
||||||
};
|
};
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
console.log("All gifts you've given:", resp.data);
|
//console.log("All gifts you've given:", resp.data);
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
const contactDescriptions: Record<string, string> = {};
|
const contactDescriptions: Record<string, string> = {};
|
||||||
const contactConfirmed: Record<string, number> = {};
|
const contactConfirmed: Record<string, number> = {};
|
||||||
const contactUnconfirmed: Record<string, number> = {};
|
const contactUnconfirmed: Record<string, number> = {};
|
||||||
const allData: Array<GiveServerRecord> = resp.data.data;
|
const allData: Array<GiveServerRecord> = resp.data.data;
|
||||||
for (const give of allData) {
|
for (const give of allData) {
|
||||||
const recipDid: string = give.recipientDid;
|
if (give.unit == "HUR") {
|
||||||
if (recipDid && give.unit == "HUR") {
|
const recipDid: string = give.recipientDid;
|
||||||
if (give.amountConfirmed) {
|
if (give.amountConfirmed) {
|
||||||
const prevAmount = contactConfirmed[recipDid] || 0;
|
const prevAmount = contactConfirmed[recipDid] || 0;
|
||||||
contactConfirmed[recipDid] = prevAmount + give.amount;
|
contactConfirmed[recipDid] = prevAmount + give.amount;
|
||||||
@@ -347,6 +357,7 @@ export default class ContactsView extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//console.log("Done retrieving gives", contactConfirmed);
|
||||||
this.givenByMeDescriptions = contactDescriptions;
|
this.givenByMeDescriptions = contactDescriptions;
|
||||||
this.givenByMeConfirmed = contactConfirmed;
|
this.givenByMeConfirmed = contactConfirmed;
|
||||||
this.givenByMeUnconfirmed = contactUnconfirmed;
|
this.givenByMeUnconfirmed = contactUnconfirmed;
|
||||||
@@ -370,7 +381,7 @@ export default class ContactsView extends Vue {
|
|||||||
// load all the time I have received
|
// load all the time I have received
|
||||||
try {
|
try {
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/v2/report/gives?recipientDid=" +
|
"/api/v2/report/gives?recipientDid=" +
|
||||||
encodeURIComponent(identity.did);
|
encodeURIComponent(identity.did);
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
@@ -379,7 +390,7 @@ export default class ContactsView extends Vue {
|
|||||||
Authorization: "Bearer " + token,
|
Authorization: "Bearer " + token,
|
||||||
};
|
};
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
console.log("All gifts you've recieved:", resp.data);
|
//console.log("All gifts you've recieved:", resp.data);
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
const contactDescriptions: Record<string, string> = {};
|
const contactDescriptions: Record<string, string> = {};
|
||||||
const contactConfirmed: Record<string, number> = {};
|
const contactConfirmed: Record<string, number> = {};
|
||||||
@@ -509,8 +520,7 @@ export default class ContactsView extends Vue {
|
|||||||
|
|
||||||
// Make the xhr request payload
|
// Make the xhr request payload
|
||||||
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/v2/claim";
|
||||||
const url = endorserApiServer + "/api/v2/claim";
|
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -550,9 +560,8 @@ export default class ContactsView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setVisibility(contact: Contact, visibility: boolean) {
|
async setVisibility(contact: Contact, visibility: boolean) {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/report/" +
|
"/api/report/" +
|
||||||
(visibility ? "canSeeMe" : "cannotSeeMe");
|
(visibility ? "canSeeMe" : "cannotSeeMe");
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
@@ -590,9 +599,8 @@ export default class ContactsView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkVisibility(contact: Contact) {
|
async checkVisibility(contact: Contact) {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/report/canDidExplicitlySeeMe?did=" +
|
"/api/report/canDidExplicitlySeeMe?did=" +
|
||||||
encodeURIComponent(contact.did);
|
encodeURIComponent(contact.did);
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
@@ -763,8 +771,7 @@ export default class ContactsView extends Vue {
|
|||||||
// Make the xhr request payload
|
// Make the xhr request payload
|
||||||
|
|
||||||
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/v2/claim";
|
||||||
const url = endorserApiServer + "/api/v2/claim";
|
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -48,20 +48,20 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- CONTENT -->
|
<!-- CONTENT -->
|
||||||
<section id="Content" class="p-4 pb-24">
|
<section id="Content" class="p-6 pb-24">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
||||||
Help
|
Help
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-xl font-semibold py-4">Introduction</h2>
|
<h2 class="text-xl font-semibold">Introduction</h2>
|
||||||
<p>
|
<p>
|
||||||
This app is a window into data that you and your friends own, focused on
|
This app is a window into data that you and your friends own, focused on
|
||||||
gifts and collaboration.
|
gifts and collaboration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 class="text-xl font-semibold py-4">How do I backup all my data?</h2>
|
<h2 class="text-xl font-semibold">How do I backup all my data?</h2>
|
||||||
<p>
|
<p>
|
||||||
There are two parts to backup your data: the identifier secrets and the
|
There are two parts to backup your data: the identifier secrets and the
|
||||||
other data such as settings, contacts, etc.
|
other data such as settings, contacts, etc.
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<ul class="list-disc list-inside">
|
<ul class="list-disc list-inside">
|
||||||
<li>
|
<li>
|
||||||
Go to your Identity <fa icon="circle-user" class="fa-fw" /> page.
|
Go to Your Identity <fa icon="circle-user" class="fa-fw" /> page.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Click on "Backup Identifier Seed" and follow the instructions.
|
Click on "Backup Identifier Seed" and follow the instructions.
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<ul class="list-disc list-inside">
|
<ul class="list-disc list-inside">
|
||||||
<li>
|
<li>
|
||||||
Go to your Identity <fa icon="circle-user" class="fa-fw" /> page.
|
Go to Your Identity <fa icon="circle-user" class="fa-fw" /> page.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Click on "Download Settings...". That will save a file to your
|
Click on "Download Settings...". That will save a file to your
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="text-xl font-semibold py-4">How do I restore my data?</h2>
|
<h2 class="text-xl font-semibold">How do I restore my data?</h2>
|
||||||
<p>
|
<p>
|
||||||
There are two parts to restore your data: the identity secrets and the
|
There are two parts to restore your data: the identity secrets and the
|
||||||
other data such as settings, contacts, etc.
|
other data such as settings, contacts, etc.
|
||||||
@@ -135,24 +135,30 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="text-xl font-semibold py-4">
|
<h2 class="text-xl font-semibold">
|
||||||
How do I get registered to make claims?
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Contact a current user. They will be able to register you on their
|
|
||||||
Contacts <fa icon="users" class="fa-fw" /> screen. Note that they have a
|
|
||||||
limited number of registrations.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 class="text-xl font-semibold py-4">
|
|
||||||
How do I add someone to my contacts?
|
How do I add someone to my contacts?
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
Tell them to copy their ID, which typically starts with "did:ethr:...",
|
Tell them to copy their ID, which typically starts with "did:ethr:...",
|
||||||
and send it to you. Go to the Contacts
|
and send it to you. Go to the Contacts
|
||||||
<fa icon="users" class="fa-fw" /> page and enter that into the top form.
|
<fa icon="circle-user" class="fa-fw" /> page and enter that into the top
|
||||||
You may add a name by adding a comma followed by their name; you may
|
form. You may add a name by adding a comma followed by their name; you
|
||||||
also add their public key by adding another comma followed by the key.
|
may also add their public key by adding another comma followed by the
|
||||||
|
key.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2 class="text-xl font-semibold">
|
||||||
|
I know there is a record from someone, so why can't I see that info?
|
||||||
|
</h2>
|
||||||
|
<p>
|
||||||
|
Sometimes someone else has made claims -- meaning they have given time,
|
||||||
|
or recognized time given, or declared a project -- but you cannot see
|
||||||
|
anything associated with them. The reason may be because they have not
|
||||||
|
given you permission to see their information. Ask them to add you to
|
||||||
|
their contact list and make sure the eye next to your name is open like
|
||||||
|
this
|
||||||
|
<fa icon="eye" class="fa-fw" /> and not closed like this
|
||||||
|
<fa icon="eye-slash" class="fa-fw" />.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ interface VerifiableCredential {
|
|||||||
})
|
})
|
||||||
export default class NewEditProjectView extends Vue {
|
export default class NewEditProjectView extends Vue {
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
|
apiServer = "";
|
||||||
projectName = "";
|
projectName = "";
|
||||||
description = "";
|
description = "";
|
||||||
errorMessage = "";
|
errorMessage = "";
|
||||||
@@ -116,6 +117,7 @@ export default class NewEditProjectView extends Vue {
|
|||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
this.activeDid = settings?.activeDid || "";
|
this.activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
@@ -132,9 +134,8 @@ export default class NewEditProjectView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async LoadProject(identity: IIdentifier) {
|
async LoadProject(identity: IIdentifier) {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
|
||||||
const url =
|
const url =
|
||||||
endorserApiServer +
|
this.apiServer +
|
||||||
"/api/claim/byHandle/" +
|
"/api/claim/byHandle/" +
|
||||||
encodeURIComponent(this.projectId);
|
encodeURIComponent(this.projectId);
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
@@ -191,8 +192,7 @@ export default class NewEditProjectView extends Vue {
|
|||||||
// Make the xhr request payload
|
// Make the xhr request payload
|
||||||
|
|
||||||
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
const payload = JSON.stringify({ jwtEncoded: vcJwt });
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/v2/claim";
|
||||||
const url = endorserApiServer + "/api/v2/claim";
|
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ import { IIdentifier } from "@veramo/core";
|
|||||||
components: {},
|
components: {},
|
||||||
})
|
})
|
||||||
export default class ProjectViewView extends Vue {
|
export default class ProjectViewView extends Vue {
|
||||||
|
apiServer = "";
|
||||||
expanded = false;
|
expanded = false;
|
||||||
name = "";
|
name = "";
|
||||||
description = "";
|
description = "";
|
||||||
@@ -188,9 +189,10 @@ export default class ProjectViewView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async LoadProject(identity: IIdentifier) {
|
async LoadProject(identity: IIdentifier) {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url =
|
||||||
// eslint-disable-next-line prettier/prettier
|
this.apiServer +
|
||||||
const url = endorserApiServer + "/api/claim/byHandle/" + encodeURIComponent(this.projectId);
|
"/api/claim/byHandle/" +
|
||||||
|
encodeURIComponent(this.projectId);
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -232,6 +234,7 @@ export default class ProjectViewView extends Vue {
|
|||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
const activeDid = settings?.activeDid || "";
|
const activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
const num_accounts = await accountsDB.accounts.count();
|
const num_accounts = await accountsDB.accounts.count();
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ import { IIdentifier } from "@veramo/core";
|
|||||||
components: {},
|
components: {},
|
||||||
})
|
})
|
||||||
export default class ProjectsView extends Vue {
|
export default class ProjectsView extends Vue {
|
||||||
|
apiServer = "";
|
||||||
projects: { handleId: string; name: string; description: string }[] = [];
|
projects: { handleId: string; name: string; description: string }[] = [];
|
||||||
|
|
||||||
onClickLoadProject(id: string) {
|
onClickLoadProject(id: string) {
|
||||||
@@ -127,8 +128,7 @@ export default class ProjectsView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async LoadProjects(identity: IIdentifier) {
|
async LoadProjects(identity: IIdentifier) {
|
||||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
const url = this.apiServer + "/api/v2/report/plansByIssuer";
|
||||||
const url = endorserApiServer + "/api/v2/report/plansByIssuer";
|
|
||||||
const token = await accessToken(identity);
|
const token = await accessToken(identity);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -161,6 +161,7 @@ export default class ProjectsView extends Vue {
|
|||||||
await db.open();
|
await db.open();
|
||||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||||
const activeDid = settings?.activeDid || "";
|
const activeDid = settings?.activeDid || "";
|
||||||
|
this.apiServer = settings?.apiServer || "";
|
||||||
|
|
||||||
await accountsDB.open();
|
await accountsDB.open();
|
||||||
const num_accounts = await accountsDB.accounts.count();
|
const num_accounts = await accountsDB.accounts.count();
|
||||||
|
|||||||
Reference in New Issue
Block a user