Minor diff page improvements - list should be sorted 'newest first' and no need to include the current version to compare against (#716)

This commit is contained in:
dgtlmoon
2022-06-23 10:16:05 +02:00
committed by GitHub
parent 83555a9991
commit dbd9b470d7
2 changed files with 2 additions and 2 deletions

View File

@@ -830,7 +830,7 @@ def changedetection_app(config=None, datastore_o=None):
newest=newest_version_file_contents,
previous=previous_version_file_contents,
extra_stylesheets=extra_stylesheets,
versions=dates[1:],
versions=dates[:-1], # All except current/last
uuid=uuid,
newest_version_timestamp=dates[-1],
current_previous_version=str(previous_version),

View File

@@ -22,7 +22,7 @@
{% if versions|length >= 1 %}
<label for="diff-version">Compare newest (<span id="current-v-date"></span>) with</label>
<select id="diff-version" name="previous_version">
{% for version in versions %}
{% for version in versions|reverse %}
<option value="{{version}}" {% if version== current_previous_version %} selected="" {% endif %}>
{{version}}
</option>