From da0d86603ab84cc090854ed3ea9ee91ea278d944 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 31 May 2019 17:02:03 +0200 Subject: [PATCH] Move license info the install form, don't show it on app market anymore --- src/js/yunohost/controllers/apps.js | 5 ++--- src/locales/en.json | 2 +- src/views/app/app_install.ms | 4 ++++ src/views/app/app_list_install.ms | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index 09fd5ad3..10982dc7 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -143,8 +143,6 @@ app.maintainedColor = maintainedStateToColor(app.maintained); app.installColor = combineColors(app.stateColor, app.levelColor); - app.displayLicense = (app['manifest']['license'] !== undefined - && app['manifest']['license'] !== 'free'); app.updateDate = app.lastUpdate * 1000 || 0; app.isSafe = (app.installColor !== 'danger'); app.isWorking = isWorking ? "isworking" : "notFullyWorking"; @@ -542,7 +540,8 @@ app.helper('appInstallForm', function(appId, manifest, params) { var data = { id: appId, - manifest: manifest + manifest: manifest, + displayLicense: (manifest['license'] !== undefined && manifest['license'] !== 'free') }; formatYunoHostStyleArguments(data.manifest.arguments.install, params); diff --git a/src/locales/en.json b/src/locales/en.json index ca225d52..50596213 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -29,7 +29,6 @@ "app_install_cancel": "Installation cancelled.", "app_install_custom_no_manifest": "No manifest.json file", "app_list": "App list", - "app_license": "License of the app", "app_level": "App level", "app_make_default": "Make default", "app_no_actions": "This application doesn't have any actions", @@ -192,6 +191,7 @@ "label": "Label", "label_for_manifestname": "Label for %s", "level": "level", + "license": "License", "loading": "Loading …", "local_archives": "Local archives", "local_ip": "Local IP", diff --git a/src/views/app/app_install.ms b/src/views/app/app_install.ms index dce1686a..dcf8e017 100644 --- a/src/views/app/app_install.ms +++ b/src/views/app/app_install.ms @@ -19,6 +19,10 @@
{{id}}
{{t 'description'}}
{{description}}
+ {{#displayLicense}} +
{{t 'license'}}
+
{{manifest.license}}
+ {{/displayLicense}}
{{t 'version'}}
{{manifest.version}}
{{t 'multi_instance'}}
diff --git a/src/views/app/app_list_install.ms b/src/views/app/app_list_install.ms index 55cebef3..52a11a5f 100644 --- a/src/views/app/app_list_install.ms +++ b/src/views/app/app_list_install.ms @@ -42,7 +42,6 @@ {{t (concat 'app_state_' state) }} {{t 'level'}} {{levelFormatted}} {{t maintained}} - {{#displayLicense}}{{license}}{{/displayLicense}}
{{description}}