mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-23 01:46:09 +00:00
Compare commits
2 Commits
3045-api-a
...
ui-preview
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e8e8e44a1 | ||
|
|
3d3654c2c1 |
@@ -124,10 +124,10 @@ def _jinja2_filter_datetime(watch_obj, format="%Y-%m-%d %H:%M:%S"):
|
|||||||
|
|
||||||
@app.template_filter('format_timestamp_timeago')
|
@app.template_filter('format_timestamp_timeago')
|
||||||
def _jinja2_filter_datetimestamp(timestamp, format="%Y-%m-%d %H:%M:%S"):
|
def _jinja2_filter_datetimestamp(timestamp, format="%Y-%m-%d %H:%M:%S"):
|
||||||
if timestamp == False:
|
if not timestamp:
|
||||||
return 'Not yet'
|
return 'Not yet'
|
||||||
|
|
||||||
return timeago.format(timestamp, time.time())
|
return timeago.format(int(timestamp), time.time())
|
||||||
|
|
||||||
|
|
||||||
@app.template_filter('pagination_slice')
|
@app.template_filter('pagination_slice')
|
||||||
|
|||||||
@@ -40,9 +40,13 @@ if (selectElement) {
|
|||||||
if (selectedOption) {
|
if (selectedOption) {
|
||||||
if (selectedOption.previousElementSibling) {
|
if (selectedOption.previousElementSibling) {
|
||||||
document.getElementById('btn-previous').href = "?version=" + selectedOption.previousElementSibling.value;
|
document.getElementById('btn-previous').href = "?version=" + selectedOption.previousElementSibling.value;
|
||||||
|
} else {
|
||||||
|
document.getElementById('btn-previous').remove()
|
||||||
}
|
}
|
||||||
if (selectedOption.nextElementSibling) {
|
if (selectedOption.nextElementSibling) {
|
||||||
document.getElementById('btn-next').href = "?version=" + selectedOption.nextElementSibling.value;
|
document.getElementById('btn-next').href = "?version=" + selectedOption.nextElementSibling.value;
|
||||||
|
} else {
|
||||||
|
document.getElementById('btn-next').remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane-inner" id="text">
|
<div class="tab-pane-inner" id="text">
|
||||||
<div class="snapshot-age">{{ watch.snapshot_text_ctime|format_timestamp_timeago }}</div>
|
<div class="snapshot-age">{{ current_version|format_timestamp_timeago }}</div>
|
||||||
<span class="ignored">Grey lines are ignored</span> <span class="triggered">Blue lines are triggers</span>
|
<span class="ignored">Grey lines are ignored</span> <span class="triggered">Blue lines are triggers</span>
|
||||||
<span class="tip"><strong>Pro-tip</strong>: Highlight text to add to ignore filters</span>
|
<span class="tip"><strong>Pro-tip</strong>: Highlight text to add to ignore filters</span>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user