From 3004e2fffe24063686c2fa1b474eb9594c133613 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 28 Nov 2023 16:47:35 +0100 Subject: [PATCH] tweak settings --- changedetectionio/static/js/vis.js | 7 +++ .../templates/_common_fields.jinja | 2 +- changedetectionio/templates/base.html | 1 - changedetectionio/templates/edit.html | 55 +++++++++++-------- .../templates/svgs/search-icon.svg | 2 +- 5 files changed, 40 insertions(+), 27 deletions(-) diff --git a/changedetectionio/static/js/vis.js b/changedetectionio/static/js/vis.js index b3c036ff..6a11904f 100644 --- a/changedetectionio/static/js/vis.js +++ b/changedetectionio/static/js/vis.js @@ -4,6 +4,7 @@ $(document).ready(function () { $('[data-visible-for]').hide(); $(':radio').on('keyup keypress blur change click', function (e) { $('[data-visible-for]').hide(); + $('.advanced-options').hide(); var n = $(this).attr('name') + "=" + $(this).val(); if (n === 'fetch_backend=system') { n = "fetch_backend=" + default_system_fetch_backend; @@ -12,4 +13,10 @@ $(document).ready(function () { }); $(':radio:checked').change(); + + + // Show advanced + $('.show-advanced').click(function (e) { + $(this).closest('.tab-pane-inner').find('.advanced-options').toggle(); + }); }); \ No newline at end of file diff --git a/changedetectionio/templates/_common_fields.jinja b/changedetectionio/templates/_common_fields.jinja index 84a7b067..cb27476e 100644 --- a/changedetectionio/templates/_common_fields.jinja +++ b/changedetectionio/templates/_common_fields.jinja @@ -13,7 +13,7 @@
-

The more popular changedetection.io is, the more time we can dedicate to adding amazing features!

diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 8a0d3172..08aa523a 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -126,7 +126,8 @@
{% endif %} -
+ +
{{ render_field(form.webdriver_delay) }}
@@ -138,24 +139,38 @@ {% endif %}
-
+ + Show advanced options +
-
- {% if not playwright_enabled %} -
- Request override is currently only used by the Basic fast Plaintext/HTTP Client method. + +
+ Show advanced options +
+ + - -
-
- {{ render_field(form.body, rows=5, placeholder="Example -{ - \"name\":\"John\", - \"age\":30, - \"car\":null -}") }}
-
-
+
+ +
+
{% if playwright_enabled %}
diff --git a/changedetectionio/templates/svgs/search-icon.svg b/changedetectionio/templates/svgs/search-icon.svg index 7112c238..d1e3248c 100644 --- a/changedetectionio/templates/svgs/search-icon.svg +++ b/changedetectionio/templates/svgs/search-icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file