mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Simply / fix stuff related to maintained state + add detailed explanation
This commit is contained in:
parent
6b15bc50a6
commit
511842d7f0
3 changed files with 21 additions and 23 deletions
|
@ -46,7 +46,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function stateToMaintained(state) {
|
function maintainedStateToColor(state) {
|
||||||
if ( state === "request_help" ) {
|
if ( state === "request_help" ) {
|
||||||
return 'info';
|
return 'info';
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
return 'danger';
|
return 'danger';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 'default';
|
return 'success';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,27 +87,19 @@
|
||||||
{
|
{
|
||||||
dataraw[v['id']]['state'] = "high-quality";
|
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 state = dataraw[v['id']]['state'];
|
||||||
var levelFormatted = parseInt(dataraw[v['id']]['level']);
|
var levelFormatted = parseInt(dataraw[v['id']]['level']);
|
||||||
var isWorking = (state === 'working' || state === "high-quality") && levelFormatted > 0;
|
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
|
// Keep only the first instance of each app and remove not working apps
|
||||||
if (!v['id'].match(/__[0-9]{1,5}$/) && (state !== 'notworking')) {
|
if (!v['id'].match(/__[0-9]{1,5}$/) && (state !== 'notworking')) {
|
||||||
|
|
||||||
|
@ -115,6 +107,7 @@
|
||||||
dataraw[v['id']]['levelFormatted'] = isNaN(levelFormatted) ? '?' : levelFormatted;
|
dataraw[v['id']]['levelFormatted'] = isNaN(levelFormatted) ? '?' : levelFormatted;
|
||||||
dataraw[v['id']]['levelColor'] = levelToColor(levelFormatted);
|
dataraw[v['id']]['levelColor'] = levelToColor(levelFormatted);
|
||||||
dataraw[v['id']]['stateColor'] = stateToColor(state);
|
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']]['installColor'] = combineColors(dataraw[v['id']]['stateColor'], dataraw[v['id']]['levelColor']);
|
||||||
dataraw[v['id']]['displayLicense'] = (dataraw[v['id']]['manifest']['license'] !== undefined
|
dataraw[v['id']]['displayLicense'] = (dataraw[v['id']]['manifest']['license'] !== undefined
|
||||||
&& dataraw[v['id']]['manifest']['license'] !== 'free');
|
&& dataraw[v['id']]['manifest']['license'] !== 'free');
|
||||||
|
|
|
@ -198,6 +198,8 @@
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"mailbox_quota_description": "For example, 700M is a CD, 4700M is a DVD.",
|
"mailbox_quota_description": "For example, 700M is a CD, 4700M is a DVD.",
|
||||||
"mailbox_quota_placeholder": "Leave empty or set to 0 to disable.",
|
"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_apps": "Manage apps",
|
||||||
"manage_domains": "Manage domains",
|
"manage_domains": "Manage domains",
|
||||||
"manage_users": "Manage users",
|
"manage_users": "Manage users",
|
||||||
|
@ -230,7 +232,8 @@
|
||||||
"only_decent_quality_apps": "Only decent quality apps",
|
"only_decent_quality_apps": "Only decent quality apps",
|
||||||
"open": "Open",
|
"open": "Open",
|
||||||
"operations": "Operations",
|
"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",
|
"os": "OS",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"password_confirmation": "Password confirmation",
|
"password_confirmation": "Password confirmation",
|
||||||
|
@ -280,8 +283,10 @@
|
||||||
"reception": "Reception",
|
"reception": "Reception",
|
||||||
"refresh_app_list": "Refresh list",
|
"refresh_app_list": "Refresh list",
|
||||||
"remove_access": "Remove access",
|
"remove_access": "Remove access",
|
||||||
"request_adoption": "Request for adoption",
|
"request_adoption": "waiting adoption",
|
||||||
"request_help": "Request for help",
|
"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",
|
"restore": "Restore",
|
||||||
"run": "Run",
|
"run": "Run",
|
||||||
"running": "Running",
|
"running": "Running",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="label label-{{stateColor}} label-as-badge app-state">{{t state}}</span>
|
<span class="label label-{{stateColor}} label-as-badge app-state">{{t state}}</span>
|
||||||
<a target="_BLANK" href="https://yunohost.org/#/packaging_apps_levels"><span class="label label-{{levelColor}} label-as-badge app-level" title="{{t 'app_level'}}">{{t 'level'}} {{levelFormatted}}</span></a>
|
<a target="_BLANK" href="https://yunohost.org/#/packaging_apps_levels"><span class="label label-{{levelColor}} label-as-badge app-level" title="{{t 'app_level'}}">{{t 'level'}} {{levelFormatted}}</span></a>
|
||||||
|
<span class="label label-{{maintainedColor}} label-as-badge maintained-status" title="{{t (concat maintained '_details') }}"> {{t maintained}}</span>
|
||||||
{{#displayLicense}}<span class="label label-default app-license" title="{{t 'app_license'}}">{{license}}</span>{{/displayLicense}}
|
{{#displayLicense}}<span class="label label-default app-license" title="{{t 'app_license'}}">{{license}}</span>{{/displayLicense}}
|
||||||
</div>
|
</div>
|
||||||
<div class="app-card-desc">{{description}}</div>
|
<div class="app-card-desc">{{description}}</div>
|
||||||
|
@ -48,7 +49,6 @@
|
||||||
<div class="app-card-date-maintainer">
|
<div class="app-card-date-maintainer">
|
||||||
<i class="fa-refresh"></i> {{formatDate updateDate day="numeric" month="long" year="numeric"}} -
|
<i class="fa-refresh"></i> {{formatDate updateDate day="numeric" month="long" year="numeric"}} -
|
||||||
<span title="{{t 'current_maintainer_title'}}" class="maintained"></span><i class="fa-user"></i> {{manifest.maintainer.name}}</span>
|
<span title="{{t 'current_maintainer_title'}}" class="maintained"></span><i class="fa-user"></i> {{manifest.maintainer.name}}</span>
|
||||||
{{^maintained}}<span class="label label-{{MaintainedColor}} label-as-badge MaintainedStatus" title="{{t MaintainedStatus}}"><i class="fa-warning"></i> {{t MaintainedStatus}}</span>{{/maintained}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<a href="{{git.url}}" target="_BLANK" type="button" role="button" class="btn btn-default col-xs-4">
|
<a href="{{git.url}}" target="_BLANK" type="button" role="button" class="btn btn-default col-xs-4">
|
||||||
|
|
Loading…
Add table
Reference in a new issue