kopia lustrzana https://github.com/dgtlmoon/changedetection.io
rodzic
53b9640ac5
commit
8bcc277310
|
@ -584,6 +584,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|||
previous=previous_version_file_contents,
|
||||
extra_stylesheets=extra_stylesheets,
|
||||
versions=dates[1:],
|
||||
uuid=uuid,
|
||||
newest_version_timestamp=dates[0],
|
||||
current_previous_version=str(previous_version),
|
||||
current_diff_url=watch['url'])
|
||||
|
@ -606,11 +607,15 @@ def changedetection_app(config=None, datastore_o=None):
|
|||
flash("No history found for the specified link, bad link?", "error")
|
||||
return redirect(url_for('index'))
|
||||
|
||||
print(watch)
|
||||
with open(list(watch['history'].values())[-1], 'r') as f:
|
||||
newest = list(watch['history'].keys())[-1]
|
||||
with open(watch['history'][newest], 'r') as f:
|
||||
content = f.readlines()
|
||||
|
||||
output = render_template("preview.html", content=content, extra_stylesheets=extra_stylesheets)
|
||||
output = render_template("preview.html",
|
||||
content=content,
|
||||
extra_stylesheets=extra_stylesheets,
|
||||
current_diff_url=watch['url'],
|
||||
uuid=uuid)
|
||||
return output
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
<ul class="pure-menu-list">
|
||||
{% if current_user.is_authenticated or not has_password %}
|
||||
{% if not current_diff_url %}
|
||||
<li class="pure-menu-item">
|
||||
<a href="/backup" class="pure-menu-link">BACKUP</a>
|
||||
</li>
|
||||
|
@ -42,6 +43,11 @@
|
|||
<li class="pure-menu-item">
|
||||
<a href="/settings" class="pure-menu-link">SETTINGS</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="pure-menu-item">
|
||||
<a href="{{ url_for('edit_page', uuid=uuid) }}" class="pure-menu-link">EDIT</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://github.com/dgtlmoon/changedetection.io">Website Change Detection and Notification.</a>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
</form>
|
||||
<del>Removed text</del>
|
||||
<ins>Inserted Text</ins>
|
||||
<a href="{{ url_for('preview_page', uuid=uuid) }}">Show current snapshot</a>
|
||||
</div>
|
||||
|
||||
<div id="diff-jump">
|
||||
|
|
Ładowanie…
Reference in New Issue