mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-23 07:19:28 -07:00
Support WKD for profile page
This commit is contained in:
parent
caa43ce8af
commit
b9fad2f740
1 changed files with 12 additions and 4 deletions
|
@ -582,10 +582,18 @@ if (elFormProofs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elProfileUid) {
|
if (elProfileUid) {
|
||||||
let profileUid = elProfileUid.innerHTML;
|
let profileUid = elProfileUid.innerHTML, opts, match;
|
||||||
let opts = {
|
if (/.*@.*/.test(profileUid)) {
|
||||||
|
match = profileUid.match(/(.*)@(.*)_([a-zA-Z0-9]+)$/);
|
||||||
|
opts = {
|
||||||
|
input: `${match[1]}@${match[2]}.${match[3]}`,
|
||||||
|
mode: "wkd"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
opts = {
|
||||||
input: profileUid,
|
input: profileUid,
|
||||||
mode: "hkp"
|
mode: "hkp"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
displayProfile(opts);
|
displayProfile(opts);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue