2021-03-01 07:01:34 -07:00
|
|
|
extends templates/base.pug
|
|
|
|
|
2023-07-13 03:11:33 -06:00
|
|
|
mixin generatePersona(persona, isPrimary)
|
2023-09-20 00:32:50 -06:00
|
|
|
if persona.claims.length > 0
|
|
|
|
h2
|
|
|
|
if persona.email
|
|
|
|
| Identity claims (
|
|
|
|
span.p-email #{persona.email}
|
|
|
|
| )
|
|
|
|
else
|
|
|
|
| Identity claims
|
|
|
|
if isPrimary
|
|
|
|
small.primary primary
|
|
|
|
if persona.description
|
|
|
|
span.persona__description.p-comment
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
|
|
|
|
| #{persona.description}
|
|
|
|
each claim in persona.claims
|
|
|
|
if claim.matches.length > 0
|
|
|
|
kx-claim.kx-item(data-claim=claim,data-status='running')
|
|
|
|
details(aria-label="Claim")
|
|
|
|
summary
|
|
|
|
.info
|
2023-09-25 09:13:06 -06:00
|
|
|
img(src=`https://design.keyoxide.org/brands/service-providers/_/icon.svg` onerror="this.src='https://design.keyoxide.org/brands/service-providers/_/icon.svg'")
|
2023-09-20 00:32:50 -06:00
|
|
|
p
|
2023-10-04 02:06:21 -06:00
|
|
|
span.title= claim.display.profileName
|
2023-09-20 00:32:50 -06:00
|
|
|
span.subtitle-wrapper
|
|
|
|
| [
|
|
|
|
span.subtitle= claim.display.serviceproviderName
|
|
|
|
| ]
|
|
|
|
.icons
|
|
|
|
.verificationStatus
|
|
|
|
.inProgress
|
|
|
|
<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"></path></svg>
|
|
|
|
.success
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
|
|
.failure
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
2023-09-15 06:25:15 -06:00
|
|
|
|
2023-09-20 00:32:50 -06:00
|
|
|
.content
|
|
|
|
.subsection
|
|
|
|
img(src='/static/img/link.png')
|
|
|
|
div
|
|
|
|
p Claim link:
|
|
|
|
a(rel="me" href=claim.uri aria-label="Link to claim")= claim.uri
|
2021-03-30 08:22:03 -06:00
|
|
|
|
2021-03-01 07:01:34 -07:00
|
|
|
block content
|
2023-09-14 03:55:45 -06:00
|
|
|
if (data && 'publicKey' in data)
|
|
|
|
script.
|
|
|
|
kx = {
|
|
|
|
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
|
2023-09-15 06:25:15 -06:00
|
|
|
section.profile
|
2022-10-11 07:19:14 -06:00
|
|
|
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)
|
2023-09-15 06:25:15 -06:00
|
|
|
.profile__header
|
|
|
|
img.profile__avatar.u-logo(src=data.personas[data.primaryPersonaIndex].avatarUrl alt="avatar")
|
2021-05-02 04:49:52 -06:00
|
|
|
|
2023-09-15 06:25:15 -06:00
|
|
|
p.profile__name.p-name= data.personas[data.primaryPersonaIndex].name
|
|
|
|
if (data.personas[data.primaryPersonaIndex].description)
|
|
|
|
p= data.personas[data.primaryPersonaIndex].description
|
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-09-15 06:25:15 -06:00
|
|
|
.profile__claims
|
|
|
|
+generatePersona(data.personas[data.primaryPersonaIndex], true && data.personas.length > 1)
|
|
|
|
each persona, index in data.personas
|
|
|
|
unless index == data.primaryPersonaIndex
|
|
|
|
+generatePersona(persona, false)
|
2023-10-04 02:06:21 -06:00
|
|
|
h2 Profile
|
|
|
|
button(onClick=`showQR('${data.identifier}', 'profile_identifier')` aria-label='Show profile ID QR') Profile ID QR
|
2023-03-01 10:22:37 -07:00
|
|
|
|
2023-09-15 06:25:15 -06:00
|
|
|
section
|
|
|
|
h2 Profile information
|
2023-09-17 06:21:21 -06:00
|
|
|
if (data && data.publicKey)
|
|
|
|
h3 Public key
|
|
|
|
kx-key.kx-item(data-keydata=data.publicKey)
|
|
|
|
details(aria-label="Key")
|
|
|
|
summary
|
|
|
|
.info
|
|
|
|
p
|
|
|
|
span.title= data.identifier
|
|
|
|
span.subtitle-wrapper
|
|
|
|
| [
|
|
|
|
span.subtitle= data.publicKey.fetch.method
|
|
|
|
| ]
|
|
|
|
.content
|
2023-09-15 06:25:15 -06:00
|
|
|
.subsection
|
2023-09-17 06:21:21 -06:00
|
|
|
img(src='/static/img/link.png')
|
2023-09-15 06:25:15 -06:00
|
|
|
div
|
2023-09-17 06:21:21 -06:00
|
|
|
p Key link:
|
|
|
|
a.u-key(href=data.publicKey.fetch.resolvedUrl rel="pgpkey" aria-label="Link to cryptographic key")= data.publicKey.fetch.resolvedUrl
|