update to 2023.11.14

This commit is contained in:
meaz 2023-11-15 08:39:46 +01:00
parent 31d9ed9e25
commit 616ecc09be
Signed by: meaz
GPG key ID: CD7A47B2F1ED43B4
10 changed files with 80 additions and 15 deletions

View file

@ -17,7 +17,7 @@
{% else %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen" />
{% endif %}
{% if get_setting('server.limiter') %}
{% if get_setting('server.limiter') or get_setting('server.public_instance') %}
<link rel="stylesheet" href="{{ url_for('client_token', token=link_token) }}" type="text/css" />
{% endif %}
{% block styles %}{% endblock %}

View file

@ -13,14 +13,25 @@
} -%}
<div id="categories" class="search_categories">{{- '' -}}
<div id="categories_container">
{%- for category in categories -%}
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
<div class="category_name">{{- _(category) -}}</div>
</label>
</div>
{%- endfor -%}
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
{%- if not search_on_category_select or not display_tooltip -%}
{%- for category in categories_as_tabs -%}
<div class="category category_checkbox">{{- '' -}}
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
<div class="category_name">{{- _(category) -}}</div>
</label>
</div>
{%- endfor -%}
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
{%- else -%}
{%- for category in categories_as_tabs -%}{{- '\n' -}}
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
</button>{{- '' -}}
{%- endfor -%}
{{- '\n' -}}
{%- endif -%}
</div>{{- '' -}}
</div>

View file

@ -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') }}

View file

@ -1,6 +1,7 @@
<div id="search_url" role="complementary" aria-labelledby="search_url-title">
<details class="sidebar-collapsable">
<summary class="title" id="search_url-title">{{ _('Search URL') }}</summary>
<button id="copy_url" type="submit" data-copied-text="{{ _('Copied') }}">{{ _('Copy') }}</button>
<div class="selectable_url">
<pre>{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}
{%- if pageno > 1 -%}

View file

@ -1,5 +1,11 @@
{% from 'beetroot/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>

View file

@ -108,7 +108,7 @@
{%- endmacro -%}
{%- macro engine_reliability(engine_name) -%}
{%- set r = reliabilities.get(engine_name, {}).get('reliablity', None) -%}
{%- set r = reliabilities.get(engine_name, {}).get('reliability', None) -%}
{%- set checker_result = reliabilities.get(engine_name, {}).get('checker', []) -%}
{%- set errors = reliabilities.get(engine_name, {}).get('errors', []) -%}
{%- if r != None -%}
@ -197,6 +197,10 @@
{%- if 'infinite_scroll' not in locked_preferences -%}
{%- include 'beetroot/preferences/infinite_scroll.html' -%}
{%- endif -%}
{%- if 'search_on_category_select' not in locked_preferences -%}
{%- include 'beetroot/preferences/search_on_category_select.html' -%}
{%- endif -%}
{%- include 'beetroot/preferences/hotkeys.html' -%}
{{- plugin_preferences('ui') -}}
{{- tab_footer() -}}

View file

@ -0,0 +1,23 @@
<fieldset>{{- '' -}}
<legend id="pref_hotkeys">{{- _('Hotkeys') -}}</legend>{{- '' -}}
<div class="value">{{- '' -}}
<select name="hotkeys" aria-labelledby="pref_hotkeys">{{- '' -}}
<option value="default"
{%- if hotkeys == 'default' %} selected="selected"
{%- endif -%}>
SearXNG{{- '' -}}
</option>{{- '' -}}
<option value="vim"
{%- if hotkeys == 'vim' %} selected="selected"
{%- endif -%}>
{{- _('Vim-like') -}}
</option>{{- '' -}}
</select>{{- '' -}}
</div>{{- '' -}}
<div class="description">
{{- _(
'Navigate search results with hotkeys (JavaScript required). '
'Press "h" key on main or result page to get help.'
) -}}
</div>{{- '' -}}
</fieldset>{{- '' -}}

View file

@ -0,0 +1,16 @@
<fieldset>{{- '' -}}
<legend>{{ _('Search on category select') }}</legend>{{- '' -}}
<p class="value">{{- '' -}}
<input type="checkbox" {{- ' ' -}}
name="search_on_category_select" {{- ' ' -}}
aria-labelledby="pref_search_on_category_select" {{- ' ' -}}
class="checkbox-onoff" {{- ' ' -}}
{%- if preferences.get_value('search_on_category_select') -%}
checked
{%- endif -%}{{- ' ' -}}
/>{{- '' -}}
</p>{{- '' -}}
<div class="description">
{{- _('Perform search immediately if a category selected. Disable to select multiple categories') -}}
</div>{{- '' -}}
</fieldset>{{- '' -}}

View file

@ -8,7 +8,7 @@
<div class="search_box">
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" autocapitalize="none" spellcheck="false" autocorrect="off" dir="auto" value="{{ q or '' }}">
<button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
<button id="send_search" type="submit" aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
<button id="send_search" type="submit" {%- if search_on_category_select -%}name="category_{{ selected_categories[0]|replace(' ', '_') }}"{%- endif -%} aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
</div>
</div>
{% set display_tooltip = true %}

View file

@ -82,7 +82,7 @@
</div>
{%- endif -%}
</td>
<td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td>
<td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliability') }}</td>
</tr>
{% endfor %}
</table>