2021-03-01 07:01:34 -07:00
|
|
|
extends templates/base.pug
|
|
|
|
|
2021-05-02 04:49:52 -06:00
|
|
|
mixin generateUser(user, isPrimary)
|
|
|
|
h2
|
|
|
|
| #{user.userData.email}
|
|
|
|
if isPrimary
|
|
|
|
small.primary primary
|
|
|
|
each claim in user.claims
|
2021-06-03 07:23:08 -06:00
|
|
|
if claim.matches.length > 0
|
|
|
|
kx-claim.kx-item(data-claim=claim)
|
|
|
|
details
|
|
|
|
summary
|
|
|
|
.info
|
|
|
|
p.subtitle= claim.matches[0].serviceprovider.name
|
|
|
|
p.title= claim.matches[0].profile.display
|
|
|
|
.icons
|
|
|
|
.verificationStatus(data-value='running')
|
|
|
|
.inProgress
|
|
|
|
.content
|
|
|
|
.subsection
|
|
|
|
img(src='/static/img/link.png')
|
|
|
|
div
|
|
|
|
if (claim.matches[0].profile.uri)
|
|
|
|
p Profile link:
|
|
|
|
a(rel='me' href=claim.matches[0].profile.uri)= claim.matches[0].profile.uri
|
|
|
|
else
|
|
|
|
p Profile link: not accessible from browser
|
|
|
|
if (claim.matches[0].proof.uri)
|
|
|
|
p Proof link:
|
|
|
|
a(rel='me' href=claim.matches[0].proof.uri)= claim.matches[0].proof.uri
|
|
|
|
else
|
|
|
|
p Proof link: not accessible from browser
|
2021-05-04 05:57:33 -06:00
|
|
|
|
2021-03-01 07:01:34 -07:00
|
|
|
block js
|
2021-05-03 03:48:48 -06:00
|
|
|
script(type='application/javascript' src='/static/qrcode.min.js' charset='utf-8')
|
2021-05-02 04:49:52 -06:00
|
|
|
script(type='application/javascript' src='/static/dialog-polyfill.js' charset='utf-8')
|
2021-03-01 07:01:34 -07:00
|
|
|
script(type='application/javascript' src='/static/openpgp.min.js' charset='utf-8')
|
2021-05-03 03:48:48 -06:00
|
|
|
script(type='application/javascript' src='/static/doip.min.js' charset='utf-8')
|
2021-05-02 04:49:52 -06:00
|
|
|
script(type='application/javascript' src='/static/kx-claim.js' charset='utf-8')
|
|
|
|
script(type='application/javascript' src='/static/kx-key.js' charset='utf-8')
|
2021-03-01 07:01:34 -07:00
|
|
|
script(type='application/javascript' src='/static/scripts.js' charset='utf-8')
|
|
|
|
|
2021-03-30 08:22:03 -06:00
|
|
|
block css
|
|
|
|
link(rel='stylesheet' href='/static/dialog-polyfill.css')
|
|
|
|
|
2021-03-01 07:01:34 -07:00
|
|
|
block content
|
2021-05-03 02:46:22 -06:00
|
|
|
script.
|
|
|
|
kx = {
|
|
|
|
key: {
|
2021-05-03 09:09:10 -06:00
|
|
|
url: "!{data && data.key && data.key.fetchURL ? data.key.fetchURL : null}",
|
2021-05-03 02:46:22 -06:00
|
|
|
object: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-29 09:08:48 -06:00
|
|
|
section.profile.narrow
|
2021-01-10 07:11:44 -07:00
|
|
|
noscript
|
|
|
|
p Keyoxide requires JavaScript to function.
|
2021-03-01 07:01:34 -07:00
|
|
|
|
2021-04-05 07:51:43 -06:00
|
|
|
dialog#dialog--encryptMessage
|
|
|
|
div
|
|
|
|
form(method='post')
|
|
|
|
textarea.input(name='message' placeholder='Message')
|
2021-05-04 02:01:04 -06:00
|
|
|
input.no-margin(type='submit' name='submit' value='ENCRYPT MESSAGE')
|
2021-04-05 07:51:43 -06:00
|
|
|
textarea.output(name='message' placeholder='Waiting for input' readonly)
|
|
|
|
form(method="dialog")
|
|
|
|
input(type="submit" value="Close")
|
|
|
|
|
|
|
|
dialog#dialog--verifySignature
|
|
|
|
div
|
|
|
|
form(method='post')
|
|
|
|
textarea.input(name='signature' placeholder='Signature')
|
2021-05-04 02:01:04 -06:00
|
|
|
input.no-margin(type='submit' name='submit' value='VERIFY SIGNATURE')
|
2021-04-05 07:51:43 -06:00
|
|
|
textarea.output(name='message' placeholder='Waiting for input' readonly)
|
|
|
|
form(method="dialog")
|
|
|
|
input(type="submit" value="Close")
|
|
|
|
|
2021-05-03 03:48:48 -06:00
|
|
|
dialog#dialog--qr
|
|
|
|
div
|
|
|
|
canvas#qr
|
|
|
|
p
|
|
|
|
a#qr--altLink
|
|
|
|
|
2021-05-03 09:09:10 -06:00
|
|
|
if (isSignature)
|
2021-05-04 02:01:04 -06:00
|
|
|
#profileSigInput.form-wrapper.card
|
|
|
|
h2 Signature profile
|
2021-05-03 09:09:10 -06:00
|
|
|
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-03-01 07:01:34 -07:00
|
|
|
|
2021-05-03 09:09:10 -06:00
|
|
|
if (data && 'errors' in data && data.errors.length > 0)
|
|
|
|
h2 Something went wrong while generating the profile
|
|
|
|
ul
|
|
|
|
each error in data.errors
|
|
|
|
li= error
|
|
|
|
else
|
|
|
|
unless (isSignature && !signature)
|
2021-05-04 02:01:04 -06:00
|
|
|
#profileHeader.card.card--transparent.card--profileHeader
|
2021-05-04 07:54:32 -06:00
|
|
|
img#profileAvatar(src=data.extra.avatarURL alt="avatar")
|
2021-05-02 04:49:52 -06:00
|
|
|
|
2021-05-03 09:09:10 -06:00
|
|
|
p#profileName= data.keyData.users[data.keyData.primaryUserIndex].userData.name
|
2021-05-04 02:01:04 -06:00
|
|
|
.button-wrapper
|
2021-05-03 09:09:10 -06:00
|
|
|
button(onClick="document.querySelector('#dialog--encryptMessage').showModal();") Encrypt message
|
|
|
|
button(onClick="document.querySelector('#dialog--verifySignature').showModal();") Verify signature
|
|
|
|
|
2021-05-04 02:01:04 -06:00
|
|
|
#profileProofs.card.card--transparent
|
2021-05-03 09:09:10 -06:00
|
|
|
h2 Key
|
2021-05-04 05:57:33 -06:00
|
|
|
kx-key.kx-item(data-keydata=data.keyData)
|
|
|
|
details
|
|
|
|
summary
|
|
|
|
.info
|
|
|
|
p.subtitle= data.keyData.key.fetchMethod
|
|
|
|
p.title= data.keyData.fingerprint
|
|
|
|
.content
|
|
|
|
.subsection
|
|
|
|
img(src='/static/img/link.png')
|
|
|
|
div
|
|
|
|
p Key link:
|
|
|
|
a(href=data.keyData.key.uri)= data.keyData.key.uri
|
|
|
|
hr
|
|
|
|
.subsection
|
|
|
|
img(src='/static/img/qrcode.png')
|
|
|
|
div
|
|
|
|
button(onClick=`showQR('${data.keyData.fingerprint}', 'fingerprint')`) Show OpenPGP fingerprint QR
|
2021-05-03 09:09:10 -06:00
|
|
|
|
|
|
|
+generateUser(data.keyData.users[data.keyData.primaryUserIndex], true)
|
|
|
|
each user, index in data.keyData.users
|
|
|
|
unless index == data.keyData.primaryUserIndex
|
|
|
|
+generateUser(user, false)
|