From 113388ff46194ced36990238473c11b015580d91 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 3 Sep 2020 00:06:19 +0200 Subject: [PATCH] Add domain to proof displays for gitea and gitlab --- static/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/scripts.js b/static/scripts.js index 4d0c37f..1ff27a5 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -605,7 +605,7 @@ async function verifyProof(url, fingerprint) { if (/\/gitea_proof$/.test(url)) { output.type = "gitea"; match = url.match(/https:\/\/(.*)\/(.*)\/gitea_proof/); - output.display = match[2]; + output.display = `${match[2]}@${match[1]}`; output.url = `https://${match[1]}/${match[2]}`; output.proofUrl = `https://${match[1]}/api/v1/repos/${match[2]}/gitea_proof`; output.proofUrlFetch = `/server/verify/proxy @@ -658,7 +658,7 @@ async function verifyProof(url, fingerprint) { if (/\/gitlab_proof$/.test(url)) { output.type = "gitlab"; match = url.match(/https:\/\/(.*)\/(.*)\/gitlab_proof/); - output.display = match[2]; + output.display = `${match[2]}@${match[1]}`; output.url = `https://${match[1]}/${match[2]}`; output.proofUrlFetch = `https://${match[1]}/api/v4/users?username=${match[2]}`; try {