mirror of
https://github.com/searxng/searxng.git
synced 2026-07-24 17:01:25 +00:00
Compare commits
4 Commits
21d0428cf2
...
613c1aa8eb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
613c1aa8eb | ||
|
|
899cf7e08a | ||
|
|
362cc13aeb | ||
|
|
d28a1c434f |
@@ -193,6 +193,15 @@ div.selectable_url {
|
||||
border-color: var(--color-warning);
|
||||
}
|
||||
|
||||
.dialog-warning-block {
|
||||
.dialog();
|
||||
|
||||
display: block;
|
||||
color: var(--color-warning);
|
||||
background: var(--color-warning-background);
|
||||
border-color: var(--color-warning);
|
||||
}
|
||||
|
||||
.dialog-modal {
|
||||
.dialog();
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ Basic container instancing example:
|
||||
$ cd ./searxng/
|
||||
|
||||
# Run the container
|
||||
$ docker run --name searxng --replace -d \
|
||||
$ docker run --name searxng -d \
|
||||
-p 8888:8080 \
|
||||
-v "./config/:/etc/searxng/" \
|
||||
-v "./data/:/var/cache/searxng/" \
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -51,7 +51,11 @@
|
||||
{%- endif -%}
|
||||
{%- endblock -%}
|
||||
{%- block linkto_preferences -%}
|
||||
<a href="{{ url_for('preferences') }}" class="link_on_top_preferences">{{ icon_big('settings') }}<span>{{ _('Preferences') }}</span></a>
|
||||
{%- if request.args.get('preferences') -%}
|
||||
<a href="{{ url_for('preferences') }}?preferences={{ request.args.get('preferences') }}&preferences_preview_only=true" class="link_on_top_preferences">{{ icon_big('settings') }}<span>{{ _('Preferences') }}</span></a>
|
||||
{%- else -%}
|
||||
<a href="{{ url_for('preferences') }}" class="link_on_top_preferences">{{ icon_big('settings') }}<span>{{ _('Preferences') }}</span></a>
|
||||
{%- endif -%}
|
||||
{%- endblock -%}
|
||||
</nav>
|
||||
{% block header %}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{%- if pageno == 1 -%}
|
||||
<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>{{ _("Change the search engine used in the preferences:") }} <a href="{{ url_for('preferences') }}">/preferences</a></li>{{- '' -}}
|
||||
<li>{{ _("Switch to another instance:") }} <a href="https://searx.space">https://searx.space</a></li>{{- '' -}}
|
||||
{%- else -%}
|
||||
<li>{{ _("Search for another query or select another category.") }}</li>{{- '' -}}
|
||||
|
||||
@@ -155,6 +155,16 @@
|
||||
|
||||
<h1>{{ _('Preferences') }}</h1>
|
||||
|
||||
{%- if request.args.get('preferences_preview_only') == 'true' -%}
|
||||
<div class="dialog-warning-block">
|
||||
<p>{{ _("This is a preview of the settings used by the 'Search URL' you used to get here.") }}</p>
|
||||
<ul>
|
||||
<li>{{ _('Press save to copy these preferences to your browser.') }}</li>
|
||||
<li>{{ _('Click here to view your browser preferences instead:') }} <a href="{{ url_for('preferences') }}">/preferences</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
<form id="search_form" method="post" action="{{ url_for('preferences') }}" autocomplete="off">
|
||||
{{- tabs_open() -}}
|
||||
|
||||
|
||||
@@ -861,8 +861,11 @@ def preferences():
|
||||
|
||||
# save preferences using the link the /preferences?preferences=...
|
||||
if sxng_request.args.get('preferences') or sxng_request.form.get('preferences'):
|
||||
resp = make_response(redirect(url_for('index', _external=True)))
|
||||
return sxng_request.preferences.save(resp)
|
||||
# if preferences_preview_only is 'true', the prefs from the 'preferences' query are
|
||||
# shown in the settings page, but they're not applied unless the user presses 'save'
|
||||
if sxng_request.args.get('preferences_preview_only') != 'true':
|
||||
resp = make_response(redirect(url_for('index', _external=True)))
|
||||
return sxng_request.preferences.save(resp)
|
||||
|
||||
# save preferences
|
||||
if sxng_request.method == 'POST':
|
||||
|
||||
Reference in New Issue
Block a user