|
@ -9,24 +9,11 @@ |
|
|
Your Identity |
|
|
Your Identity |
|
|
</h1> |
|
|
</h1> |
|
|
|
|
|
|
|
|
<div class="flex justify-between mb-2 mt-4"> |
|
|
|
|
|
<span /> |
|
|
|
|
|
<span class="whitespace-nowrap"> |
|
|
|
|
|
<router-link |
|
|
|
|
|
:to="{ name: 'contact-qr' }" |
|
|
|
|
|
class="text-xs bg-slate-500 text-white px-1.5 py-1 rounded-md" |
|
|
|
|
|
> |
|
|
|
|
|
<fa icon="qrcode" class="fa-fw"></fa> |
|
|
|
|
|
</router-link> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- ID notice --> |
|
|
<!-- ID notice --> |
|
|
<div |
|
|
<div |
|
|
v-if="!activeDid" |
|
|
v-if="!activeDid" |
|
|
id="noticeBeforeShare" |
|
|
id="noticeBeforeShare" |
|
|
class="bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mb-4" |
|
|
class="bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4" |
|
|
> |
|
|
> |
|
|
<p class="mb-4"> |
|
|
<p class="mb-4"> |
|
|
<b>Note:</b> Before you can share with others or take any action, you |
|
|
<b>Note:</b> Before you can share with others or take any action, you |
|
@ -43,10 +30,18 @@ |
|
|
<!-- Identity Details --> |
|
|
<!-- Identity Details --> |
|
|
<div |
|
|
<div |
|
|
id="sectionIdentityDetails" |
|
|
id="sectionIdentityDetails" |
|
|
class="bg-slate-100 rounded-md overflow-hidden px-4 py-3 mb-4" |
|
|
class="bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4" |
|
|
> |
|
|
> |
|
|
<div v-if="givenName"> |
|
|
<div v-if="givenName"> |
|
|
<h2 class="text-xl font-semibold mb-2"> |
|
|
<h2 class="text-xl font-semibold mb-2"> |
|
|
|
|
|
<span class="whitespace-nowrap"> |
|
|
|
|
|
<router-link |
|
|
|
|
|
:to="{ name: 'contact-qr' }" |
|
|
|
|
|
class="bg-slate-500 text-white px-1.5 py-1 rounded-md" |
|
|
|
|
|
> |
|
|
|
|
|
<fa icon="qrcode" class="fa-fw text-xl"></fa> |
|
|
|
|
|
</router-link> |
|
|
|
|
|
</span> |
|
|
{{ givenName }} |
|
|
{{ givenName }} |
|
|
<router-link :to="{ name: 'new-edit-account' }"> |
|
|
<router-link :to="{ name: 'new-edit-account' }"> |
|
|
<fa icon="pen" class="text-xs text-blue-500 ml-2 mb-1"></fa> |
|
|
<fa icon="pen" class="text-xs text-blue-500 ml-2 mb-1"></fa> |
|
@ -160,7 +155,7 @@ |
|
|
<div |
|
|
<div |
|
|
v-if="!loadingLimits && !endorserLimits?.nextWeekBeginDateTime" |
|
|
v-if="!loadingLimits && !endorserLimits?.nextWeekBeginDateTime" |
|
|
id="noticeBeforeAnnounce" |
|
|
id="noticeBeforeAnnounce" |
|
|
class="bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mb-4" |
|
|
class="bg-amber-200 text-amber-900 border-amber-500 border-dashed border text-center rounded-md overflow-hidden px-4 py-3 mt-4" |
|
|
> |
|
|
> |
|
|
<p class="mb-4"> |
|
|
<p class="mb-4"> |
|
|
<b>Note:</b> Before you can publicly announce a new project or time |
|
|
<b>Note:</b> Before you can publicly announce a new project or time |
|
@ -312,7 +307,7 @@ |
|
|
> |
|
|
> |
|
|
If no download happened yet, click again here to download now. |
|
|
If no download happened yet, click again here to download now. |
|
|
</a> |
|
|
</a> |
|
|
<div> |
|
|
<div class="mt-4"> |
|
|
<p> |
|
|
<p> |
|
|
After the download, you can save the file in your preferred storage |
|
|
After the download, you can save the file in your preferred storage |
|
|
location. |
|
|
location. |
|
@ -731,13 +726,17 @@ import { |
|
|
IMAGE_TYPE_PROFILE, |
|
|
IMAGE_TYPE_PROFILE, |
|
|
NotificationIface, |
|
|
NotificationIface, |
|
|
} from "@/constants/app"; |
|
|
} from "@/constants/app"; |
|
|
import { db, accountsDB } from "@/db/index"; |
|
|
import { |
|
|
|
|
|
db, |
|
|
|
|
|
accountsDB, |
|
|
|
|
|
retrieveSettingsForActiveAccount, |
|
|
|
|
|
updateAccountSettings, |
|
|
|
|
|
} from "@/db/index"; |
|
|
import { Account } from "@/db/tables/accounts"; |
|
|
import { Account } from "@/db/tables/accounts"; |
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { |
|
|
import { |
|
|
DEFAULT_PASSKEY_EXPIRATION_MINUTES, |
|
|
DEFAULT_PASSKEY_EXPIRATION_MINUTES, |
|
|
MASTER_SETTINGS_KEY, |
|
|
MASTER_SETTINGS_KEY, |
|
|
Settings, |
|
|
|
|
|
} from "@/db/tables/settings"; |
|
|
} from "@/db/tables/settings"; |
|
|
import { |
|
|
import { |
|
|
clearPasskeyToken, |
|
|
clearPasskeyToken, |
|
@ -865,31 +864,29 @@ export default class AccountViewView extends Vue { |
|
|
*/ |
|
|
*/ |
|
|
async initializeState() { |
|
|
async initializeState() { |
|
|
await db.open(); |
|
|
await db.open(); |
|
|
const settings: Settings | undefined = |
|
|
const settings = await retrieveSettingsForActiveAccount(); |
|
|
await db.settings.get(MASTER_SETTINGS_KEY); |
|
|
|
|
|
|
|
|
|
|
|
this.activeDid = (settings?.activeDid as string) || ""; |
|
|
this.activeDid = settings.activeDid || ""; |
|
|
this.apiServer = (settings?.apiServer as string) || ""; |
|
|
this.apiServer = settings.apiServer || ""; |
|
|
this.apiServerInput = (settings?.apiServer as string) || ""; |
|
|
this.apiServerInput = settings.apiServer || ""; |
|
|
this.givenName = |
|
|
this.givenName = |
|
|
(settings?.firstName || "") + |
|
|
(settings?.firstName || "") + |
|
|
(settings?.lastName ? ` ${settings.lastName}` : ""); // pre v 0.1.3 |
|
|
(settings?.lastName ? ` ${settings.lastName}` : ""); // pre v 0.1.3 |
|
|
this.isRegistered = !!settings?.isRegistered; |
|
|
this.isRegistered = !!settings?.isRegistered; |
|
|
this.imageServer = (settings?.imageServer as string) || ""; |
|
|
this.imageServer = settings.imageServer || ""; |
|
|
this.profileImageUrl = settings?.profileImageUrl as string; |
|
|
this.profileImageUrl = settings.profileImageUrl; |
|
|
this.showContactGives = !!settings?.showContactGivesInline; |
|
|
this.showContactGives = !!settings.showContactGivesInline; |
|
|
this.hideRegisterPromptOnNewContact = |
|
|
this.hideRegisterPromptOnNewContact = |
|
|
!!settings?.hideRegisterPromptOnNewContact; |
|
|
!!settings.hideRegisterPromptOnNewContact; |
|
|
this.passkeyExpirationMinutes = |
|
|
this.passkeyExpirationMinutes = |
|
|
(settings?.passkeyExpirationMinutes as number) ?? |
|
|
settings.passkeyExpirationMinutes ?? DEFAULT_PASSKEY_EXPIRATION_MINUTES; |
|
|
DEFAULT_PASSKEY_EXPIRATION_MINUTES; |
|
|
|
|
|
this.previousPasskeyExpirationMinutes = this.passkeyExpirationMinutes; |
|
|
this.previousPasskeyExpirationMinutes = this.passkeyExpirationMinutes; |
|
|
this.showGeneralAdvanced = !!settings?.showGeneralAdvanced; |
|
|
this.showGeneralAdvanced = !!settings.showGeneralAdvanced; |
|
|
this.showShortcutBvc = !!settings?.showShortcutBvc; |
|
|
this.showShortcutBvc = !!settings.showShortcutBvc; |
|
|
this.warnIfProdServer = !!settings?.warnIfProdServer; |
|
|
this.warnIfProdServer = !!settings.warnIfProdServer; |
|
|
this.warnIfTestServer = !!settings?.warnIfTestServer; |
|
|
this.warnIfTestServer = !!settings.warnIfTestServer; |
|
|
this.webPushServer = (settings?.webPushServer as string) || ""; |
|
|
this.webPushServer = settings.webPushServer || ""; |
|
|
this.webPushServerInput = (settings?.webPushServer as string) || ""; |
|
|
this.webPushServerInput = settings.webPushServer || ""; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// call fn, copy text to the clipboard, then redo fn after 2 seconds |
|
|
// call fn, copy text to the clipboard, then redo fn after 2 seconds |
|
@ -1264,10 +1261,7 @@ export default class AccountViewView extends Vue { |
|
|
if (!this.isRegistered) { |
|
|
if (!this.isRegistered) { |
|
|
// the user was not known to be registered, but now they are (because we got no error) so let's record it |
|
|
// the user was not known to be registered, but now they are (because we got no error) so let's record it |
|
|
try { |
|
|
try { |
|
|
await db.open(); |
|
|
await updateAccountSettings(did, { isRegistered: true }); |
|
|
await db.settings.update(MASTER_SETTINGS_KEY, { |
|
|
|
|
|
isRegistered: true, |
|
|
|
|
|
}); |
|
|
|
|
|
this.isRegistered = true; |
|
|
this.isRegistered = true; |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
console.error("Got an error updating settings:", err); |
|
|
console.error("Got an error updating settings:", err); |
|
@ -1478,8 +1472,7 @@ export default class AccountViewView extends Vue { |
|
|
if ((error as any).response.status === 404) { |
|
|
if ((error as any).response.status === 404) { |
|
|
console.error("The image was already deleted:", error); |
|
|
console.error("The image was already deleted:", error); |
|
|
|
|
|
|
|
|
await db.open(); |
|
|
await updateAccountSettings(this.activeDid, { |
|
|
await db.settings.update(MASTER_SETTINGS_KEY, { |
|
|
|
|
|
profileImageUrl: undefined, |
|
|
profileImageUrl: undefined, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|