remove lastName and just have a single name field

This commit is contained in:
2023-11-05 16:34:18 -07:00
parent 6d4d4e40c3
commit c388cc8cfe
7 changed files with 35 additions and 46 deletions

View File

@@ -52,7 +52,7 @@
<!-- Identity Details -->
<div class="bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4">
<h2 class="text-xl font-semibold mb-2">{{ firstName }} {{ lastName }}</h2>
<h2 class="text-xl font-semibold mb-2">{{ givenName }}</h2>
<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">
@@ -372,7 +372,7 @@ interface SettingsType {
activeDid?: string;
apiServer?: string;
firstName?: string;
lastName?: string;
lastName?: string; // deprecated, pre v 0.1.3
showContactGivesInline?: boolean;
}
@@ -386,8 +386,7 @@ export default class AccountViewView extends Vue {
apiServer = "";
apiServerInput = "";
derivationPath = "";
firstName = "";
lastName = "";
givenName = "";
numAccounts = 0;
publicHex = "";
publicBase64 = "";
@@ -510,11 +509,12 @@ export default class AccountViewView extends Vue {
* @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 || "";
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.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,