From 30a88560cc827df053e50135738bc40db7cc59ed Mon Sep 17 00:00:00 2001 From: KiddyTheKid Date: Fri, 25 Dec 2020 21:38:41 -0500 Subject: [PATCH 1/3] Modified CSS and Add a function to detect lettered services names. --- static/scripts.js | 24 ++++++++++++++++-------- static/styles.css | 24 ++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/static/scripts.js b/static/scripts.js index 0dfc93f..4ba4ae2 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -309,7 +309,7 @@ async function displayProfile(opts) { // Generate feedback feedback += `
`; feedback += `
`; - feedback += `
general information
`; + feedback += `
General information
`; feedback += `
`; feedback += `
`; @@ -328,15 +328,15 @@ async function displayProfile(opts) { feedback += `
`; feedback += `
`; feedback += `
`; - feedback += `
actions
`; + feedback += `
Actions
`; feedback += `
`; feedback += `
`; feedback += `
`; - feedback += ``; + feedback += ``; feedback += `
`; feedback += `
`; feedback += `
`; - feedback += ``; + feedback += ``; feedback += `
`; // Display feedback @@ -362,7 +362,7 @@ async function displayProfile(opts) { feedback = ""; if (userMail) { verifications.forEach((userId, i) => { - if (keyData.users[i].userId.email != userMail) { + if (keyData.users[i].userId.email !== userMail) { return; } @@ -372,7 +372,7 @@ async function displayProfile(opts) { feedback += `
${keyData.users[i].userId.email} (primary)
`; feedback += ``; - if (userId.length == 0) { + if (userId.length === 0) { feedback += `
`; feedback += `
`; feedback += `
No claims associated
`; @@ -391,7 +391,7 @@ async function displayProfile(opts) { return; } feedback += `
`; - feedback += `
${claimData.serviceprovider.name}
`; + feedback += `
${capitalizeLetteredServices(claimData.serviceprovider.name)}
`; feedback += `
`; feedback += `${claimData.profile.display}`; if (claim.isVerified) { @@ -443,7 +443,7 @@ async function displayProfile(opts) { return; } feedback += `
`; - feedback += `
${claimData.serviceprovider.name}
`; + feedback += `
${capitalizeLetteredServices(claimData.serviceprovider.name)}
`; feedback += `
`; feedback += `${claimData.profile.display}`; if (claim.isVerified) { @@ -1334,3 +1334,11 @@ if (elUtilProfileURL) { elInput.dispatchEvent(new Event("input")); } + +function capitalizeLetteredServices(serviceName) { + var servName = serviceName.toLowerCase(); + if (servName === 'dns' || servName === 'xmpp') { + return servName.toUpperCase(); + } + return serviceName; +} \ No newline at end of file diff --git a/static/styles.css b/static/styles.css index 45fb0f4..de58c77 100644 --- a/static/styles.css +++ b/static/styles.css @@ -75,7 +75,8 @@ footer a { color: #777; } .container { - max-width: 720px; + /*max-width: 720px;*/ + max-width: 770px; width: 100%; margin: 0 auto; } @@ -279,6 +280,9 @@ select { flex-direction: row; align-items: center; margin-bottom: 32px; + background-color: #c4e3f657; + padding: 15px; + border-radius: 15px; } #profileAvatar { width: 100%; @@ -295,6 +299,12 @@ select { overflow: hidden; text-overflow: ellipsis; } + +#profileData { + background-color: #dceef957; + padding: 15px; +} + .profileDataItem { position: relative; display: flex; @@ -319,6 +329,7 @@ select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + text-transform: capitalize; } .profileDataItem__value { display: inline-block; @@ -378,9 +389,18 @@ a.proofQR:hover { .profileDataItem__value { min-height: 28px; } - .profileDataItem--noLabel .profileDataItem__label { + .profileDataItem--noLabel .profileDataItem__label { display: none; } + + #profileData .profileDataItem__value a:first-child { + max-width: 85%; + } + + #profileData #profileProofs .profileDataItem__value a:first-child { + display: block; + } + input[type="text"] { width: 100%; From 98e4f596996f3375d8a135000f2c755cd60e9184 Mon Sep 17 00:00:00 2001 From: KiddyTheKid Date: Fri, 25 Dec 2020 21:46:56 -0500 Subject: [PATCH 2/3] Css Style, modified background and primary tag for email. --- static/scripts.js | 2 +- static/styles.css | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/static/scripts.js b/static/scripts.js index 4ba4ae2..a7301d5 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -369,7 +369,7 @@ async function displayProfile(opts) { feedback += `
`; feedback += `
`; // feedback += ``; - feedback += `
${keyData.users[i].userId.email} (primary)
`; + feedback += `
${keyData.users[i].userId.email} primary
`; feedback += `
`; if (userId.length === 0) { diff --git a/static/styles.css b/static/styles.css index de58c77..6ee0047 100644 --- a/static/styles.css +++ b/static/styles.css @@ -303,6 +303,7 @@ select { #profileData { background-color: #dceef957; padding: 15px; + border-radius: 15px; } .profileDataItem { @@ -346,6 +347,16 @@ select { overflow: hidden; text-overflow: ellipsis; } + +.profileDataItem__value small { + color: white; + background: #2178ff; + border-radius: 6px; + padding: 2.8px 5px; + font-size: 0.65em; + vertical-align: middle; +} + a.proofUrl { color: #777; } From 443e2b250d9b0e1cf57166812fa8d549dfd50220 Mon Sep 17 00:00:00 2001 From: KiddyTheKid Date: Sun, 10 Jan 2021 11:34:05 -0500 Subject: [PATCH 3/3] Reapplied capitalizeLetteredServices to services providers names --- static/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/scripts.js b/static/scripts.js index d9ba6fc..a456ca6 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -415,7 +415,7 @@ async function displayProfile(opts) { return; } feedback += `
`; - feedback += `
${claimData.serviceprovider.name}
`; + feedback += `
${capitalizeLetteredServices(claimData.serviceprovider.name)}
`; feedback += `
`; feedback += `${claimData.profile.display}`; if (claim.isVerified) { @@ -469,7 +469,7 @@ async function displayProfile(opts) { return; } feedback += `
`; - feedback += `
${claimData.serviceprovider.name}
`; + feedback += `
${capitalizeLetteredServices(claimData.serviceprovider.name)}
`; feedback += `
`; feedback += `${claimData.profile.display}`; if (claim.isVerified) {