From 4fbf44f0b5798d46fbed1df193743864c6bad0ad Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 27 Dec 2018 20:26:14 +0100 Subject: [PATCH] [fix] Admin was asking confirmation for official apps --- src/js/yunohost/controllers/apps.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index 4a478781..2d1c2601 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -59,7 +59,7 @@ c.api('/apps?raw', function (dataraw) { // http://api.yunohost.org/#!/app/app_list_get_8 var apps = [] $.each(data['apps'], function(k, v) { - if (dataraw[v['id']]['state'] === "validated") + if (dataraw[v['id']]['state'] === "validated") { dataraw[v['id']]['state'] = "official"; } @@ -489,6 +489,10 @@ // App installation form app.get('#/apps/install/:app', function (c) { c.api('/apps?raw', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8 + if (dataraw[v['id']]['state'] === "validated") + { + dataraw[v['id']]['state'] = "official"; + } var state_color = stateToColor(data[c.params['app']]['state']); var level_color = levelToColor(parseInt(data[c.params['app']]['level'])); var is_safe_for_install_color = combineColors(state_color, level_color);