forked from zaclys/searxng
better error message when no results found
This commit is contained in:
parent
b6e3cf6ced
commit
a00e5d2d75
|
@ -176,6 +176,15 @@ div.selectable_url {
|
|||
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();
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<div id="engines_msg">
|
||||
{% if not results and not answers %}
|
||||
<details class="sidebar-collapsable" open>
|
||||
{% else %}
|
||||
<details class="sidebar-collapsable">
|
||||
{% endif %}
|
||||
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
|
||||
<div class="dialog-error" role="alert">
|
||||
{{ icon_big('warning') }}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{% 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>{{ _("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>
|
||||
|
|
|
@ -75,4 +75,4 @@ def test_search(browser):
|
|||
browser.visit(url)
|
||||
browser.fill('q', 'test search query')
|
||||
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 New Issue