diff --git a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs index f860d768771..3e48050697d 100644 --- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs +++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs @@ -159,16 +159,16 @@ /> + {{#if this.error}} +
+ {{this.error}} +
+ {{/if}} + {{#unless this.hasResults}} {{#if this.searchActive}}

{{i18n "search.no_results"}}

- {{#if this.error}} -
- {{this.error}} -
- {{/if}} - {{#if this.showSuggestion}}
{{i18n "search.cant_find"}} diff --git a/app/assets/stylesheets/common/base/search.scss b/app/assets/stylesheets/common/base/search.scss index 4e8657c3f90..1572828d3a8 100644 --- a/app/assets/stylesheets/common/base/search.scss +++ b/app/assets/stylesheets/common/base/search.scss @@ -18,6 +18,7 @@ .warning { background-color: var(--danger-medium); padding: 5px 8px; + margin-block: 0.5rem; color: var(--secondary); } diff --git a/spec/system/search_spec.rb b/spec/system/search_spec.rb index 1ec870c6ec9..9329d819907 100644 --- a/spec/system/search_spec.rb +++ b/spec/system/search_spec.rb @@ -41,30 +41,14 @@ describe "Search", type: :system, js: true do before do SearchIndexer.enable SearchIndexer.index(topic, force: true) - SiteSetting.rate_limit_search_anon_user_per_minute = 15 + SiteSetting.rate_limit_search_anon_user_per_minute = 4 RateLimiter.enable end after { SearchIndexer.disable } it "rate limits searches for anonymous users" do - queries = %w[ - one - two - three - four - five - six - seven - eight - nine - ten - eleven - twelve - thirteen - fourteen - fifteen - ] + queries = %w[one two three four] visit("/search?expanded=true")