mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-23 16:23:41 +00:00
55 lines
1.7 KiB
HTML
55 lines
1.7 KiB
HTML
{% extends '_main.html' %}
|
|
|
|
{% block title %}Releases - Bazarr{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
.badge {
|
|
vertical-align: text-bottom;
|
|
margin-left: 10px;
|
|
}
|
|
</style>
|
|
{% endblock head %}
|
|
|
|
{% block bcleft %}
|
|
|
|
{% endblock bcleft %}
|
|
|
|
{% block bcright %}
|
|
|
|
{% endblock bcright %}
|
|
|
|
{% block body %}
|
|
<div class="container-fluid" style="padding-top: 3em;">
|
|
<span id="releases"></span>
|
|
</div>
|
|
{% endblock body %}
|
|
|
|
{% block tail %}
|
|
<script>
|
|
$(document).ready(function () {
|
|
$.ajax({
|
|
url: "{{ url_for('api.systemreleases') }}"
|
|
}).done(function (data) {
|
|
var releases = '';
|
|
data.data.forEach(appendFunc);
|
|
|
|
function appendFunc(value) {
|
|
entries = '';
|
|
value['body'].forEach(appendEntry);
|
|
releases = releases + '<h3 style="display:inline;">'+value['name']+'</h3>'
|
|
releases += ' — '+value['date']
|
|
releases += ((value['prerelease']) ? '<span class="badge badge-danger">Development</span>' : '<span class="badge badge-info">Master</span>')
|
|
releases += ((value['current']) ? '<span class="badge badge-secondary">Currently Installed</span>' : '')
|
|
releases += '</h4><hr/><p><b>From newest to oldest:</b></p><ul>'+entries+'</ul>';
|
|
|
|
function appendEntry(entry) {
|
|
entries = entries + '<li>'+entry.replace(/(\s\[.*?\])\(.*?\)/, '')+'</li>'; // removing the commit url
|
|
}
|
|
}
|
|
|
|
$('#releases').html(releases);
|
|
});
|
|
})
|
|
</script>
|
|
{% endblock tail %}
|