[fix] Use repository term instead of store. JS Cleanup.

This commit is contained in:
opi 2016-03-01 16:08:12 +01:00
parent f0ac9a8476
commit e6b5839328
4 changed files with 17 additions and 18 deletions

File diff suppressed because one or more lines are too long

View file

@ -26,15 +26,14 @@
app.get('#/apps/install', function (c) { app.get('#/apps/install', function (c) {
c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8 c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
c.api('/apps?raw', function(dataraw) { // http://api.yunohost.org/#!/app/app_list_get_8 c.api('/apps?raw', function(dataraw) { // http://api.yunohost.org/#!/app/app_list_get_8
// Keep only uninstalled apps, or multi-instance apps
apps = []; apps = [];
$.each(data['apps'], function(k, v) { $.each(data['apps'], function(k, v) {
// Keep only uninstalled apps, or multi-instance apps
if ((!v['installed'] || dataraw[v['id']].manifest.multi_instance == "true") && !v['id'].match(/__[0-9]{1,5}$/)) { if ((!v['installed'] || dataraw[v['id']].manifest.multi_instance == "true") && !v['id'].match(/__[0-9]{1,5}$/)) {
if (dataraw[v['id']]['store']!='yunohost') // Check app source
{ dataraw[v['id']]['official'] = (dataraw[v['id']]['repository'] == 'yunohost');
dataraw[v['id']]['isUnofficial']=true;
} jQuery.extend(dataraw[v['id']], v);
dataraw[v['id']]['description']=v.description;
apps.push(dataraw[v['id']]); apps.push(dataraw[v['id']]);
} }
}); });

View file

@ -94,8 +94,8 @@
"available_apps" : "Available apps", "available_apps" : "Available apps",
"no_installed_apps" : "No installed apps.", "no_installed_apps" : "No installed apps.",
"app_list" : "App list", "app_list" : "App list",
"app_store": "Store : ", "app_repository": "Application origin: ",
"app_state": "State : ", "app_state": "Application state: ",
"app_state_validated": "Validated", "app_state_validated": "Validated",
"app_state_working": "Working", "app_state_working": "Working",
"app_state_inprogress": "In progress", "app_state_inprogress": "In progress",

View file

@ -17,14 +17,14 @@
<a href="#/apps/install/{{id}}" class="list-group-item slide" title="{{t 'install'}}"> <a href="#/apps/install/{{id}}" class="list-group-item slide" title="{{t 'install'}}">
<span class="fa-chevron-right pull-right"></span> <span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading"> <h2 class="list-group-item-heading">
{{manifest.name}} <small>{{manifest.id}}</small> {{name}} <small>{{id}}</small>
{{#installed}}<span class="badge badge-success">{{t 'installed'}}</span>{{/installed}} {{#installed}}<span class="badge badge-success" title="{{t 'status'}}">{{t 'installed'}}</span>{{/installed}}
</h2> </h2>
<p class="list-group-item-text">{{manifest.description}}</p> <p class="list-group-item-text">{{description}}</p>
{{#isUnofficial}} {{^official}}
<p class="list-group-item-text">{{t 'app_store'}} {{store}}</p> <p class="list-group-item-text">{{t 'app_repository'}}{{repository}}</p>
<p class="list-group-item-text">{{t 'app_state'}} {{state}}</p> <p class="list-group-item-text">{{t 'app_state'}}{{state}}</p>
{{/isUnofficial}} {{/official}}
</a> </a>
{{/apps}} {{/apps}}