From 2831391ad4f671354f7843eae767f47c600cd614 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 4 May 2021 19:01:18 +0100 Subject: [PATCH] Shows more specific message when there are no results --- README.md | 3 ++- src/styles/color-themes.scss | 2 +- src/views/Home.vue | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 24c046b1..7ae7930a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ ## Features 🌈 -- Instant search and full keyboard shortcuts +- Instant search by name, domain and tags - just start typing +- Full keyboard shortcuts for navigation, searching and launching - Multiple color themes, with easy method for adding more themes - Customizable layout options and item sizes - Preferences stored in local storage and applied on load diff --git a/src/styles/color-themes.scss b/src/styles/color-themes.scss index 46f3fe6a..1565e260 100644 --- a/src/styles/color-themes.scss +++ b/src/styles/color-themes.scss @@ -204,4 +204,4 @@ html[data-theme='colorful'] { svg path { fill: #05070e; } i.fas, i.fab, i.far, i.fal, i.fad { color: #05070e; } } -} \ No newline at end of file +} diff --git a/src/views/Home.vue b/src/views/Home.vue index 98cc05d2..260504d7 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -26,7 +26,10 @@ :class="(filterTiles(section.items).length === 0 && searchValue) ? 'no-results' : ''" /> -
No Data Found Yet
+ +
+ {{searchValue ? 'No Search Results' : 'No Data Configured'}} +
@@ -150,6 +153,17 @@ export default { document.head.appendChild(fontAwesomeScript); } }, + /* Returns true if there is more than 1 sub-result visible during searching */ + checkIfResults() { + if (!this.sections) return false; + else { + let itemsFound = true; + this.sections.forEach((section) => { + if (this.filterTiles(section.items).length > 0) itemsFound = false; + }); + return itemsFound; + } + }, }, mounted() { this.initiateFontAwesome();