diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js index ae606a38..7ae0a468 100644 --- a/src/js/yunohost/controllers/tools.js +++ b/src/js/yunohost/controllers/tools.js @@ -95,6 +95,29 @@ ); } }); + + // Upgrade a specific apps + app.get('#/upgrade/apps/:app', function (c) { + c.confirm( + y18n.t('tools'), + // confirm_update_apps and confirm_update_packages + y18n.t('confirm_update_specific_app'), + function(){ + c.api('/upgrade/apps?app='+c.params['app'].toLowerCase(), + function(data) { + // 'log' is a reserved name, maybe in handlebars + data.logs = data.log; + c.view('upgrade/upgrade', data); + }, 'PUT'); + + }, + function(){ + store.clear('slide'); + c.redirect('#/update'); + } + ); + }); + // Download SSL Certificate Authority app.get('#/tools/ca', function (c) { @@ -172,4 +195,4 @@ }); }); -})(); \ No newline at end of file +})(); diff --git a/src/locales/en.json b/src/locales/en.json index 13e1ab1c..7071d9dc 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -76,6 +76,7 @@ "confirm_uninstall": "Are you sure you want to uninstall %s ?", "confirm_update_apps": "Are you sure you want to update all applications?", "confirm_update_packages": "Are you sure you want to update all packages?", + "confirm_update_specific_app": "Are you sure you want to update this application ?", "confirm_upnp_enable": "Are you sure you want to enable UPnP?", "confirm_upnp_disable": "Are you sure you want to disable UPnP?", "connection": "Connection", diff --git a/src/views/update/update.ms b/src/views/update/update.ms index 1dd7d6e9..24c81be2 100644 --- a/src/views/update/update.ms +++ b/src/views/update/update.ms @@ -42,9 +42,14 @@ {{#if apps}}
{{#apps}} -
-

{{label}} {{id}}

-
+
+
+

{{label}} {{id}}

+
+ +
{{/apps}}