From f60cdc26087eb7f6cfdcc8dbc6115ff25f389c3b Mon Sep 17 00:00:00 2001 From: axolotle Date: Wed, 9 Nov 2022 17:23:16 +0100 Subject: [PATCH] AppCatalogDetails: condition warning & add 'not_relevant' sso/ldap value --- app/src/views/app/AppCatalogDetails.vue | 55 ++++++++++++++----------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/app/src/views/app/AppCatalogDetails.vue b/app/src/views/app/AppCatalogDetails.vue index 656b4d6c..9e101c55 100644 --- a/app/src/views/app/AppCatalogDetails.vue +++ b/app/src/views/app/AppCatalogDetails.vue @@ -10,9 +10,9 @@

{{ app.name }}

-

+

- {{ app.alternatives }} + {{ app.alternativeTo }}

@@ -35,24 +35,27 @@
- -
    -
  • - - {{ antifeature.title }} - -
  • -
+ - +
@@ -61,10 +64,10 @@ {{ $t('app.preview.integration.archs') }} {{ app.integration.archs }} - + {{ $t(`app.preview.integration.ldap.${app.integration.ldap}`) }} - + {{ $t(`app.preview.integration.sso.${app.integration.sso}`) }} @@ -115,20 +118,21 @@ export default { }, async created () { - const { id, name, version, potential_alternative_to: alternatives, ...app } = await api.get('apps/manifest?app=' + this.appId) + const { id, name, version, potential_alternative_to: alternativesTo, ...app } = await api.get('apps/manifest?app=' + this.appId) const archs = app.integration.architectures const integration = { archs: Array.isArray(archs) ? archs.join(this.$i18n.t('words.separator')) : archs, - ldap: app.integration.ldap === '?' ? null : app.integration.ldap, - sso: app.integration.sso === '?' ? null : app.integration.sso, + ldap: app.integration.ldap === 'not_relevant' ? null : app.integration.ldap, + sso: app.integration.sso === 'not_relevant' ? null : app.integration.sso, multi_instance: app.integration.multi_instance, resources: { ram: app.integration.ram.runtime, disk: app.integration.disk } } - + const preInstall = formatI18nField(app.notifications.pre_install.main) + const antifeatures = app.antifeatures.length ? app.antifeatures.map((af) => this.antifeatures[af]) : null const links = [ ...['website', 'admindoc', 'code'].map((key) => ([key, app.upstream[key]])), ['package', app.remote.url], @@ -138,13 +142,16 @@ export default { this.app = { id, name, - alternatives: alternatives && alternatives.length ? alternatives.join(this.$i18n.t('words.separator')) : null, + alternativeTo: alternativesTo && alternativesTo.length + ? alternativesTo.join(this.$i18n.t('words.separator')) + : null, description: formatI18nField(app.doc.DESCRIPTION), image: app.image, demo: app.upstream.demo, version, - preInstall: formatI18nField(app.notifications.pre_install.main), - antifeatures: app.antifeatures?.map((af) => this.antifeatures[af]), + preInstall, + antifeatures, + hasWarning: !!(preInstall || antifeatures), integration, links }