From 2149e88bdd64a66d867ad1f5c46e6aa0977d837a Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 2 Jun 2023 15:30:02 +0200 Subject: [mod] template preferences: split into elements (no functional change) HINT: this patch has no functional change / it is the preparation for following changes and bugfixes Over the years, the preferences template became an unmanageable beast. To make the source code more readable the monolith is splitted into elements. The splitting into elements also has the advantage that a new template can make use of them. The reversed checkbox is a quirk that is only used in the prefereces and must be eliminated in the long term. For this the macro 'checkbox_onoff_reversed' was added to the preferences.html template. The 'checkbox' macro is also a quirk of the preferences.html we don't want to use in other templates (it is an input-checkbox in a HTML form that was misused for status display). Signed-off-by: Markus Heiser --- searx/templates/simple/preferences/cookies.html | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 searx/templates/simple/preferences/cookies.html (limited to 'searx/templates/simple/preferences/cookies.html') diff --git a/searx/templates/simple/preferences/cookies.html b/searx/templates/simple/preferences/cookies.html new file mode 100644 index 000000000..f84251ef6 --- /dev/null +++ b/searx/templates/simple/preferences/cookies.html @@ -0,0 +1,45 @@ +

+ {{- _('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.') -}} +

+

+ {{- _('URL to restore your preferences in another browser') -}}:{{- '' -}} +

{{- '' -}} +
{{- '' -}} +
+    {{- url_for('preferences', _external=True) -}}?preferences={{- preferences_url_params|e -}}
+    &save=1{{- '' -}}
+  
{{- '' -}} +
{{- '' -}} +

+ {{- _('Specifying custom settings in the preferences URL can be used to sync preferences across devices.') -}} +

-- cgit v1.2.3