diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js index ae606a38..4ea7a5a0 100644 --- a/src/js/yunohost/controllers/tools.js +++ b/src/js/yunohost/controllers/tools.js @@ -95,6 +95,27 @@ ); } }); + + // Upgrade a specific apps + app.get('#/upgrade/apps/:app', function (c) { + c.confirm( + y18n.t('tools'), + y18n.t('confirm_update_specific_app', [c.params['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 +193,4 @@ }); }); -})(); \ No newline at end of file +})(); diff --git a/src/locales/en.json b/src/locales/en.json index 13e1ab1c..ed117563 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 %s?", "confirm_upnp_enable": "Are you sure you want to enable UPnP?", "confirm_upnp_disable": "Are you sure you want to disable UPnP?", "connection": "Connection", @@ -255,6 +256,8 @@ "system_update": "System update", "system_upgrade": "System upgrade", "system_upgrade_btn": "Upgrade", + "system_upgrade_all_applications_btn": "Upgrade all applications", + "system_upgrade_all_packages_btn": "Upgrade all packages", "tcp": "TCP", "time_since_update": "Time since update: ", "tools": "Tools", diff --git a/src/views/update/update.ms b/src/views/update/update.ms index 1dd7d6e9..c28e0d4e 100644 --- a/src/views/update/update.ms +++ b/src/views/update/update.ms @@ -26,7 +26,7 @@ {{/packages}}
{{else}}