mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -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) {
|
||||
let profileUid = elProfileUid.innerHTML;
|
||||
let opts = {
|
||||
input: profileUid,
|
||||
mode: "hkp"
|
||||
let profileUid = elProfileUid.innerHTML, opts, match;
|
||||
if (/.*@.*/.test(profileUid)) {
|
||||
match = profileUid.match(/(.*)@(.*)_([a-zA-Z0-9]+)$/);
|
||||
opts = {
|
||||
input: `${match[1]}@${match[2]}.${match[3]}`,
|
||||
mode: "wkd"
|
||||
}
|
||||
} else {
|
||||
opts = {
|
||||
input: profileUid,
|
||||
mode: "hkp"
|
||||
}
|
||||
}
|
||||
displayProfile(opts);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue