mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 04:41:00 +00:00
better error message when no results found
This commit is contained in:
parent
ad725ce7d7
commit
33e722f83b
4 changed files with 22 additions and 3 deletions
|
@ -176,6 +176,15 @@ div.selectable_url {
|
||||||
border-color: var(--color-error);
|
border-color: var(--color-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dialog-error-block {
|
||||||
|
.dialog();
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
color: var(--color-error);
|
||||||
|
background: var(--color-error-background);
|
||||||
|
border-color: var(--color-error);
|
||||||
|
}
|
||||||
|
|
||||||
.dialog-warning {
|
.dialog-warning {
|
||||||
.dialog();
|
.dialog();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<div id="engines_msg">
|
<div id="engines_msg">
|
||||||
|
{% if not results and not answers %}
|
||||||
|
<details class="sidebar-collapsable" open>
|
||||||
|
{% else %}
|
||||||
<details class="sidebar-collapsable">
|
<details class="sidebar-collapsable">
|
||||||
|
{% endif %}
|
||||||
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
|
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
{{ icon_big('warning') }}
|
{{ icon_big('warning') }}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
{% from 'simple/icons.html' import icon_big %}
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error-block" role="alert">
|
||||||
<p><strong>{{ _('Sorry!') }}</strong></p>
|
<p><strong>{{ _('Sorry!') }}</strong></p>
|
||||||
<p>{{ _("we didn't find any results. Please use another query or search in more categories.") }}</p>
|
<p>{{ _("No results were found. You can try to:") }}</p>
|
||||||
|
<ul>
|
||||||
|
<li>{{ _("Refresh the page.") }}</li>
|
||||||
|
<li>{{ _("Search for another query or select another category (above).") }}</li>
|
||||||
|
<li>{{ _("Change the search engine used in the preferences:") }} <a href="/preferences">/preferences</a></li>
|
||||||
|
<li>{{ _("Switch to another instance:") }} <a href="https://searx.space">https://searx.space</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -75,4 +75,4 @@ def test_search(browser):
|
||||||
browser.visit(url)
|
browser.visit(url)
|
||||||
browser.fill('q', 'test search query')
|
browser.fill('q', 'test search query')
|
||||||
browser.find_by_xpath('//button[@type="submit"]').first.click()
|
browser.find_by_xpath('//button[@type="submit"]').first.click()
|
||||||
assert browser.is_text_present('didn\'t find any results')
|
assert browser.is_text_present('No results were found')
|
||||||
|
|
Loading…
Reference in a new issue