Improve WebAuthn buttons layout

This commit is contained in:
Frédéric Guillot 2023-11-08 19:01:15 +00:00
parent aa3dc574a7
commit f2849ca00f
4 changed files with 48 additions and 46 deletions

View file

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Miniflux"> <meta name="apple-mobile-web-app-title" content="Miniflux">
<link rel="manifest" href="{{ route "webManifest" }}" crossorigin="use-credentials"/> <link rel="manifest" href="{{ route "webManifest" }}" crossorigin="use-credentials">
<meta name="robots" content="noindex,nofollow"> <meta name="robots" content="noindex,nofollow">
<meta name="referrer" content="no-referrer"> <meta name="referrer" content="no-referrer">

View file

@ -20,11 +20,13 @@
</div> </div>
</form> </form>
{{ if .webAuthnEnabled }} {{ if .webAuthnEnabled }}
<div class="webauthn">
<div class="alert alert-error hidden" id="webauthn-error"> <div class="alert alert-error hidden" id="webauthn-error">
{{ t "page.login.webauthn_login.error" }} {{ t "page.login.webauthn_login.error" }}
</div> </div>
<div class="buttons"> <div class="buttons">
<button class="button" id="webauthn-login" disabled>{{ t "page.login.webauthn_login" }}</button> <button class="button button-primary" id="webauthn-login" disabled>{{ t "page.login.webauthn_login" }}</button>
</div>
</div> </div>
{{ end }} {{ end }}
{{ if hasOAuth2Provider "google" }} {{ if hasOAuth2Provider "google" }}

View file

@ -51,21 +51,12 @@
{{ if .webAuthnEnabled }} {{ if .webAuthnEnabled }}
<fieldset> <fieldset>
<legend>{{ t "page.settings.webauthn.passkeys" }}</legend> <legend>{{ t "page.settings.webauthn.passkeys" }}</legend>
<div class="alert alert-error hidden" id="webauthn-error"> <div class="alert alert-error hidden" id="webauthn-error">
{{ t "page.settings.webauthn.register.error" }} {{ t "page.settings.webauthn.register.error" }}
</div> </div>
<div class="buttons">
<button class="button" id="webauthn-register" disabled>
{{ t "page.settings.webauthn.register" }}
</button>
{{ if gt .countWebAuthnCerts 0}}
<button class="button" id="webauthn-delete">
{{ plural "page.settings.webauthn.delete" .countWebAuthnCerts .countWebAuthnCerts }}
</button>
{{ end }}
</div>
{{ if .webAuthnCerts}} {{ if .webAuthnCerts}}
<div class="details-content">
<table> <table>
<tr> <tr>
<th>{{ t "page.settings.webauthn.passkey_name" }}</th> <th>{{ t "page.settings.webauthn.passkey_name" }}</th>
@ -91,8 +82,18 @@
</tr> </tr>
{{ end }} {{ end }}
</table> </table>
</div>
{{ end }} {{ end }}
<div class="buttons">
<button class="button button-primary" id="webauthn-register" disabled>
{{ t "page.settings.webauthn.register" }}
</button>
{{ if gt .countWebAuthnCerts 0}}
<button class="button button-danger" id="webauthn-delete">
{{ plural "page.settings.webauthn.delete" .countWebAuthnCerts .countWebAuthnCerts }}
</button>
{{ end }}
</div>
</fieldset> </fieldset>
{{ end }} {{ end }}

View file

@ -363,7 +363,7 @@ input[type="number"] {
font-size: 99%; font-size: 99%;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 5px; margin-top: 5px;
-webkit-appearance: none; appearance: none;
} }
input[type="search"]:focus, input[type="search"]:focus,
@ -393,7 +393,7 @@ textarea {
padding: 3px; padding: 3px;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 5px; margin-top: 5px;
-webkit-appearance: none; appearance: none;
} }
textarea:focus { textarea:focus {
@ -440,8 +440,7 @@ a.button {
.button { .button {
display: inline-block; display: inline-block;
-webkit-appearance: none; appearance: none;
-moz-appearance: none;
font-size: 1.1em; font-size: 1.1em;
cursor: pointer; cursor: pointer;
padding: 3px 10px; padding: 3px 10px;