diff --git a/gui/app/components/search/search-view.js b/gui/app/components/search/search-view.js index f5dfcaf7..80d543c5 100644 --- a/gui/app/components/search/search-view.js +++ b/gui/app/components/search/search-view.js @@ -16,6 +16,7 @@ import Component from '@ember/component'; export default Component.extend({ searchSvc: service('search'), results: A([]), + validSearch: true, init() { this._super(...arguments); @@ -50,6 +51,12 @@ export default Component.extend({ actions: { onSearch() { + if (this.get('filter').trim().length < 3) { + this.set('validSearch', false); + return; + } + + this.set('validSearch', true); this.fetch(); } } diff --git a/gui/app/styles/color.scss b/gui/app/styles/color.scss index d200d287..ecebf79f 100644 --- a/gui/app/styles/color.scss +++ b/gui/app/styles/color.scss @@ -108,3 +108,6 @@ $color-whats-new: #fc1530; .background-color-theme-light { background-color: $color-primary-light !important; } +.background-color-gold { + background-color: $color-goldy !important; +} diff --git a/gui/app/templates/components/search/search-view.hbs b/gui/app/templates/components/search/search-view.hbs index 4c22184c..bf823596 100644 --- a/gui/app/templates/components/search/search-view.hbs +++ b/gui/app/templates/components/search/search-view.hbs @@ -26,5 +26,9 @@ - {{search/search-results results=results keywords=filter}} + {{#if validSearch}} + {{search/search-results results=results keywords=filter}} + {{else}} +

Your search term is too short

+ {{/if}}