From d40731aa76b0075c055c96ea677cfc45a87e8dd0 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Tue, 15 Sep 2020 20:46:56 +0200 Subject: [PATCH] Change only the current app label Co-authored-by: Kayou --- src/js/yunohost/controllers/apps.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index fc8ae896..62e52626 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -732,6 +732,8 @@ app.post('#/apps/:app/changelabel', function (c) { c.api('GET', '/users/permissions?short', {}, function(data_permissions) { for (perm of data_permissions.permissions) { + if (perm.split('.')[0] == c.params['app']) + { if ('show_tile_' + perm in c.params) { show_tile = "True"; } else { @@ -739,6 +741,7 @@ } new_label = c.params["label_" + perm] c.api('PUT', '/users/permissions/' + perm, {show_tile: show_tile, label: new_label}, function(data) {}); + } } c.redirect_to('#/apps/'+ c.params['app']); });