mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-21 09:15:55 +03:00
refactor: run formatter
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// BearerAuth returns the value of the bearer token in the Authorization header if present
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
// Using autofocus can be bad for a11y, but in the case of Pocket ID is only used responsibly in places where there are not many choices, and on buttons only where there's descriptive text
|
||||
if (autofocus) {
|
||||
// Use setTimeout to make sure the element is showing
|
||||
setTimeout(() => ref?.focus(), 100)
|
||||
setTimeout(() => ref?.focus(), 100);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Flex flow is reversed so the sign in button, which has auto-focus, is the first one in the DOM, for a11y -->
|
||||
<div class="flex w-full max-w-[450px] gap-2 flex-row-reverse">
|
||||
<div class="flex w-full max-w-[450px] flex-row-reverse gap-2">
|
||||
{#if !errorMessage}
|
||||
<Button class="flex-1" {isLoading} onclick={authorize} autofocus={true}>
|
||||
{m.sign_in()}
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
}
|
||||
|
||||
function getFieldError(index: number, field: keyof OidcClientFederatedIdentity): string | null {
|
||||
console.log(federatedIdentities);
|
||||
if (!errors) return null;
|
||||
const path = [index, field];
|
||||
return errors?.filter((e) => e.path[0] == path[0] && e.path[1] == path[1])[0]?.message;
|
||||
|
||||
Reference in New Issue
Block a user