diff --git a/src/gulp b/src/gulp new file mode 100755 index 00000000..f4b80cc4 --- /dev/null +++ b/src/gulp @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('gulp-cli')(); diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index 25eb5605..c48436bd 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -66,7 +66,14 @@ var state = dataraw[v['id']]['state']; var levelFormatted = parseInt(dataraw[v['id']]['level']); var isWorking = (state === 'working' || state === 'official') && levelFormatted > 0; - var isFeatured = (state === 'official' || dataraw[v['id']]['featured']); + // To be a High Quality app, the app have to be over the level 7 + var isHighQuality = ( dataraw[v['id']]['high_quality'] && parseInt(dataraw[v['id']]['level']) > 7 ); + // Update the status high_quality with the previous condition + dataraw[v['id']]['high_quality'] = isHighQuality; + // To be a Featured app, the app have to be flag as High Quality. + var isFeatured = ( dataraw[v['id']]['featured'] && dataraw[v['id']]['high_quality']); + // Update the status featured with the previous condition + dataraw[v['id']]['featured'] = isFeatured; // Keep only the first instance of each app and remove community not working apps if (!v['id'].match(/__[0-9]{1,5}$/) && (dataraw[v['id']]['repository'] === 'yunohost' || state !== 'notworking')) { @@ -81,7 +88,8 @@ dataraw[v['id']]['updateDate'] = dataraw[v['id']]['lastUpdate'] * 1000 || 0; dataraw[v['id']]['isSafe'] = (dataraw[v['id']]['installColor'] !== 'danger'); dataraw[v['id']]['isWorking'] = isWorking ? "isworking" : "notFullyWorking"; - dataraw[v['id']]['isFeatured'] = isFeatured; + dataraw[v['id']]['isHighQuality'] = isHighQuality ? "isHighQuality" : "What I'm suppose to put here?"; + dataraw[v['id']]['isFeatured'] = isFeatured ? "isFeatured" : "What I'm suppose to put here?"; jQuery.extend(dataraw[v['id']], v); apps.push(dataraw[v['id']]); diff --git a/src/locales/en.json b/src/locales/en.json index 142edc44..adddaa72 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -146,7 +146,7 @@ "everyone_has_access": "Everyone has access.", "experimental_warning": "Warning: this feature is experimental and not consider stable, you shouldn't be using it except if you know what you are doing.", "featured": "Featured", - "featured_and_official_apps": "Featured and official apps", + "featured_apps": "Only Featured apps", "filesystem": "Filesystem", "firewall": "Firewall", "footer_version": "Powered by YunoHost %s (%s).", @@ -156,6 +156,8 @@ "gateway": "Gateway: ", "good_practices_about_admin_password": "You are now about to define a new admin password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).", "good_practices_about_user_password": "You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).", + "high_quality": "High Quality", + "high_quality_apps": "Only High Quality apps", "home": "Home", "hook_adminjs_group_configuration": "Configuration", "hook_conf_cron": "Regular tasks", diff --git a/src/views/app/app_list_install.ms b/src/views/app/app_list_install.ms index ceec1a98..12ec0d7e 100644 --- a/src/views/app/app_list_install.ms +++ b/src/views/app/app_list_install.ms @@ -25,7 +25,8 @@ @@ -35,7 +36,7 @@
{{#apps}} -
+

{{name}}

@@ -43,7 +44,8 @@ {{t state}} {{t 'level'}} {{levelFormatted}} {{#displayLicense}}{{license}}{{/displayLicense}} - {{#featured}} {{t 'featured'}}{{/featured}} + {{#featured}}{{t 'featured'}}{{/featured}} + {{#high_quality}}{{t 'high_quality'}}{{/high_quality}}
{{description}}