From 4ac2b31f4225abd2b136ed75a841fe5e9c4a5127 Mon Sep 17 00:00:00 2001 From: fayazara Date: Wed, 14 Dec 2022 15:13:30 +0530 Subject: [PATCH] Review changes --- .../dashboard/i18n/locale/en/search.json | 6 +- .../dashboard/search/components/ReadMore.vue | 55 +++++++++++++++++++ .../search/components/SearchHeader.vue | 7 ++- .../components/SearchResultContactsList.vue | 5 ++ .../SearchResultConversationsList.vue | 5 ++ .../components/SearchResultMessageItem.vue | 4 +- .../components/SearchResultMessagesList.vue | 5 ++ .../search/components/SearchResultSection.vue | 17 ++++-- .../search/components/SearchView.vue | 4 ++ 9 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/search/components/ReadMore.vue diff --git a/app/javascript/dashboard/i18n/locale/en/search.json b/app/javascript/dashboard/i18n/locale/en/search.json index efcfcf86c..64be70bda 100644 --- a/app/javascript/dashboard/i18n/locale/en/search.json +++ b/app/javascript/dashboard/i18n/locale/en/search.json @@ -11,7 +11,9 @@ "CONVERSATIONS": "CONVERSATIONS", "MESSAGES": "MESSAGES" }, - "EMPTY_STATE": "No results found for this query", - "PLACEHOLDER_KEYBINDING": "/ to focus" + "EMPTY_STATE": "No %{item} found for query '%{query}'", + "PLACEHOLDER_KEYBINDING": "/ to focus", + "INPUT_PLACEHOLDER": "Search message content, contact name, email or phone or conversations", + "BOT_LABEL": "Bot" } } diff --git a/app/javascript/dashboard/routes/dashboard/search/components/ReadMore.vue b/app/javascript/dashboard/routes/dashboard/search/components/ReadMore.vue new file mode 100644 index 000000000..3b8aaa6a6 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/search/components/ReadMore.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/app/javascript/dashboard/routes/dashboard/search/components/SearchHeader.vue b/app/javascript/dashboard/routes/dashboard/search/components/SearchHeader.vue index e34eaf617..ef7990f74 100644 --- a/app/javascript/dashboard/routes/dashboard/search/components/SearchHeader.vue +++ b/app/javascript/dashboard/routes/dashboard/search/components/SearchHeader.vue @@ -8,7 +8,7 @@ @@ -43,7 +43,10 @@ export default { }, 500); }, focusSearch(e) { - if (e.key === '/') this.$refs.searchInput.focus(); + if (e.key === '/') { + e.preventDefault(); + this.$refs.searchInput.focus(); + } }, }, }; diff --git a/app/javascript/dashboard/routes/dashboard/search/components/SearchResultContactsList.vue b/app/javascript/dashboard/routes/dashboard/search/components/SearchResultContactsList.vue index 791cc30e0..55247ff53 100644 --- a/app/javascript/dashboard/routes/dashboard/search/components/SearchResultContactsList.vue +++ b/app/javascript/dashboard/routes/dashboard/search/components/SearchResultContactsList.vue @@ -2,6 +2,7 @@