UI - Adding watch label/title to [edit] page title (#1858)

pull/1864/head
dgtlmoon 1 year ago committed by GitHub
parent 9ce86a2835
commit 522e9786c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -713,6 +713,7 @@ def changedetection_app(config=None, datastore_o=None):
available_processors=processors.available_processors(), available_processors=processors.available_processors(),
browser_steps_config=browser_step_ui_config, browser_steps_config=browser_step_ui_config,
emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False), emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False),
extra_title=f" - Edit - {watch.label}",
form=form, form=form,
has_default_notification_urls=True if len(datastore.data['settings']['application']['notification_urls']) else False, has_default_notification_urls=True if len(datastore.data['settings']['application']['notification_urls']) else False,
has_empty_checktime=using_default_check_time, has_empty_checktime=using_default_check_time,
@ -953,7 +954,7 @@ def changedetection_app(config=None, datastore_o=None):
from_version=str(from_version), from_version=str(from_version),
to_version=str(to_version), to_version=str(to_version),
extra_stylesheets=extra_stylesheets, extra_stylesheets=extra_stylesheets,
extra_title=" - Diff - {}".format(watch['title'] if watch['title'] else watch['url']), extra_title=f" - Diff - {watch.label}",
extract_form=extract_form, extract_form=extract_form,
is_html_webdriver=is_html_webdriver, is_html_webdriver=is_html_webdriver,
last_error=watch['last_error'], last_error=watch['last_error'],

@ -167,9 +167,7 @@ class model(dict):
@property @property
def label(self): def label(self):
# Used for sorting # Used for sorting
if self['title']: return self.get('title') if self.get('title') else self.get('url')
return self['title']
return self['url']
@property @property
def last_changed(self): def last_changed(self):

Loading…
Cancel
Save