From 6f2186b44232d9980d581d95bba03f72c94a0d20 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 14 Jul 2024 07:50:52 +0200 Subject: [PATCH] UI - Restock/price following text cleanups --- changedetectionio/processors/restock_diff/forms.py | 10 ++++++---- changedetectionio/static/styles/scss/styles.scss | 5 +++++ changedetectionio/static/styles/styles.css | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/changedetectionio/processors/restock_diff/forms.py b/changedetectionio/processors/restock_diff/forms.py index 1ab01e6e..3b89d523 100644 --- a/changedetectionio/processors/restock_diff/forms.py +++ b/changedetectionio/processors/restock_diff/forms.py @@ -13,7 +13,8 @@ class processor_settings_form(processor_text_json_diff_form): render_kw={"placeholder": "No limit", "size": "10"}) price_change_max = FloatField('Maximum amount to trigger notification', [validators.Optional()], render_kw={"placeholder": "No limit", "size": "10"}) - price_change_threshold_percent = FloatField('Threshold in % for price changes', validators=[ + price_change_threshold_percent = FloatField('Threshold in % for price changes since the original price', validators=[ + validators.Optional(), validators.NumberRange(min=0, max=100, message="Should be between 0 and 100"), ], render_kw={"placeholder": "0%", "size": "5"}) @@ -37,12 +38,13 @@ class processor_settings_form(processor_text_json_diff_form):
{{ render_checkbox_field(form.in_stock_only) }} - Only trigger notifications when page changes from out of stock to back in stock + Only trigger re-stock notification when page changes from out of stock to back in stock
{{ render_checkbox_field(form.follow_price_changes) }} Changes in price should trigger a notification - When OFF - only care about restock detection +
+ When OFF - Only care about restock detection
{{ render_field(form.price_change_min, placeholder=watch['restock']['price']) }} @@ -55,7 +57,7 @@ class processor_settings_form(processor_text_json_diff_form):
{{ render_field(form.price_change_threshold_percent) }} Price must change more than this % to trigger a change.
- For example, If the product is $1,000 USD, 2% would mean it has to change more than $20 since the first check.
+ For example, If the product is $1,000 USD originally, 2% would mean it has to change more than $20 since the first check.
""" \ No newline at end of file diff --git a/changedetectionio/static/styles/scss/styles.scss b/changedetectionio/static/styles/scss/styles.scss index aa805285..b720b6d4 100644 --- a/changedetectionio/static/styles/scss/styles.scss +++ b/changedetectionio/static/styles/scss/styles.scss @@ -1118,6 +1118,11 @@ ul { color: #fff; opacity: 0.7; } + + svg { + vertical-align: middle; + } + @extend .inline-tag; } diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index b9469fd0..4f3fec10 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -1194,6 +1194,11 @@ ul { color: #fff; opacity: 0.7; } + +.restock-label svg { + vertical-align: middle; } + + #chrome-extension-link { padding: 9px; border: 1px solid var(--color-grey-800);