mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Distinguish primary email address from additional email addresses
This commit is contained in:
parent
65858f0c0c
commit
5748c57947
2 changed files with 10 additions and 1 deletions
|
@ -235,6 +235,7 @@ async function displayProfile(opts) {
|
||||||
}
|
}
|
||||||
let userData = keyData.user.user.userId;
|
let userData = keyData.user.user.userId;
|
||||||
let userName = userData.name ? userData.name : userData.email;
|
let userName = userData.name ? userData.name : userData.email;
|
||||||
|
let userMail = userData.email ? userData.email : null;
|
||||||
|
|
||||||
// Determine WKD or HKP link
|
// Determine WKD or HKP link
|
||||||
switch (opts.mode) {
|
switch (opts.mode) {
|
||||||
|
@ -290,8 +291,14 @@ async function displayProfile(opts) {
|
||||||
feedback += `<div class="profileDataItem__label"></div>`;
|
feedback += `<div class="profileDataItem__label"></div>`;
|
||||||
feedback += `<div class="profileDataItem__value">general information</div>`;
|
feedback += `<div class="profileDataItem__value">general information</div>`;
|
||||||
feedback += `</div>`;
|
feedback += `</div>`;
|
||||||
|
if (userMail) {
|
||||||
|
feedback += `<div class="profileDataItem">`;
|
||||||
|
feedback += `<div class="profileDataItem__label">primary email</div>`;
|
||||||
|
feedback += `<div class="profileDataItem__value"><a href="mailto:${userMail}">${userMail}</a></div>`;
|
||||||
|
feedback += `</div>`;
|
||||||
|
}
|
||||||
for (var i = 0; i < keyData.publicKey.users.length; i++) {
|
for (var i = 0; i < keyData.publicKey.users.length; i++) {
|
||||||
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId && keyData.publicKey.users[i].userId.email && keyData.publicKey.users[i].revocationSignatures.length == 0) {
|
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId && keyData.publicKey.users[i].userId.email && keyData.publicKey.users[i].revocationSignatures.length == 0 && keyData.publicKey.users[i].userId.email != userMail) {
|
||||||
feedback += `<div class="profileDataItem">`;
|
feedback += `<div class="profileDataItem">`;
|
||||||
feedback += `<div class="profileDataItem__label">email</div>`;
|
feedback += `<div class="profileDataItem__label">email</div>`;
|
||||||
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
||||||
|
|
|
@ -273,6 +273,8 @@ select {
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
max-width: 20%;
|
max-width: 20%;
|
||||||
|
font-size: 0.9em;
|
||||||
|
line-height: 1.6em;
|
||||||
color: #777;
|
color: #777;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
Loading…
Reference in a new issue