Same change as earlier in main.js, simpler way to set the yunohost version footer

This commit is contained in:
Alexandre Aubin 2020-04-19 01:23:43 +02:00
parent 85beae3a98
commit a572552866

View file

@ -14,11 +14,8 @@
c.flash('warning', y18n.t('warning_first_user'));
}
c.api("GET", "/diagnosis/show?full", {}, function(data) {
c.hideLoader();
basesystem = data.reports.filter(function(r) { return r.id == "basesystem"; })[0];
version_info = basesystem.items.filter(function(i) { return (i.meta && i.meta.test && i.meta.test == "ynh_versions"); })[0];
$('#yunohost-version').html(y18n.t('footer_version', [version_info.data.main_version, version_info.data.repo]));
c.api('GET', '/versions', {}, function(data) {
$('#yunohost-version').html(y18n.t('footer_version', [data.yunohost.version, data.yunohost.repo]));
});
});
});