mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
No more notion of official/community apps, update filter for high-quality apps instead
This commit is contained in:
parent
426bd60d8a
commit
3e3f75dc72
3 changed files with 7 additions and 8 deletions
|
@ -75,11 +75,10 @@
|
||||||
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;
|
||||||
// Keep only the first instance of each app and remove community not working apps
|
// Keep only the first instance of each app and remove not working apps
|
||||||
if (!v['id'].match(/__[0-9]{1,5}$/) && (dataraw[v['id']]['repository'] === 'yunohost' || state !== 'notworking')) {
|
if (!v['id'].match(/__[0-9]{1,5}$/) && (state !== 'notworking')) {
|
||||||
|
|
||||||
dataraw[v['id']]['installable'] = (!v['installed'] || dataraw[v['id']].manifest.multi_instance)
|
dataraw[v['id']]['installable'] = (!v['installed'] || dataraw[v['id']].manifest.multi_instance)
|
||||||
dataraw[v['id']]['isCommunity'] = !(dataraw[v['id']]['repository'] === 'yunohost');
|
|
||||||
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);
|
||||||
|
@ -89,6 +88,7 @@
|
||||||
dataraw[v['id']]['updateDate'] = dataraw[v['id']]['lastUpdate'] * 1000 || 0;
|
dataraw[v['id']]['updateDate'] = dataraw[v['id']]['lastUpdate'] * 1000 || 0;
|
||||||
dataraw[v['id']]['isSafe'] = (dataraw[v['id']]['installColor'] !== 'danger');
|
dataraw[v['id']]['isSafe'] = (dataraw[v['id']]['installColor'] !== 'danger');
|
||||||
dataraw[v['id']]['isWorking'] = isWorking ? "isworking" : "notFullyWorking";
|
dataraw[v['id']]['isWorking'] = isWorking ? "isworking" : "notFullyWorking";
|
||||||
|
dataraw[v['id']]['isHighQuality'] = (state === "high-quality") ? "ishighquality" : "";
|
||||||
|
|
||||||
jQuery.extend(dataraw[v['id']], v);
|
jQuery.extend(dataraw[v['id']], v);
|
||||||
apps.push(dataraw[v['id']]);
|
apps.push(dataraw[v['id']]);
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"app_state": "Application state: ",
|
"app_state": "Application state: ",
|
||||||
"app_state_inprogress": "In progress",
|
"app_state_inprogress": "In progress",
|
||||||
"app_state_notworking": "Not working",
|
"app_state_notworking": "Not working",
|
||||||
"app_state_official": "Official",
|
"app_state_highquality": "High quality",
|
||||||
"app_state_working": "Working",
|
"app_state_working": "Working",
|
||||||
"application": "Application",
|
"application": "Application",
|
||||||
"applications": "Applications",
|
"applications": "Applications",
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"no_user_to_add": "No more users to add.",
|
"no_user_to_add": "No more users to add.",
|
||||||
"non_compatible_api": "Non-compatible API",
|
"non_compatible_api": "Non-compatible API",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"only_official_apps": "Only official apps",
|
"only_highquality_apps": "Only high-quality apps",
|
||||||
"only_working_apps": "Only working apps",
|
"only_working_apps": "Only working apps",
|
||||||
"open": "Open",
|
"open": "Open",
|
||||||
"operations": "Operations",
|
"operations": "Operations",
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</button>
|
</button>
|
||||||
<ul id="dropdownFilter" class="dropdown-menu" data-filter="isworking" role="menu">
|
<ul id="dropdownFilter" class="dropdown-menu" data-filter="isworking" role="menu">
|
||||||
<li role="presentation" class="button dropdownFilter" data-filter="isworking"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'only_working_apps'}}</a></li>
|
<li role="presentation" class="button dropdownFilter" data-filter="isworking"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'only_working_apps'}}</a></li>
|
||||||
<li role="presentation" class="button dropdownFilter" data-filter="official"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'only_official_apps'}}</a></li>
|
<li role="presentation" class="button dropdownFilter" data-filter="ishighquality"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'only_highquality_apps'}}</a></li>
|
||||||
<li role="presentation" class="button dropdownFilter" data-filter="*"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'all_apps'}}</a></li>
|
<li role="presentation" class="button dropdownFilter" data-filter="*"><a class="menu-item" role="menu-item" tabindex="-1">{{t 'all_apps'}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,11 +34,10 @@
|
||||||
|
|
||||||
<div class="list-group grid">
|
<div class="list-group grid">
|
||||||
{{#apps}}
|
{{#apps}}
|
||||||
<div class="app-card panel panel-default {{status}} {{state}} {{isWorking}} {{level}}-level">
|
<div class="app-card panel panel-default {{status}} {{state}} {{isWorking}} {{isHighQuality}} {{level}}-level">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h2 class="app-title">{{name}}</h2>
|
<h2 class="app-title">{{name}}</h2>
|
||||||
<div class="category">
|
<div class="category">
|
||||||
{{#isCommunity}} <span class="label label-info label-as-badge app-status">{{t 'community'}}</span>{{/isCommunity}}
|
|
||||||
<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>
|
||||||
{{#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}}
|
||||||
|
|
Loading…
Reference in a new issue