diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index d1dfc773..25d396d8 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -46,7 +46,7 @@ } } - function stateToMaintained(state) { + function maintainedStateToColor(state) { if ( state === "request_help" ) { return 'info'; } @@ -57,7 +57,7 @@ return 'danger'; } else { - return 'default'; + return 'success'; } } @@ -87,27 +87,19 @@ { dataraw[v['id']]['state'] = "high-quality"; } + if ( dataraw[v['id']]['maintained'] === false ) + { + dataraw[v['id']]['maintained'] = "orphaned"; + } + else if ( dataraw[v['id']]['maintained'] === true ) + { + dataraw[v['id']]['maintained'] = "maintained"; + } + var state = dataraw[v['id']]['state']; var levelFormatted = parseInt(dataraw[v['id']]['level']); var isWorking = (state === 'working' || state === "high-quality") && levelFormatted > 0; - if ( dataraw[v['id']]['maintained'] !== true ) - { - // Set the maintained status at Orphaned if the value of 'maintained' is 'false' - if ( dataraw[v['id']]['maintained'] === false ) - { - dataraw[v['id']]['MaintainedStatus'] = "orphaned"; - } - // Otherwise, set 'MaintainedStatus' at the value of 'maintained' and set 'maintained' as 'false' - else - { - dataraw[v['id']]['MaintainedStatus'] = dataraw[v['id']]['maintained']; - dataraw[v['id']]['maintained'] = false; - } - // Set the color for the label - dataraw[v['id']]['MaintainedColor'] = stateToMaintained(dataraw[v['id']]['MaintainedStatus']); - } - // Keep only the first instance of each app and remove not working apps if (!v['id'].match(/__[0-9]{1,5}$/) && (state !== 'notworking')) { @@ -115,6 +107,7 @@ dataraw[v['id']]['levelFormatted'] = isNaN(levelFormatted) ? '?' : levelFormatted; dataraw[v['id']]['levelColor'] = levelToColor(levelFormatted); dataraw[v['id']]['stateColor'] = stateToColor(state); + dataraw[v['id']]['maintainedColor'] = maintainedStateToColor(dataraw[v['id']]['maintained']); dataraw[v['id']]['installColor'] = combineColors(dataraw[v['id']]['stateColor'], dataraw[v['id']]['levelColor']); dataraw[v['id']]['displayLicense'] = (dataraw[v['id']]['manifest']['license'] !== undefined && dataraw[v['id']]['manifest']['license'] !== 'free'); diff --git a/src/locales/en.json b/src/locales/en.json index 2d756115..2416f30e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -198,6 +198,8 @@ "logout": "Logout", "mailbox_quota_description": "For example, 700M is a CD, 4700M is a DVD.", "mailbox_quota_placeholder": "Leave empty or set to 0 to disable.", + "maintained": "maintained", + "maintained_details": "This app was maintained by its maintainer in the last few months.", "manage_apps": "Manage apps", "manage_domains": "Manage domains", "manage_users": "Manage users", @@ -230,7 +232,8 @@ "only_decent_quality_apps": "Only decent quality apps", "open": "Open", "operations": "Operations", - "orphaned": "Orphaned", + "orphaned": "not maintained", + "orphaned_details": "This app is not maintained anymore. It may still be working but won't receive any upgrade. Feel free to come and revive it!", "os": "OS", "password": "Password", "password_confirmation": "Password confirmation", @@ -280,8 +283,10 @@ "reception": "Reception", "refresh_app_list": "Refresh list", "remove_access": "Remove access", - "request_adoption": "Request for adoption", - "request_help": "Request for help", + "request_adoption": "waiting adoption", + "request_adoption_details": "The current maintainer would like to stop maintaining this app. Feel free to propose yourself as the new maintainer!", + "request_help": "need help", + "request_help_details": "The current maintainer would like some help with the maintainance of this app. Feel free to come contribute on it!", "restore": "Restore", "run": "Run", "running": "Running", diff --git a/src/views/app/app_list_install.ms b/src/views/app/app_list_install.ms index d2d4bee9..a7deb500 100644 --- a/src/views/app/app_list_install.ms +++ b/src/views/app/app_list_install.ms @@ -41,6 +41,7 @@
{{t state}} {{t 'level'}} {{levelFormatted}} + {{t maintained}} {{#displayLicense}}{{license}}{{/displayLicense}}
{{description}}
@@ -48,7 +49,6 @@
{{formatDate updateDate day="numeric" month="long" year="numeric"}} - {{manifest.maintainer.name}} - {{^maintained}} {{t MaintainedStatus}}{{/maintained}}