From cecbea6db52d360e046d69cf0762eb1208c45f19 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 14 Dec 2023 11:14:01 +0100 Subject: [PATCH] fix(front): show correct label when adding a new calc or videoconference resource in resources Signed-off-by: Thomas Citharel --- src/views/Resources/ResourceFolder.vue | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/views/Resources/ResourceFolder.vue b/src/views/Resources/ResourceFolder.vue index 9a75fec18..1893a2b27 100644 --- a/src/views/Resources/ResourceFolder.vue +++ b/src/views/Resources/ResourceFolder.vue @@ -106,13 +106,27 @@ {{ modalError }}
-

+

{{ t("The pad will be created on {service}", { service: newResourceHost, }) }}

+

+ {{ + t("The calc will be created on {service}", { + service: newResourceHost, + }) + }} +

+

+ {{ + t("The videoconference will be created on {service}", { + service: newResourceHost, + }) + }} +

= reactive({}); const resourceRenameInput = ref(); -const modalNewResourceInput = ref(); -const modalNewResourceLinkInput = ref(); +const modalNewResourceInput = ref<{ + $refs: { inputRef: HTMLInputElement }; +} | null>(); +const modalNewResourceLinkInput = ref<{ + $refs: { inputRef: HTMLInputElement }; +} | null>(); const actualPath = computed((): string => { const path = Array.isArray(props.path) ? props.path.join("/") : props.path; @@ -420,14 +438,14 @@ const createSentenceForType = (type: string): string => { const createLinkModal = async (): Promise => { createLinkResourceModal.value = true; await nextTick(); - modalNewResourceLinkInput.value?.focus(); + modalNewResourceLinkInput.value?.$refs.inputRef?.focus(); }; const createFolderModal = async (): Promise => { newResource.type = "folder"; createResourceModal.value = true; await nextTick(); - modalNewResourceInput.value?.focus(); + modalNewResourceInput.value?.$refs.inputRef?.focus(); }; const createResourceFromProvider = async ( @@ -437,7 +455,7 @@ const createResourceFromProvider = async ( newResource.type = provider.software; createResourceModal.value = true; await nextTick(); - modalNewResourceInput.value?.focus(); + modalNewResourceInput.value?.$refs.inputRef?.focus(); }; const generateFullResourceUrl = (provider: IProvider): string => {