From a5725528660011f7f8d274f559bf82d7ae98b856 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 19 Apr 2020 01:23:43 +0200 Subject: [PATCH] Same change as earlier in main.js, simpler way to set the yunohost version footer --- src/js/yunohost/events.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/js/yunohost/events.js b/src/js/yunohost/events.js index 52d8b49f..2f53c49f 100644 --- a/src/js/yunohost/events.js +++ b/src/js/yunohost/events.js @@ -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])); }); }); });