forked from Mirrors/keyoxide-web
Remove protocol selector
This commit is contained in:
parent
f0aba33447
commit
db36aeac63
3 changed files with 7 additions and 15 deletions
|
@ -397,6 +397,9 @@ pre code {
|
|||
padding-bottom: 1.6rem;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
.form-wrapper *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.form-wrapper form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -183,14 +183,8 @@ const runSearchForm = () => {
|
|||
elFormSearch.onsubmit = function (evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
const protocol = elFormSearch.querySelector("input[type='radio']:checked").value;
|
||||
const identifier = elFormSearch.querySelector("input[type='search']").value;
|
||||
|
||||
if (protocol == 'sig') {
|
||||
window.location.href = `/${protocol}`;
|
||||
} else {
|
||||
window.location.href = `/${protocol}/${encodeURIComponent(identifier)}`;
|
||||
}
|
||||
window.location.href = `/${encodeURIComponent(identifier)}`;
|
||||
}
|
||||
|
||||
elFormSearch.querySelectorAll("input[type='radio']").forEach(function (el) {
|
||||
|
|
|
@ -32,15 +32,10 @@ block content
|
|||
label#searchQuery(for="query") Query for fingerprint or email identifier
|
||||
input#query(type="search" name="query" required placeholder="3637202523e7c1309ab79e99ef2dc5827b445f4b, test@doip.rocks" aria-labelledby="searchTitle searchQuery")
|
||||
|
||||
fieldset(role="radiogroup").radio-wrapper
|
||||
legend Protocol
|
||||
input#protocol-hkp(type="radio" name="protocol" value="hkp" checked="true")
|
||||
label(for="protocol-hkp") HKP
|
||||
input#protocol-wkd(type="radio" name="protocol" value="wkd")
|
||||
label(for="protocol-wkd") WKD
|
||||
input#protocol-sig(type="radio" name="protocol" value="sig")
|
||||
label(for="protocol-sig") Signature
|
||||
input(type="submit" value="View profile")
|
||||
p Or view a
|
||||
a(href="/sig") plaintext signature
|
||||
| profile.
|
||||
|
||||
if highlights.length > 0
|
||||
h2 Highlights
|
||||
|
|
Loading…
Reference in a new issue