Trydex/searx/templates/simple/preferences.html
Markus Heiser e8541b6006 [theme] peel out oscar from SearXNG development
This is the first step of removing oscar theme

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30 13:20:27 +02:00

19 KiB

{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %} {% from 'simple/icons.html' import icon_big %} {% extends "simple/page_with_header.html" %} {%- macro plugin_preferences(section) -%} {%- for plugin in plugins -%} {%- if plugin.preference_section == section -%} {{- '' -}} {{ _(plugin.name) }}{{- '' -}}
{{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
{{- '' -}}
{{- _(plugin.description) -}}
{{- '' -}} {%- endif -%} {%- endfor -%} {%- endmacro -%} {% macro engine_about(search_engine) -%} {% if search_engine.about is defined %} {% set about = search_engine.about %}
{{- "" -}}

{{- "" -}}

{{about.website}}

{%- if about.wikidata_id -%}

wikidata.org/wiki/{{about.wikidata_id}}

{%- endif -%} {%- if search_engine.enable_http %}

{{ icon_big('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}

{% endif -%} {%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%} {{ _('View error logs and submit a bug report') -}} {%- endif -%}
{%- endif -%} {%- endmacro %} {%- macro engine_time(engine_name) -%} {{- "" -}} {%- if stats[engine_name].time != None -%} {{- stats[engine_name].time -}}{{- "" -}} {{- "" -}}
{{- "" -}}

{{ _('Median') }}: {{ stats[engine_name].time }}

{{- "" -}}

{{ _('P80') }}: {{ stats[engine_name].rate80 }}

{{- "" -}}

{{ _('P95') }}: {{ stats[engine_name].rate95 }}

{{- "" -}}
{%- endif -%} {%- endmacro -%} {%- macro engine_reliability(engine_name) -%} {% set r = reliabilities.get(engine_name, {}).get('reliablity', None) %} {% set checker_result = reliabilities.get(engine_name, {}).get('checker', []) %} {% set errors = reliabilities.get(engine_name, {}).get('errors', []) %} {% if r != None %} {% if r <= 50 %}{% set label = 'danger' %} {% elif r < 80 %}{% set label = 'warning' %} {% elif r < 90 %}{% set label = '' %} {% else %}{% set label = 'success' %} {% endif %} {% else %} {% set r = '' %} {% endif %} {% if checker_result or errors %} {{- "" -}} {{- "" -}} {{ icon_big('warning', 'The engine is not reliabled') }} {{ r -}} {{- "" -}} {{- "" -}}
{%- if checker_result -%}

{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}

{%- endif -%} {%- if errors %}

{{ _('Errors:') }}

{% endif -%} {%- for error in errors -%}

{{ error }}

{{- "" -}} {%- endfor -%}
{{- "" -}} {%- else -%} {% if r %}{{ r }}{% endif %} {%- endif -%} {%- endmacro -%} {% block head %} {% endblock %} {% block linkto_preferences %}{% endblock %} {% block content %}

{{ _('Preferences') }}

{{ tabs_open() }} {{ tab_header('maintab', 'general', _('General'), True) }} {% if 'categories' not in locked_preferences %} {{ _('Default categories') }} {% set display_tooltip = false %} {% include 'simple/categories.html' %} {% endif %} {% if 'language' not in locked_preferences %} {{ _('Search language') }}

{{- '' -}} {{- '' -}} {{ _('Default language') }} {%- for lang_id,lang_name,country_name,english_name,flag in language_codes | sort(attribute=1) -%} {% if flag %}{{ flag }} {% endif%} {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %} {%- endfor -%} {{- '' -}}

{{ _('What language do you prefer for search?') }}
{% endif %} {% if 'autocomplete' not in locked_preferences %} {{ _('Autocomplete') }}

- {%- for backend in autocomplete_backends -%} {{ backend }} {%- endfor -%}

{{ _('Find stuff as you type') }}
{% endif %} {% if 'safesearch' not in locked_preferences %} {{ _('SafeSearch') }}

{{ _('Strict') }} {{ _('Moderate') }} {{ _('None') }}

{{ _('Filter content') }}

{% endif %} {{ plugin_preferences('general') }} {% if 'doi_resolver' not in locked_preferences %} {{ _('Open Access DOI resolver') }}

{%- for doi_resolver_name,doi_resolver_url in doi_resolvers.items() -%} {{- doi_resolver_name }} - {{ doi_resolver_url -}} {%- endfor -%}

{% endif %} {{ _('Engine tokens') }}

{{ _('Access tokens for private engines') }}

{{ tab_footer() }} {{ tab_header('maintab', 'ui', _('User interface')) }} {% if 'locale' not in locked_preferences %} {{ _('Interface language') }}

{%- for locale_id,locale_name in locales.items() | sort -%} {{ locale_name }} {%- endfor -%}

{{ _('Change the language of the layout') }}
{% endif %} {% if 'theme' not in locked_preferences %} {{ _('Theme') }}

{%- for name in themes -%} {{ name }} {%- endfor -%}

{{ _('Change SearXNG layout') }}
{{ _('Theme style') }}

{%- for name in ['auto', 'light', 'dark'] -%} {{ _(name) }} {%- endfor -%}

{{ _('Choose auto to follow your browser settings') }}
{% endif %} {% if 'results_on_new_tab' not in locked_preferences %} {{ _('Results on new tabs') }}

{{ _('On') }} {{ _('Off')}}

{{_('Open result links on new browser tabs') }}
{% endif %} {% if 'infinite_scroll' not in locked_preferences %} {{ _('Infinite scroll') }}

{{ _('On') }} {{ _('Off')}}

{{ _('Automatically load next page when scrolling to bottom of current page') }}
{% endif %} {{ plugin_preferences('ui') }} {{ tab_footer() }} {{ tab_header('maintab', 'privacy', _('Privacy')) }} {% if 'method' not in locked_preferences %} {{ _('HTTP Method') }}

POST GET

{{ _('Change how forms are submited, learn more about request methods') }}
{% endif %} {% if 'image_proxy' not in locked_preferences %} {{ _('Image proxy') }}

{{ _('Enabled') }} {{ _('Disabled') }}

{{ _('Proxying image results through SearXNG') }}
{% endif %} {% if 'query_in_title' not in locked_preferences %} {{ _("Query in the page's title") }}

{{ _('Enabled') }} {{ _('Disabled') }}

{{ _("When enabled, the result page's title contains your query. Your browser can record this title") }}
{% endif %} {{ plugin_preferences('privacy') }} {{ tab_footer() }} {{ tab_header('maintab', 'engines', _('Engines')) }}

{{ _('Currently used search engines') }}

{{ tabs_open() }} {% set ns = namespace(checked=true) %} {% for categ in categories_as_tabs + [OTHER_CATEGORY] %} {{ tab_header('enginetab', 'category' + categ, _(categ), ns.checked )}} {% set ns.checked = false %} {% if categ == OTHER_CATEGORY %}

{{_('This tab does not show up for search results, but you can search the engines listed here via bangs.')}}

{% endif %}
{{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {% for group, engines in engines_by_category[categ] | group_engines_in_tab %} {% if loop.length > 1 %} {% endif %} {% for search_engine in engines %} {% if not search_engine.private %} {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {{- engine_time(search_engine.name) -}} {{- "" -}} {{ engine_reliability(search_engine.name) -}} {% endif %} {% endfor %} {% endfor %}
{{ _("Allow") }}{{ _("Engine name") }}{{ _("Shortcut") }}{{ _("Supports selected language") }}{{ _("SafeSearch") }}{{ _("Time range") }}{{ _("Response time") }}{{ _("Max time") }}{{ _("Reliability") }}
{{_(group)}}
{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}{% if search_engine.enable_http %}{{ icon_big('warning', 'No HTTPS') }}{% endif -%} {{- engine_about(search_engine) -}} {{ shortcuts[search_engine.name] }}{{ checkbox(None, supports[search_engine.name]['supports_selected_language'], true) }}{{ checkbox(None, supports[search_engine.name]['safesearch'], true) }}{{ checkbox(None, supports[search_engine.name]['time_range_support'], true) }}{{ search_engine.timeout }}
{{ tab_footer() }} {% endfor %} {{ tabs_close() }} {{ tab_footer() }} {{ tab_header('maintab', 'query', _('Special Queries')) }} {% if answerers %}
{% for answerer in answerers %} {% endfor %} {%- for plugin in plugins -%} {%- if plugin.preference_section == 'query' -%} {%- endif -%} {%- endfor -%}
{{ _('Allow') }} {{ _('Keywords') }} {{ _('Name') }} {{ _('Description') }} {{ _('Examples') }}
{{ _("This is the list of SearXNG's instant answering modules.") }}
{{ answerer.keywords|join(', ') }} {{ answerer.info.name }} {{ answerer.info.description }} {{ answerer.info.examples|join(', ') }}
{{ _('This is the list of plugins.') }}
{{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}} {{ plugin.query_keywords|join(', ') }} {{ _(plugin.name) }} {{ _(plugin.description) }} {{ plugin.query_examples }}
{% endif %} {{ tab_footer() }} {{ tab_header('maintab', 'cookies', _('Cookies')) }}

{{- "" -}} {{- _('This is the list of cookies and their values SearXNG is storing on your computer.') }}
{{- "" -}} {{- _('With that list, you can assess SearXNG transparency.') }}
{{- "" -}}

{% if cookies %} {{- "" -}} {{- "" -}} {{- "" -}} {% for cookie in cookies %} {{- "" -}} {{- "" -}} {{- "" -}} {% endfor %}
{{ _('Cookie name') }}{{ _('Value') }}
{{ cookie }}{{ cookies[cookie] }}
{% else %} {% include 'simple/messages/no_cookies.html' %} {% endif %}

{{ _('Search URL of the currently saved preferences') }} :

{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&q=%s{% endraw %}

{{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}

{{ tab_footer() }} {{ tabs_close() }}

{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}

{{ _('Reset defaults') }}
{{ _('Back') }}
{% endblock %}