From d35937110f20c9345433c65b8d293d3de0235ad4 Mon Sep 17 00:00:00 2001 From: Austin Hulen Date: Mon, 29 Jul 2024 08:01:11 -0700 Subject: [PATCH 1/4] Update attached file label in ChatInput component --- src/ui/UserPortal/components/ChatInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/UserPortal/components/ChatInput.vue b/src/ui/UserPortal/components/ChatInput.vue index 85cb6ae57b..8bba2f431c 100644 --- a/src/ui/UserPortal/components/ChatInput.vue +++ b/src/ui/UserPortal/components/ChatInput.vue @@ -14,7 +14,7 @@ />
-

Attached Files

+

Attached File

{{ file.fileName }}
@@ -30,7 +30,7 @@
- No files attached + No file attached
From 50378fd0aa9b1daa9ee5968bd0c77fbbf27d9240 Mon Sep 17 00:00:00 2001 From: Austin Hulen Date: Mon, 29 Jul 2024 08:28:38 -0700 Subject: [PATCH 2/4] Update file upload confirmation dialog labels --- src/ui/UserPortal/components/ChatInput.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/UserPortal/components/ChatInput.vue b/src/ui/UserPortal/components/ChatInput.vue index 8bba2f431c..7008f9de8d 100644 --- a/src/ui/UserPortal/components/ChatInput.vue +++ b/src/ui/UserPortal/components/ChatInput.vue @@ -262,19 +262,21 @@ export default { message: 'Uploading a new file will replace the file already attached.', header: 'Confirm File Replacement', icon: 'pi pi-exclamation-triangle', + rejectLabel: 'Upload', + acceptLabel: 'Cancel', rejectProps: { + label: 'Upload', + }, + acceptProps: { label: 'Cancel', severity: 'secondary', outlined: true }, - acceptProps: { - label: 'Upload' - }, accept: () => { - uploadCallback(); this.showFileUploadDialog = false; }, reject: () => { + uploadCallback(); this.showFileUploadDialog = false; } }); From 54128c62bd3925788ae6365f8877115e63c7039f Mon Sep 17 00:00:00 2001 From: Austin Hulen Date: Mon, 29 Jul 2024 09:15:17 -0700 Subject: [PATCH 3/4] Update file upload functionality to filter attachments by session ID --- src/ui/UserPortal/components/ChatInput.vue | 18 ++++++++++++------ src/ui/UserPortal/js/types/index.ts | 1 + src/ui/UserPortal/stores/appStore.ts | 15 +++++++++++---- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/ui/UserPortal/components/ChatInput.vue b/src/ui/UserPortal/components/ChatInput.vue index 7008f9de8d..2e525642b8 100644 --- a/src/ui/UserPortal/components/ChatInput.vue +++ b/src/ui/UserPortal/components/ChatInput.vue @@ -8,14 +8,14 @@ class="file-upload-button secondary-button" style="height: 100%;" @click="toggleFileAttachmentOverlay" - :badge="$appStore.attachments.length.toString() || null" - v-tooltip.top="'Attach files' + ($appStore.attachments.length ? ' (' + $appStore.attachments.length.toString() + ' file)' : ' (0 files)')" - :aria-label="'Upload file (' + $appStore.attachments.length.toString() + ' files attached)'" + :badge="fileArrayFiltered.length.toString() || null" + v-tooltip.top="'Attach files' + (fileArrayFiltered.length ? ' (' + fileArrayFiltered.length.toString() + ' file)' : ' (0 files)')" + :aria-label="'Upload file (' + fileArrayFiltered.length.toString() + ' files attached)'" />

Attached File

-
+
{{ file.fileName }}