Added initial UI code

diff-proposed-for-bwees
bwees 3 years ago
parent 234494d907
commit 04746cc706

@ -8,6 +8,7 @@ from wtforms import (
PasswordField,
RadioField,
SelectField,
SelectMultipleField,
StringField,
SubmitField,
TextAreaField,
@ -343,6 +344,10 @@ class watchForm(commonSettingsForm):
check_unique_lines = BooleanField('Only trigger when new lines appear', default=False)
trigger_text = StringListField('Trigger/wait for text', [validators.Optional(), ValidateListRegex()])
text_should_not_be_present = StringListField('Block change-detection if text matches', [validators.Optional(), ValidateListRegex()])
trigger_on_add = BooleanField('Additions', default=True)
trigger_on_del = BooleanField('Deletions', default=True)
trigger_on_modify = BooleanField('Modifications', default=True)
webdriver_js_execute_code = TextAreaField('Execute JavaScript before change detection', render_kw={"rows": "5"}, validators=[validators.Optional()])

@ -156,6 +156,18 @@ User-Agent: wonderbra 1.0") }}
<span class="pure-form-message-inline">Good for websites that just move the content around, and you want to know when NEW content is added, compares new lines against all history for this watch.</span>
</div>
</fieldset>
<fieldset>
<div class="pure-control-group">
<label for="trigger-type">Trigger On</label>
{{ render_checkbox_field(form.trigger_on_add, class="trigger-type") }}
{{ render_checkbox_field(form.trigger_on_del, class="trigger-type") }}
{{ render_checkbox_field(form.trigger_on_modify, class="trigger-type") }}
<span class="pure-form-message-inline">
This filter only compares to the previous snapshot. This is different from the "Only trigger when new lines appear" setting which checks all previous snapshots.
This is good for filtering out notifications for only content being removed.
</span>
</div>
</fieldset>
<div class="pure-control-group">
{{ render_field(form.css_filter, placeholder=".class-name or #some-id, or other CSS selector rule.",
class="m-d") }}

Loading…
Cancel
Save