From 26438fa034e1ca03b11b92a867476e104a923365 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sat, 24 Jul 2021 11:32:31 -0600 Subject: [PATCH] ui(server/files): add validation for duplicate directory names --- .../components/dashboard/SSHKeyContainer.tsx | 5 +++++ resources/scripts/components/elements/Input.tsx | 6 ++---- .../server/files/NewDirectoryButton.tsx | 16 ++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/resources/scripts/components/dashboard/SSHKeyContainer.tsx b/resources/scripts/components/dashboard/SSHKeyContainer.tsx index b40e5516d..de0feca06 100644 --- a/resources/scripts/components/dashboard/SSHKeyContainer.tsx +++ b/resources/scripts/components/dashboard/SSHKeyContainer.tsx @@ -18,6 +18,7 @@ import useFlash from '@/plugins/useFlash'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; import FormikFieldWrapper from '@/components/elements/FormikFieldWrapper'; import { Textarea } from '@/components/elements/Input'; +import { format } from 'date-fns'; interface Values { name: string; @@ -145,6 +146,10 @@ export default () => {

{key.name}

+

+ Added at:  + {key.createdAt ? format(key.createdAt, 'MMM do, yyyy HH:mm') : 'Never'} +