Use native date formatting from Keycloak
This commit is contained in:
parent
0a562763e6
commit
f2bc66c3ea
|
@ -45,7 +45,6 @@
|
||||||
"webpack-cli": "^4.9.1"
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"moment": "^2.29.4",
|
|
||||||
"rfc4648": "^1.5.2",
|
"rfc4648": "^1.5.2",
|
||||||
"vue": "^3.2.26",
|
"vue": "^3.2.26",
|
||||||
"vue-i18n": "9"
|
"vue-i18n": "9"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="w-full ml-5 flex flex-col">
|
<div class="w-full ml-5 flex flex-col">
|
||||||
<p>{{ authenticator.label }}</p>
|
<p>{{ authenticator.label }}</p>
|
||||||
<p class="text-sm">
|
<p class="text-sm">
|
||||||
{{ $t("webauthn.registered", {date: moment(authenticator.createdAt)}) }}
|
{{ $t("webauthn.registered", { date: authenticator.createdAt }) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,7 +77,6 @@ import ErrorBox from "~/components/ErrorBox.vue";
|
||||||
import type { KcContextBase } from "~/types/context";
|
import type { KcContextBase } from "~/types/context";
|
||||||
import { base64url } from "rfc4648";
|
import { base64url } from "rfc4648";
|
||||||
import { formPost } from "~/functions/utils";
|
import { formPost } from "~/functions/utils";
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "WebAuthnAuthenticate",
|
name: "WebAuthnAuthenticate",
|
||||||
|
@ -98,9 +97,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
moment(date: string) : string {
|
|
||||||
return moment(date).toDate().toLocaleString();
|
|
||||||
},
|
|
||||||
tryAnotherWay(e: Event) {
|
tryAnotherWay(e: Event) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
formPost(this.context.url.loginAction, {
|
formPost(this.context.url.loginAction, {
|
||||||
|
|
Loading…
Reference in a new issue