mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Silly typo issues + improve readability
This commit is contained in:
parent
9e3b3dccb6
commit
d2b0b0207d
1 changed files with 8 additions and 6 deletions
|
@ -489,12 +489,14 @@
|
||||||
// App installation form
|
// App installation form
|
||||||
app.get('#/apps/install/:app', function (c) {
|
app.get('#/apps/install/:app', function (c) {
|
||||||
c.api('/apps?raw', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/apps?raw', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||||
if (dataraw[v['id']]['state'] === "validated")
|
var app_name = c.params["app"];
|
||||||
|
var app_infos = data[app_name];
|
||||||
|
if (app_infos['state'] === "validated")
|
||||||
{
|
{
|
||||||
dataraw[v['id']]['state'] = "official";
|
app_infos['state'] = "official";
|
||||||
}
|
}
|
||||||
var state_color = stateToColor(data[c.params['app']]['state']);
|
var state_color = stateToColor(app_infos['state']);
|
||||||
var level_color = levelToColor(parseInt(data[c.params['app']]['level']));
|
var level_color = levelToColor(parseInt(app_infos['level']));
|
||||||
var is_safe_for_install_color = combineColors(state_color, level_color);
|
var is_safe_for_install_color = combineColors(state_color, level_color);
|
||||||
|
|
||||||
if ((is_safe_for_install_color === "warning") || (is_safe_for_install_color === "danger"))
|
if ((is_safe_for_install_color === "warning") || (is_safe_for_install_color === "danger"))
|
||||||
|
@ -504,8 +506,8 @@
|
||||||
y18n.t("confirm_install_app_"+is_safe_for_install_color),
|
y18n.t("confirm_install_app_"+is_safe_for_install_color),
|
||||||
function(){
|
function(){
|
||||||
c.appInstallForm(
|
c.appInstallForm(
|
||||||
c.params['app'],
|
app_name,
|
||||||
data[c.params['app']].manifest,
|
app_infos.manifest,
|
||||||
c.params
|
c.params
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue