From f0a4428f564d5331b6d6e71b6bd486a7b29634b0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 5 Feb 2019 00:24:17 +0000 Subject: [PATCH] In fact we do need this so that the footer gets the correct value even if opening a new tab while already logged in --- src/js/yunohost/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/yunohost/main.js b/src/js/yunohost/main.js index c1e14ecf..ea00fe6c 100644 --- a/src/js/yunohost/main.js +++ b/src/js/yunohost/main.js @@ -149,6 +149,13 @@ // Store url sam.store.set('url', window.location.hostname + '/yunohost/api'); + if (sam.store.get('connected')) { + this.api('/diagnosis', function(diagnosis) { + versions = diagnosis.packages; + $('#yunohost-version').html(y18n.t('footer_version', [versions.yunohost.version, versions.yunohost.repo])); + }); + } + // Flash messages var flashMessage = $('#flashMessage'); $('#toggle-btn', flashMessage).click(function(e) {