Compare commits

...

2 commits

Author SHA1 Message Date
Oliver Traber 26648b8971
Fix date formatiing 2023-04-20 21:08:02 +02:00
Oliver Traber b0a69cda0b
Add favicon 2023-04-20 20:21:25 +02:00
5 changed files with 13 additions and 2 deletions

View file

@ -45,6 +45,7 @@
"webpack-cli": "^4.9.1"
},
"dependencies": {
"moment": "^2.29.4",
"rfc4648": "^1.5.2",
"vue": "^3.2.26",
"vue-i18n": "9"

View file

@ -215,6 +215,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<link rel="icon" href="${url.resourcesPath}/img/favicon.ico">
<title>${msg("loginTitle",(realm.displayName!''))}</title>
<style>
body {

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -24,7 +24,7 @@
<div class="w-full ml-5 flex flex-col">
<p>{{ authenticator.label }}</p>
<p class="text-sm">
{{ $t("webauthn.registered", {date: new Date(authenticator.createdAt).toLocaleString()}) }}
{{ $t("webauthn.registered", {date: moment(authenticator.createdAt)}) }}
</p>
</div>
</div>
@ -45,7 +45,7 @@
</p>
</div>
<div v-if="!webauthnSupported">
<p v-if="!context.auth?.showTryAnotherWayLink" class="mt-5 text-center">
<p v-if="context.auth?.showTryAnotherWayLink" class="mt-5 text-center">
{{ $t("webauthn.noSupportOtherMethod") }}
</p>
<p v-else class="mt-5 text-center">
@ -77,6 +77,7 @@ import ErrorBox from "~/components/ErrorBox.vue";
import type { KcContextBase } from "~/types/context";
import { base64url } from "rfc4648";
import { formPost } from "~/functions/utils";
import moment from "moment";
export default defineComponent({
name: "WebAuthnAuthenticate",
@ -97,6 +98,9 @@ export default defineComponent({
}
},
methods: {
moment(date: string) : string {
return moment(date).toDate().toLocaleString();
},
tryAnotherWay(e: Event) {
e.preventDefault();
formPost(this.context.url.loginAction, {

View file

@ -3304,6 +3304,11 @@ minimist@^1.2.0, minimist@^1.2.6:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
moment@^2.29.4:
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"