2021-03-01 07:01:34 -07:00
extends templates/base.pug
2023-07-13 03:11:33 -06:00
mixin generatePersona(persona, isPrimary)
2021-05-02 04:49:52 -06:00
h2
2023-07-13 03:11:33 -06:00
if persona.email
span.p-email Identity claims (#{persona.email})
else
span.p-email Identity claims
2021-05-02 04:49:52 -06:00
if isPrimary
small.primary primary
2023-07-13 03:11:33 -06:00
if persona.description
span.p-comment ⓘ #{persona.description}
each claim in persona.claims
2021-06-03 07:23:08 -06:00
if claim.matches.length > 0
kx-claim.kx-item(data-claim=claim)
2021-06-09 05:58:36 -06:00
details(aria-label="Claim")
2021-06-03 07:23:08 -06:00
summary
.info
2023-07-13 03:11:33 -06:00
p.subtitle= claim.display.serviceproviderName
p.title= claim.display.name
2021-06-03 07:23:08 -06:00
.icons
.verificationStatus(data-value='running')
.inProgress
.content
.subsection
img(src='/static/img/link.png')
div
2023-07-13 03:11:33 -06:00
if (claim.display.url)
2021-06-03 07:23:08 -06:00
p Profile link:
2023-07-13 03:11:33 -06:00
a(rel='me' href=claim.display.url aria-label="Link to profile")= claim.display.url
2021-06-03 07:23:08 -06:00
else
p Profile link: not accessible from browser
2023-07-13 03:11:33 -06:00
if (claim.matches.length === 1 && claim.matches[0].proof.uri)
2021-06-03 07:23:08 -06:00
p Proof link:
2022-04-08 10:22:54 -06:00
a(href=claim.matches[0].proof.uri aria-label="Link to proof")= claim.matches[0].proof.uri
2021-06-03 07:23:08 -06:00
else
p Proof link: not accessible from browser
2021-03-30 08:22:03 -06:00
2021-03-01 07:01:34 -07:00
block content
2021-05-03 02:46:22 -06:00
script.
kx = {
2023-07-13 03:11:33 -06:00
publicKey: !{JSON.stringify(data.publicKey)}
2021-05-03 02:46:22 -06:00
}
2022-10-11 07:19:14 -06:00
if (data && 'errors' in data && data.errors.length > 0)
section
h2 Something went wrong while viewing the profile
.card
if data.errors.length === 1
p The following error was reported:
else
p The following errors were reported:
ul
each error in data.errors
li
p= error
p Please see the
a(href="https://docs.keyoxide.org/getting-started/something-went-wrong/") documentation
| for help.
else
section.profile.narrow.h-card
noscript
p Keyoxide requires JavaScript to function.
2021-03-01 07:01:34 -07:00
2023-03-01 10:20:45 -07:00
if (enable_message_encryption)
dialog#dialog--encryptMessage
div
form(method='post')
label(for="encryptionInput") Message to encrypt
textarea#encryptionInput.input(name='message')
input.no-margin(type='submit' name='submit' value='ENCRYPT MESSAGE')
br
br
label(for="encryptionOutput") Encryption result
textarea#encryptionOutput.output(name='message' placeholder='Waiting for input' readonly)
form(method="dialog")
input(type="submit" value="Close")
2021-04-05 07:51:43 -06:00
2023-03-01 10:20:45 -07:00
if (enable_signature_verification)
dialog#dialog--verifySignature
div
form(method='post')
2023-07-13 03:11:33 -06:00
label(for="sigVerInput") Signature name
2023-03-01 10:20:45 -07:00
textarea#sigVerOutput.output(name='message' placeholder='Waiting for input' readonly)
form(method="dialog")
input(type="submit" value="Close")
2021-04-05 07:51:43 -06:00
2022-10-11 07:19:14 -06:00
dialog#dialog--qr
div
canvas#qr
p
a(href="" tabindex="0")#qr--altLink
form(method="dialog")
input(type="submit" value="Close")
2021-05-03 03:48:48 -06:00
2022-10-11 07:19:14 -06:00
if (isSignature)
#profileSigInput.form-wrapper.card
h2 Signature profile
form#formGenerateSignatureProfile(method='post')
label(for="signature") Please enter the raw profile signature below and press "Generate profile".
textarea#signature(name='signature')= signature
input(type='submit', name='submit', value='Generate profile')
2021-05-02 04:49:52 -06:00
2021-05-03 09:09:10 -06:00
unless (isSignature && !signature)
2021-05-04 02:01:04 -06:00
#profileHeader.card.card--transparent.card--profileHeader
2023-07-13 03:11:33 -06:00
img#profileAvatar.u-logo(src=data.personas[data.primaryPersonaIndex].avatarUrl alt="avatar")
2021-05-02 04:49:52 -06:00
2023-07-13 03:11:33 -06:00
p#profileName.p-name= data.personas[data.primaryPersonaIndex].name
2023-03-01 10:20:45 -07:00
if (enable_message_encryption || enable_signature_verification)
.button-wrapper
if (enable_message_encryption)
button(onClick="document.querySelector('#dialog--encryptMessage').showModal();") Encrypt message
if (enable_signature_verification)
button(onClick="document.querySelector('#dialog--verifySignature').showModal();") Verify signature
2021-05-03 09:09:10 -06:00
2023-07-13 03:11:33 -06:00
+generatePersona(data.personas[data.primaryPersonaIndex], true && data.personas.length > 1)
each persona, index in data.personas
unless index == data.primaryPersonaIndex
+generatePersona(persona, false)
2023-03-01 10:22:37 -07:00
2021-05-04 02:01:04 -06:00
#profileProofs.card.card--transparent
2021-05-03 09:09:10 -06:00
h2 Key
2023-07-13 03:11:33 -06:00
kx-key.kx-item(data-keydata=data.publicKey)
2021-06-09 05:58:36 -06:00
details(aria-label="Key")
2021-05-04 05:57:33 -06:00
summary
.info
2023-07-13 03:11:33 -06:00
p.subtitle= data.publicKey.fetch.method
p.title= data.identifier
2021-05-04 05:57:33 -06:00
.content
.subsection
img(src='/static/img/link.png')
div
p Key link:
2023-07-13 03:11:33 -06:00
a.u-key(href=data.publicKey.fetch.resolvedUrl rel="pgpkey" aria-label="Link to cryptographic key")= data.publicKey.fetch.resolvedUrl
2021-05-04 05:57:33 -06:00
hr
2023-07-13 03:11:33 -06:00
if (data.profileType === 'openpgp')
.subsection
img(src='/static/img/qrcode.png')
div
button(onClick=`showQR('${data.publicKey.fingerprint}', 'fingerprint')` aria-label='Show QR code for cryptographic fingerprint') Show OpenPGP fingerprint QR