diff options
-rw-r--r-- | searx/static/themes/simple/src/less/toolkit.less | 9 | ||||
-rw-r--r-- | searx/templates/simple/elements/engines_msg.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/messages/no_results.html | 10 | ||||
-rw-r--r-- | tests/robot/test_webapp.py | 2 |
4 files changed, 22 insertions, 3 deletions
diff --git a/searx/static/themes/simple/src/less/toolkit.less b/searx/static/themes/simple/src/less/toolkit.less index 18f72795d..f4e3c36e1 100644 --- a/searx/static/themes/simple/src/less/toolkit.less +++ b/searx/static/themes/simple/src/less/toolkit.less @@ -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(); diff --git a/searx/templates/simple/elements/engines_msg.html b/searx/templates/simple/elements/engines_msg.html index 33f31842d..db1cefaaf 100644 --- a/searx/templates/simple/elements/engines_msg.html +++ b/searx/templates/simple/elements/engines_msg.html @@ -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') }} diff --git a/searx/templates/simple/messages/no_results.html b/searx/templates/simple/messages/no_results.html index 6412191dd..8361276d0 100644 --- a/searx/templates/simple/messages/no_results.html +++ b/searx/templates/simple/messages/no_results.html @@ -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> diff --git a/tests/robot/test_webapp.py b/tests/robot/test_webapp.py index 605592648..42066e37a 100644 --- a/tests/robot/test_webapp.py +++ b/tests/robot/test_webapp.py @@ -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') |