From f2bc66c3eae211a6701a90dd2d7d2c35510e0096 Mon Sep 17 00:00:00 2001 From: BluemediaGER Date: Sun, 29 Oct 2023 14:53:09 +0100 Subject: [PATCH] Use native date formatting from Keycloak --- package.json | 1 - src/views/webauthn-authenticate/index.vue | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/package.json b/package.json index ed285a0..1167101 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "moment": "^2.29.4", "rfc4648": "^1.5.2", "vue": "^3.2.26", "vue-i18n": "9" diff --git a/src/views/webauthn-authenticate/index.vue b/src/views/webauthn-authenticate/index.vue index e366d6f..b45a0ca 100644 --- a/src/views/webauthn-authenticate/index.vue +++ b/src/views/webauthn-authenticate/index.vue @@ -24,7 +24,7 @@

{{ authenticator.label }}

- {{ $t("webauthn.registered", {date: moment(authenticator.createdAt)}) }} + {{ $t("webauthn.registered", { date: authenticator.createdAt }) }}

@@ -77,7 +77,6 @@ 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", @@ -98,9 +97,6 @@ export default defineComponent({ } }, methods: { - moment(date: string) : string { - return moment(date).toDate().toLocaleString(); - }, tryAnotherWay(e: Event) { e.preventDefault(); formPost(this.context.url.loginAction, {