@@ -192,32 +160,13 @@
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mb-6"
@click="exportDatabase()"
>
- Download Settings & Contacts (excluding Identifier Data)
+ Download Settings & Contacts
+
+
Check Limits
@@ -252,14 +201,76 @@
>
Advanced
+
+
+
+ Deep Identity Details
+
+
+
Public Key (base 64)
+
+ {{ publicBase64 }}
+ (showB64Copy = !showB64Copy))
+ "
+ class="ml-2"
+ >
+
+
+ Copied!
+
+
+
Public Key (hex)
+
+ {{ publicHex }}
+ (showPubCopy = !showPubCopy))
+ "
+ class="ml-2"
+ >
+
+
+ Copied!
+
+
+
Derivation Path
+
+ {{ derivationPath }}
+ (showDerCopy = !showDerCopy),
+ )
+ "
+ class="ml-2"
+ >
+
+
+ Copied!
+
+
+
+
+
+ Show amounts given with contacts
+
-
-
- Show amounts given with contacts
-
-
- Switch Identity / No Identity
-
+
+
+
+ Switch Identity / No Identity
+
+
- Claim Server
+
+
+ See Achievements & Statistics
+
+
+
+
+
+
Claim Server
-
-
-
-
- See Achievements & Statistics
-
-
-
@@ -346,7 +354,7 @@ import { useClipboard } from "@vueuse/core";
import QuickNav from "@/components/QuickNav.vue";
import { AppString } from "@/constants/app";
import { db, accountsDB } from "@/db/index";
-import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import { IIdentifier } from "@veramo/core";
import { ErrorResponse, RateLimits } from "@/libs/endorserServer";
@@ -368,14 +376,6 @@ interface IAccount {
derivationPath: string;
}
-interface SettingsType {
- activeDid?: string;
- apiServer?: string;
- firstName?: string;
- lastName?: string;
- showContactGivesInline?: boolean;
-}
-
@Component({ components: { QuickNav } })
export default class AccountViewView extends Vue {
$notify!: (notification: Notification, timeout?: number) => void;
@@ -386,8 +386,8 @@ export default class AccountViewView extends Vue {
apiServer = "";
apiServerInput = "";
derivationPath = "";
- firstName = "";
- lastName = "";
+ givenName = "";
+ isRegistered = false;
numAccounts = 0;
publicHex = "";
publicBase64 = "";
@@ -402,8 +402,6 @@ export default class AccountViewView extends Vue {
showPubCopy = false;
showAdvanced = false;
- alertMessage = "";
- alertTitle = "";
public async getIdentity(activeDid: string): Promise
{
try {
@@ -428,7 +426,7 @@ export default class AccountViewView extends Vue {
}
// Return parsed identity or null if not found
- return JSON.parse(account?.identity || "null");
+ return JSON.parse((account?.identity as string) || "null");
}
/**
@@ -509,12 +507,14 @@ export default class AccountViewView extends Vue {
* Initializes component state with values from the database or defaults.
* @param {SettingsType} settings - Object containing settings from the database.
*/
- initializeState(settings: SettingsType | undefined) {
- this.activeDid = settings?.activeDid || "";
- this.apiServer = settings?.apiServer || "";
- this.apiServerInput = settings?.apiServer || "";
- this.firstName = settings?.firstName || "";
- this.lastName = settings?.lastName || "";
+ initializeState(settings: Settings | undefined) {
+ this.activeDid = (settings?.activeDid as string) || "";
+ this.apiServer = (settings?.apiServer as string) || "";
+ this.apiServerInput = (settings?.apiServer as string) || "";
+ this.givenName =
+ (settings?.firstName || "") +
+ (settings?.lastName ? ` ${settings.lastName}` : ""); // pre v 0.1.3
+ this.isRegistered = !!settings?.isRegistered;
this.showContactGives = !!settings?.showContactGivesInline;
}
@@ -531,7 +531,7 @@ export default class AccountViewView extends Vue {
) {
this.publicHex = identity.keys[0].publicKeyHex;
this.publicBase64 = Buffer.from(this.publicHex, "hex").toString("base64");
- this.derivationPath = identity.keys[0].meta.derivationPath;
+ this.derivationPath = identity.keys[0].meta.derivationPath as string;
db.settings.update(MASTER_SETTINGS_KEY, {
activeDid: identity.did,
@@ -701,6 +701,27 @@ export default class AccountViewView extends Vue {
const resp = await this.fetchRateLimits(identity);
if (resp.status === 200) {
this.limits = resp.data;
+ if (!this.isRegistered) {
+ // the user is not known to be registered, but they are so let's record it
+ try {
+ await db.open();
+ db.settings.update(MASTER_SETTINGS_KEY, {
+ isRegistered: true,
+ });
+ this.isRegistered = true;
+ } catch (err) {
+ console.log("Got an error updating settings:", err);
+ this.$notify(
+ {
+ group: "alert",
+ type: "warning",
+ title: "Update Error",
+ text: "Unable to update your settings. Check claim limits again.",
+ },
+ -1,
+ );
+ }
+ }
}
} catch (error) {
this.handleRateLimitsError(error);
@@ -729,8 +750,13 @@ export default class AccountViewView extends Vue {
private handleRateLimitsError(error: unknown) {
if (error instanceof AxiosError) {
const data = error.response?.data as ErrorResponse;
- this.limitsMessage = data?.error?.message || "Bad server response.";
- console.error("Bad response retrieving limits:", error);
+ this.limitsMessage =
+ (data?.error?.message as string) || "Bad server response.";
+ console.log(
+ "Got bad response retrieving limits, which usually means user isn't registered. Server says:",
+ this.limitsMessage,
+ //error,
+ );
} else if (
error instanceof Error &&
error.message ===
diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue
index cd8a9de9d..828a30e13 100644
--- a/src/views/ContactGiftingView.vue
+++ b/src/views/ContactGiftingView.vue
@@ -16,10 +16,6 @@
-
-
-
-
-
-
+
@@ -83,16 +74,10 @@
import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { db, accountsDB } from "@/db/index";
-import { AccountsSchema } from "@/db/tables/accounts";
-import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import { Account, AccountsSchema } from "@/db/tables/accounts";
+import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
-import {
- createAndSubmitGive,
- CreateAndSubmitGiveResult,
- ErrorResult,
- GiverInputInfo,
- GiverOutputInfo,
-} from "@/libs/endorserServer";
+import { GiverInputInfo } from "@/libs/endorserServer";
import { Contact } from "@/db/tables/contacts";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
@@ -124,10 +109,10 @@ export default class ContactGiftingView extends Vue {
public async getIdentity(activeDid: string) {
await accountsDB.open();
- const account = await accountsDB.accounts
+ const account = (await accountsDB.accounts
.where("did")
.equals(activeDid)
- .first();
+ .first()) as Account;
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
@@ -150,7 +135,7 @@ export default class ContactGiftingView extends Vue {
async created() {
try {
await db.open();
- const settings = await db.settings.get(MASTER_SETTINGS_KEY);
+ const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings;
this.apiServer = settings?.apiServer || "";
this.activeDid = settings?.activeDid || "";
this.allContacts = await db.contacts.toArray();
@@ -173,123 +158,5 @@ export default class ContactGiftingView extends Vue {
openDialog(giver: GiverInputInfo) {
(this.$refs.customDialog as GiftedDialog).open(giver);
}
-
- handleDialogResult(result: GiverOutputInfo) {
- if (result.action === "confirm") {
- return new Promise((resolve) => {
- this.recordGive(
- result.giver?.did,
- result.description,
- result.hours,
- ).then(() => {
- resolve(null);
- });
- });
- } else {
- // action was "cancel" so do nothing
- }
- }
-
- /**
- *
- * @param giverDid may be null
- * @param description may be an empty string
- * @param hours may be 0
- */
- public async recordGive(
- giverDid?: string,
- description?: string,
- hours?: number,
- ) {
- if (!this.activeDid) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: "You must select an identity before you can record a give.",
- },
- -1,
- );
- return;
- }
-
- if (!description && !hours) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: "You must enter a description or some number of hours.",
- },
- -1,
- );
- return;
- }
-
- try {
- const identity = await this.getIdentity(this.activeDid);
- const result = await createAndSubmitGive(
- this.axios,
- this.apiServer,
- identity,
- giverDid,
- this.activeDid,
- description,
- hours,
- );
-
- if (this.isGiveCreationError(result)) {
- const errorMessage = this.getGiveCreationErrorMessage(result);
- console.log("Error with give result:", result);
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: errorMessage || "There was an error recording the give.",
- },
- -1,
- );
- } else {
- this.$notify(
- {
- group: "alert",
- type: "success",
- title: "Success",
- text: "That gift was recorded.",
- },
- -1,
- );
- }
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- } catch (error: any) {
- console.log("Error with give caught:", error);
-
- const message =
- error.userMessage ||
- error.response?.data?.error?.message ||
- "There was an error recording the Give.";
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: message,
- },
- -1,
- );
- }
- }
-
- // Helper functions for readability
-
- isGiveCreationError(result: CreateAndSubmitGiveResult) {
- return result.type == "error";
- }
-
- getGiveCreationErrorMessage(result: CreateAndSubmitGiveResult) {
- return (result as ErrorResult).error?.userMessage;
- }
}
diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue
index 282f47281..21a924e5f 100644
--- a/src/views/ContactQRScanShowView.vue
+++ b/src/views/ContactQRScanShowView.vue
@@ -108,7 +108,9 @@ export default class ContactQRScanShow extends Vue {
iat: Date.now(),
iss: this.activeDid,
own: {
- name: (settings?.firstName || "") + " " + (settings?.lastName || ""),
+ name:
+ (settings?.firstName || "") +
+ (settings?.lastName ? ` ${settings.lastName}` : ""), // deprecated, pre v 0.1.3
publicEncKey,
},
};
diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue
index 7c0a81e0b..fc3d33f1e 100644
--- a/src/views/ContactsView.vue
+++ b/src/views/ContactsView.vue
@@ -256,7 +256,7 @@ import { NotificationIface } from "@/constants/app";
import { IIdentifier } from "@veramo/core";
import { accountsDB, db } from "@/db/index";
import { Contact } from "@/db/tables/contacts";
-import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings";
import {
accessToken,
getContactPayloadFromJwtUrl,
@@ -271,6 +271,7 @@ import {
import { Component, Vue } from "vue-facing-decorator";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
+import { Account } from "@/db/tables/accounts";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
@@ -308,7 +309,7 @@ export default class ContactsView extends Vue {
async created() {
await db.open();
- const settings = await db.settings.get(MASTER_SETTINGS_KEY);
+ const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings;
this.activeDid = settings?.activeDid || "";
this.apiServer = settings?.apiServer || "";
@@ -332,7 +333,7 @@ export default class ContactsView extends Vue {
public async getIdentity(activeDid: string) {
await accountsDB.open();
const accounts = await accountsDB.accounts.toArray();
- const account = R.find((acc) => acc.did === activeDid, accounts);
+ const account = R.find((acc) => acc.did === activeDid, accounts) as Account;
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
@@ -394,7 +395,7 @@ export default class ContactsView extends Vue {
{
group: "alert",
type: "danger",
- title: "Error With Server",
+ title: "Server Error",
text:
"Got an error retrieving your " +
(useRecipient ? "given" : "received") +
@@ -453,7 +454,7 @@ export default class ContactsView extends Vue {
{
group: "alert",
type: "danger",
- title: "Error With Server",
+ title: "Server Error",
text: error as string,
},
-1,
@@ -589,6 +590,16 @@ export default class ContactsView extends Vue {
"?",
)
) {
+ this.$notify(
+ {
+ group: "alert",
+ type: "toast",
+ text: "",
+ title: "Registration submitted...",
+ },
+ 1000,
+ );
+
const identity = await this.getIdentity(this.activeDid);
const vcClaim: RegisterVerifiableCredential = {
@@ -671,7 +682,7 @@ export default class ContactsView extends Vue {
{
group: "alert",
type: "danger",
- title: "Error With Server",
+ title: "Server Error",
text: userMessage,
},
-1,
@@ -696,36 +707,30 @@ export default class ContactsView extends Vue {
contact.seesMe = visibility;
db.contacts.update(contact.did, { seesMe: visibility });
} else {
- console.error("Bad response setting visibility: ", resp.data);
- if (resp.data.error?.message) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error With Server",
- text: resp.data.error?.message,
- },
- -1,
- );
- } else {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error With Server",
- text: "Bad server response of " + resp.status,
- },
- -1,
- );
- }
+ console.error(
+ "Got some bad server response when setting visibility: ",
+ resp,
+ );
+ const message =
+ resp.data.error?.message || "Bad server response of " + resp.status;
+ this.$notify(
+ {
+ group: "alert",
+ type: "danger",
+ title: "Server Error",
+ text: message,
+ },
+ -1,
+ );
}
} catch (err) {
+ console.error("Got some server error when setting visibility:", err);
this.$notify(
{
group: "alert",
type: "danger",
- title: "Error With Server",
- text: err as string,
+ title: "Server Error",
+ text: "Check connectivity and try again.",
},
-1,
);
@@ -750,7 +755,7 @@ export default class ContactsView extends Vue {
this.$notify(
{
group: "alert",
- type: "toast",
+ type: "info",
title: "Refreshed",
text:
this.nameForContact(contact, true) +
@@ -758,38 +763,29 @@ export default class ContactsView extends Vue {
(visibility ? "" : "not ") +
"see your activity.",
},
- 5000,
+ -1,
);
} else {
- if (resp.data.error?.message) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error With Server",
- text: resp.data.error?.message,
- },
- -1,
- );
- } else {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error With Server",
- text: "Bad server response of " + resp.status,
- },
- -1,
- );
- }
+ console.log("Got bad server response when checking visibility: ", resp);
+ const message = resp.data.error?.message || "Got bad server response.";
+ this.$notify(
+ {
+ group: "alert",
+ type: "danger",
+ title: "Server Error",
+ text: message,
+ },
+ -1,
+ );
}
} catch (err) {
+ console.log("Caught error from server request to check visibility:", err);
this.$notify(
{
group: "alert",
type: "danger",
- title: "Error With Server",
- text: err as string,
+ title: "Server Error",
+ text: "Check connectivity and try again.",
},
-1,
);
@@ -989,7 +985,7 @@ export default class ContactsView extends Vue {
{
group: "alert",
type: "danger",
- title: "Error With Server",
+ title: "Server Error",
text: userMessage,
},
-1,
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 73a62ed9d..5aaeac624 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -6,64 +6,82 @@
Time Safari
+
-
Record a Gift
-
-
-
-
-
- Anonymous
-
-
-
+ To record others' giving,
+
+ create your identifier.
+
+
+
+ To record others' giving, someone must register your account, so show
+ them
+
+ your identity info
+ and then
+
+ check your limits.
-
-
+
+
+
+
Record a Gift
+
+
+
+
+
+ Anonymous/Unnamed
+
+
+
- {{ contact.name || contact.did }}
-
-
-
+
+
+ {{ contact.name || contact.did }}
+
+
+
+
+
+
+ Show More Contacts…
+
-
-
- Show More Contacts…
-
-
-
-
- (No contacts to show.)
+
+
+ (No contacts to show.)
+
-
-
+
Latest Activity
@@ -99,19 +117,18 @@
import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { db, accountsDB } from "@/db/index";
-import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import {
- createAndSubmitGive,
didInfo,
GiverInputInfo,
- GiverOutputInfo,
GiveServerRecord,
} from "@/libs/endorserServer";
import { Contact } from "@/db/tables/contacts";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { IIdentifier } from "@veramo/core";
+import { Account } from "@/db/tables/accounts";
interface Notification {
group: string;
@@ -135,6 +152,7 @@ export default class HomeView extends Vue {
feedPreviousOldestId?: string;
feedLastViewedId?: string;
isHiddenSpinner = true;
+ isRegistered = false;
numAccounts = 0;
async beforeCreate() {
@@ -144,10 +162,10 @@ export default class HomeView extends Vue {
public async getIdentity(activeDid: string) {
await accountsDB.open();
- const account = await accountsDB.accounts
+ const account = (await accountsDB.accounts
.where("did")
.equals(activeDid)
- .first();
+ .first()) as Account;
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
@@ -174,11 +192,12 @@ export default class HomeView extends Vue {
this.allMyDids = allAccounts.map((acc) => acc.did);
await db.open();
- const settings = await db.settings.get(MASTER_SETTINGS_KEY);
+ const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings;
this.apiServer = settings?.apiServer || "";
this.activeDid = settings?.activeDid || "";
this.allContacts = await db.contacts.toArray();
this.feedLastViewedId = settings?.lastViewedClaimId;
+ this.isRegistered = !!settings?.isRegistered;
this.updateAllFeed();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {
@@ -204,7 +223,9 @@ export default class HomeView extends Vue {
if (this.activeDid) {
await accountsDB.open();
const allAccounts = await accountsDB.accounts.toArray();
- const account = allAccounts.find((acc) => acc.did === this.activeDid);
+ const account = allAccounts.find(
+ (acc) => acc.did === this.activeDid,
+ ) as Account;
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
@@ -333,139 +354,5 @@ export default class HomeView extends Vue {
openDialog(giver: GiverInputInfo) {
(this.$refs.customDialog as GiftedDialog).open(giver);
}
-
- handleDialogResult(result: GiverOutputInfo) {
- if (result.action === "confirm") {
- return new Promise((resolve) => {
- this.recordGive(
- result.giver?.did,
- result.description,
- result.hours,
- ).then(() => {
- resolve(null);
- });
- });
- } else {
- // action was "cancel" so do nothing
- }
- }
-
- /**
- *
- * @param giverDid may be null
- * @param description may be an empty string
- * @param hours may be 0
- */
- public async recordGive(
- giverDid?: string,
- description?: string,
- hours?: number,
- ) {
- if (!this.activeDid) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: "You must select an identity before you can record a give.",
- },
- -1,
- );
- return;
- }
-
- if (!description && !hours) {
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: "You must enter a description or some number of hours.",
- },
- -1,
- );
- return;
- }
-
- try {
- const identity = await this.getIdentity(this.activeDid);
- const result = await createAndSubmitGive(
- this.axios,
- this.apiServer,
- identity,
- giverDid,
- this.activeDid,
- description,
- hours,
- );
-
- if (
- result.type === "error" ||
- this.isGiveCreationError(result.response)
- ) {
- const errorMessage = this.getGiveCreationErrorMessage(result);
- console.log("Error with give creation result:", result);
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: errorMessage || "There was an error creating the give.",
- },
- -1,
- );
- } else {
- this.$notify(
- {
- group: "alert",
- type: "success",
- title: "Success",
- text: "That gift was recorded.",
- },
- -1,
- );
- }
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- } catch (error: any) {
- console.log("Error with give recordation caught:", error);
- const message =
- error.userMessage ||
- error.response?.data?.error?.message ||
- "There was an error recording the give.";
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: message,
- },
- -1,
- );
- }
- }
-
- // Helper functions for readability
-
- /**
- * @param result response "data" from the server
- * @returns true if the result indicates an error
- */
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- isGiveCreationError(result: any) {
- return result.status !== 201 || result.data?.error;
- }
-
- /**
- * @param result direct response eg. ErrorResult or SuccessResult (potentially with embedded "data")
- * @returns best guess at an error message
- */
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- getGiveCreationErrorMessage(result: any) {
- return (
- result.error?.userMessage ||
- result.error?.error ||
- result.response?.data?.error?.message
- );
- }
}
diff --git a/src/views/IdentitySwitcherView.vue b/src/views/IdentitySwitcherView.vue
index f0ed07b61..74d17c3d2 100644
--- a/src/views/IdentitySwitcherView.vue
+++ b/src/views/IdentitySwitcherView.vue
@@ -22,7 +22,7 @@
- {{ firstName }} {{ lastName }}
+ {{ givenName }}
ID: {{ activeDid }}
@@ -71,7 +71,7 @@ import { Component, Vue } from "vue-facing-decorator";
import { AppString } from "@/constants/app";
import { db, accountsDB } from "@/db/index";
import { AccountsSchema } from "@/db/tables/accounts";
-import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings";
import QuickNav from "@/components/QuickNav.vue";
interface Notification {
@@ -90,8 +90,7 @@ export default class IdentitySwitcherView extends Vue {
public activeDid = "";
public apiServer = "";
public apiServerInput = "";
- public firstName = "";
- public lastName = "";
+ public givenName = "";
public otherIdentities: Array<{ did: string }> = [];
public showContactGives = false;
@@ -101,19 +100,20 @@ export default class IdentitySwitcherView extends Vue {
.where("did")
.equals(activeDid)
.first();
- const identity = JSON.parse(account?.identity || "null");
+ const identity = JSON.parse((account?.identity as string) || "null");
return identity;
}
async created() {
try {
await db.open();
- const settings = await db.settings.get(MASTER_SETTINGS_KEY);
+ const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings;
this.activeDid = settings?.activeDid || "";
this.apiServer = settings?.apiServer || "";
this.apiServerInput = settings?.apiServer || "";
- this.firstName = settings?.firstName || "No";
- this.lastName = settings?.lastName || "Name";
+ this.givenName =
+ (settings?.firstName || "") +
+ (settings?.lastName ? ` ${settings.lastName}` : ""); // deprecated, pre v 0.1.3
this.showContactGives = !!settings?.showContactGivesInline;
const identity = await this.getIdentity(this.activeDid);
@@ -151,7 +151,7 @@ export default class IdentitySwitcherView extends Vue {
did = undefined;
}
await db.open();
- db.settings.update(MASTER_SETTINGS_KEY, {
+ await db.settings.update(MASTER_SETTINGS_KEY, {
activeDid: did,
});
this.activeDid = did || "";
diff --git a/src/views/NewEditAccountView.vue b/src/views/NewEditAccountView.vue
index 0fb5a7c62..b41649074 100644
--- a/src/views/NewEditAccountView.vue
+++ b/src/views/NewEditAccountView.vue
@@ -10,21 +10,15 @@
>
- [New/Edit] Identity
+ Edit Identity
-
@@ -50,36 +44,30 @@