2021-01-27 11:39:46 +00:00
{% extends 'base.html' %}
{% block content %}
2021-07-18 03:26:23 +00:00
{% from '_helpers.jinja' import render_simple_field %}
2022-03-31 09:01:07 +00:00
< script type = "text/javascript" src = "{{url_for('static_content', group='js', filename='jquery-3.6.0.min.js')}}" > < / script >
< script type = "text/javascript" src = "{{url_for('static_content', group='js', filename='watch-overview.js')}}" defer > < / script >
2022-05-23 21:44:51 +00:00
2021-01-27 11:39:46 +00:00
< div class = "box" >
2022-05-20 14:27:51 +00:00
< form class = "pure-form" action = "{{ url_for('form_watch_add') }}" method = "POST" id = "new-watch-form" >
2022-03-21 21:54:27 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" / >
2021-01-28 17:38:47 +00:00
< fieldset >
2021-01-30 09:40:42 +00:00
< legend > Add a new change detection watch< / legend >
2021-07-22 09:38:10 +00:00
{{ render_simple_field(form.url, placeholder="https://...", required=true) }}
2022-04-12 08:55:43 +00:00
{{ render_simple_field(form.tag, value=active_tag if active_tag else '', placeholder="watch group") }}
2021-01-29 13:45:12 +00:00
< button type = "submit" class = "pure-button pure-button-primary" > Watch< / button >
2021-01-28 17:38:47 +00:00
< / fieldset >
2022-07-10 18:24:49 +00:00
< span style = "color:#eee; font-size: 80%;" > < img style = "height: 1em;display:inline-block;" src = "{{url_for('static_content', group='images', filename='spread-white.svg')}}" / > Tip: You can also add 'shared' watches. < a href = "https://github.com/dgtlmoon/changedetection.io/wiki/Sharing-a-Watch" > More info< / a > < / a > < / span >
2021-01-28 17:38:47 +00:00
< / form >
2021-01-29 14:51:30 +00:00
< div >
2021-07-14 04:02:24 +00:00
< a href = "{{url_for('index')}}" class = "pure-button button-tag {{'active' if not active_tag }}" > All< / a >
2021-01-29 16:50:47 +00:00
{% for tag in tags %}
2021-03-01 14:44:34 +00:00
{% if tag != "" %}
2021-07-14 04:02:24 +00:00
< a href = "{{url_for('index', tag=tag) }}" class = "pure-button button-tag {{'active' if active_tag == tag }}" > {{ tag }}< / a >
2021-03-01 14:44:34 +00:00
{% endif %}
2021-01-29 16:50:47 +00:00
{% endfor %}
< / div >
2021-01-29 14:39:38 +00:00
2021-01-28 17:38:47 +00:00
< div id = "watch-table-wrapper" >
< table class = "pure-table pure-table-striped watch-table" >
< thead >
< tr >
< th > #< / th >
< th > < / th >
2021-03-29 14:11:22 +00:00
< th > < / th >
2021-01-28 17:38:47 +00:00
< th > Last Checked< / th >
< th > Last Changed< / th >
< th > < / th >
< / tr >
< / thead >
< tbody >
2022-06-23 07:41:55 +00:00
{% for watch in watches|sort(attribute='last_changed', reverse=True) %}
2021-01-28 17:38:47 +00:00
< tr id = "{{ watch.uuid }}"
2021-02-11 09:36:54 +00:00
class="{{ loop.cycle('pure-table-odd', 'pure-table-even') }}
{% if watch.last_error is defined and watch.last_error != False %}error{% endif %}
2022-02-04 19:54:20 +00:00
{% if watch.last_notification_error is defined and watch.last_notification_error != False %}error{% endif %}
2021-03-29 14:11:22 +00:00
{% if watch.paused is defined and watch.paused != False %}paused{% endif %}
2022-05-31 21:43:50 +00:00
{% if watch.newest_history_key| int > watch.last_viewed and watch.history_n>=2 %}unviewed{% endif %}
2022-04-21 10:52:45 +00:00
{% if watch.uuid in queued_uuids %}queued{% endif %}">
2021-06-14 09:40:41 +00:00
< td class = "inline" > {{ loop.index }}< / td >
2021-08-15 19:53:47 +00:00
< td class = "inline paused-state state-{{watch.paused}}" > < a href = "{{url_for('index', pause=watch.uuid, tag=active_tag)}}" > < img src = "{{url_for('static_content', group='images', filename='pause.svg')}}" alt = "Pause" title = "Pause" / > < / a > < / td >
2021-07-14 04:02:24 +00:00
2021-06-22 00:21:53 +00:00
< td class = "title-col inline" > {{watch.title if watch.title is not none and watch.title|length > 0 else watch.url}}
2022-04-12 15:36:29 +00:00
< a class = "external" target = "_blank" rel = "noopener" href = "{{ watch.url.replace('source:','') }}" > < / a >
2022-05-20 14:27:51 +00:00
< a href = "{{url_for('form_share_put_watch', uuid=watch.uuid)}}" > < img style = "height: 1em;display:inline-block;" src = "{{url_for('static_content', group='images', filename='spread.svg')}}" / > < / a >
2022-04-26 08:52:08 +00:00
2022-02-05 22:25:57 +00:00
{%if watch.fetch_backend == "html_webdriver" %}< img style = "height: 1em; display:inline-block;" src = "{{url_for('static_content', group='images', filename='Google-Chrome-icon.png')}}" / > {% endif %}
2021-08-12 10:05:59 +00:00
2021-01-28 17:38:47 +00:00
{% if watch.last_error is defined and watch.last_error != False %}
< div class = "fetch-error" > {{ watch.last_error }}< / div >
{% endif %}
2022-02-04 19:54:20 +00:00
{% if watch.last_notification_error is defined and watch.last_notification_error != False %}
< div class = "fetch-error notification-error" > {{ watch.last_notification_error }}< / div >
{% endif %}
2021-01-30 11:49:36 +00:00
{% if not active_tag %}
< span class = "watch-tag-list" > {{ watch.tag}}< / span >
{% endif %}
2021-01-28 17:38:47 +00:00
< / td >
2022-06-12 10:52:17 +00:00
< td class = "last-checked" > {{watch|format_last_checked_time|safe}}< / td >
2022-06-23 07:41:55 +00:00
< td class = "last-changed" > {% if watch.history_n >=2 and watch.last_changed >0 %}
2021-02-21 19:14:35 +00:00
{{watch.last_changed|format_timestamp_timeago}}
2021-02-04 12:15:39 +00:00
{% else %}
2021-02-21 19:14:35 +00:00
Not yet
2021-02-04 12:15:39 +00:00
{% endif %}
< / td >
2021-02-21 19:14:35 +00:00
< td >
2022-05-20 14:27:51 +00:00
< a { % if watch . uuid in queued_uuids % } disabled = "true" { % endif % } href = "{{ url_for('form_watch_checknow', uuid=watch.uuid, tag=request.args.get('tag')) }}"
2022-04-21 10:52:45 +00:00
class="recheck pure-button button-small pure-button-primary">{% if watch.uuid in queued_uuids %}Queued{% else %}Recheck{% endif %}< / a >
2021-07-14 04:02:24 +00:00
< a href = "{{ url_for('edit_page', uuid=watch.uuid)}}" class = "pure-button button-small pure-button-primary" > Edit< / a >
2022-05-31 21:43:50 +00:00
{% if watch.history_n >= 2 %}
2022-03-31 09:01:07 +00:00
< a href = "{{ url_for('diff_history_page', uuid=watch.uuid) }}" target = "{{watch.uuid}}" class = "pure-button button-small pure-button-primary diff-link" > Diff< / a >
2021-04-03 03:55:43 +00:00
{% else %}
2022-05-31 21:43:50 +00:00
{% if watch.history_n == 1 %}
2021-07-14 04:02:24 +00:00
< a href = "{{ url_for('preview_page', uuid=watch.uuid)}}" target = "{{watch.uuid}}" class = "pure-button button-small pure-button-primary" > Preview< / a >
2021-04-03 03:55:43 +00:00
{% endif %}
2021-01-31 18:55:35 +00:00
{% endif %}
2021-01-28 17:38:47 +00:00
< / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
2021-03-01 10:25:04 +00:00
< ul id = "post-list-buttons" >
{% if has_unviewed %}
< li >
2021-07-14 04:02:24 +00:00
< a href = "{{url_for('mark_all_viewed', tag=request.args.get('tag')) }}" class = "pure-button button-tag " > Mark all viewed< / a >
2021-03-01 10:25:04 +00:00
< / li >
{% endif %}
< li >
2022-05-20 14:27:51 +00:00
< a href = "{{ url_for('form_watch_checknow', tag=active_tag) }}" class = "pure-button button-tag " > Recheck
2021-02-21 19:14:35 +00:00
all {% if active_tag%}in "{{active_tag}}"{%endif%}< / a >
2021-03-01 10:25:04 +00:00
< / li >
2021-03-01 10:51:28 +00:00
< li >
2021-12-27 09:55:43 +00:00
< a href = "{{ url_for('rss', tag=active_tag , token=app_rss_token)}}" > < img alt = "RSS Feed" id = "feed-icon" src = "{{url_for('static_content', group='images', filename='Generic_Feed-icon.svg')}}" height = "15" > < / a >
2021-03-01 10:51:28 +00:00
< / li >
2021-03-01 10:25:04 +00:00
< / ul >
2021-01-28 17:38:47 +00:00
< / div >
2021-01-27 11:39:46 +00:00
< / div >
2021-11-12 10:34:19 +00:00
{% endblock %}