|
|
|
@ -202,7 +202,8 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
watch_api.add_resource(api_v1.SystemInfo, '/api/v1/systeminfo',
|
|
|
|
|
resource_class_kwargs={'datastore': datastore, 'update_q': update_q})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getDarkModeSetting():
|
|
|
|
|
return datastore.data['settings']['application']['css_dark_mode']
|
|
|
|
|
|
|
|
|
|
# Setup cors headers to allow all domains
|
|
|
|
|
# https://flask-cors.readthedocs.io/en/latest/
|
|
|
|
@ -403,6 +404,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
|
|
|
|
|
form = forms.quickWatchForm(request.form)
|
|
|
|
|
output = render_template("watch-overview.html",
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
form=form,
|
|
|
|
|
watches=sorted_watches,
|
|
|
|
|
tags=existing_tags,
|
|
|
|
@ -661,6 +663,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
browser_steps_config=browser_step_ui_config,
|
|
|
|
|
current_base_url=datastore.data['settings']['application']['base_url'],
|
|
|
|
|
emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False),
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
form=form,
|
|
|
|
|
has_default_notification_urls=True if len(datastore.data['settings']['application']['notification_urls']) else False,
|
|
|
|
|
has_empty_checktime=using_default_check_time,
|
|
|
|
@ -748,6 +751,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
|
|
|
|
|
output = render_template("settings.html",
|
|
|
|
|
form=form,
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
current_base_url = datastore.data['settings']['application']['base_url'],
|
|
|
|
|
hide_remove_pass=os.getenv("SALTED_PASS", False),
|
|
|
|
|
api_key=datastore.data['settings']['application'].get('api_access_token'),
|
|
|
|
@ -788,6 +792,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
|
|
|
|
|
# Could be some remaining, or we could be on GET
|
|
|
|
|
output = render_template("import.html",
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
import_url_list_remaining="\n".join(remaining_urls),
|
|
|
|
|
original_distill_json=''
|
|
|
|
|
)
|
|
|
|
@ -865,6 +870,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
newest=newest_version_file_contents,
|
|
|
|
|
previous=previous_version_file_contents,
|
|
|
|
|
extra_stylesheets=extra_stylesheets,
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
versions=dates[:-1], # All except current/last
|
|
|
|
|
uuid=uuid,
|
|
|
|
|
newest_version_timestamp=dates[-1],
|
|
|
|
@ -912,6 +918,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
content=content,
|
|
|
|
|
history_n=watch.history_n,
|
|
|
|
|
extra_stylesheets=extra_stylesheets,
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
# current_diff_url=watch['url'],
|
|
|
|
|
watch=watch,
|
|
|
|
|
uuid=uuid,
|
|
|
|
@ -958,6 +965,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
content=content,
|
|
|
|
|
history_n=watch.history_n,
|
|
|
|
|
extra_stylesheets=extra_stylesheets,
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
ignored_line_numbers=ignored_line_numbers,
|
|
|
|
|
triggered_line_numbers=trigger_line_numbers,
|
|
|
|
|
current_diff_url=watch['url'],
|
|
|
|
@ -976,6 +984,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
def notification_logs():
|
|
|
|
|
global notification_debug_log
|
|
|
|
|
output = render_template("notification-log.html",
|
|
|
|
|
dark_mode=getDarkModeSetting(),
|
|
|
|
|
logs=notification_debug_log if len(notification_debug_log) else ["Notification logs are empty - no notifications sent yet."])
|
|
|
|
|
|
|
|
|
|
return output
|
|
|
|
@ -1204,6 +1213,14 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
|
flash("{} watches are queued for rechecking.".format(i))
|
|
|
|
|
return redirect(url_for('index', tag=tag))
|
|
|
|
|
|
|
|
|
|
@app.route("/toggle-theme", methods=['GET'])
|
|
|
|
|
@login_required
|
|
|
|
|
def toggle_theme():
|
|
|
|
|
current_mode = datastore.data['settings']['application']['css_dark_mode']
|
|
|
|
|
new_mode = not current_mode
|
|
|
|
|
datastore.data['settings']['application']['css_dark_mode'] = new_mode
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
|
|
@app.route("/form/checkbox-operations", methods=['POST'])
|
|
|
|
|
@login_required
|
|
|
|
|
def form_watch_list_checkbox_operations():
|
|
|
|
|