diff --git a/bundles/org.openhab.ui/web/src/components/addons/addon-info-table.vue b/bundles/org.openhab.ui/web/src/components/addons/addon-info-table.vue index 12f0cba1b..459e35736 100644 --- a/bundles/org.openhab.ui/web/src/components/addons/addon-info-table.vue +++ b/bundles/org.openhab.ui/web/src/components/addons/addon-info-table.vue @@ -55,12 +55,14 @@ export default { value: sourceName }) - info.push({ - id: 'author', - title: 'Provided By', - value: this.addon.author, - afterIcon: (this.addon.verifiedAuthor) ? 'checkmark_seal_fill' : '' - }) + if (this.addon.author) { + info.push({ + id: 'author', + title: 'Provided By', + value: this.addon.author, + afterIcon: (this.addon.verifiedAuthor) ? 'checkmark_seal_fill' : '' + }) + } if (this.addon.version) { info.push({ @@ -85,7 +87,7 @@ export default { let format if (source === 'eclipse') { format = Formats.eclipse - } else if (source === 'karaf') { + } else if (source === 'karaf' || source === 'jar') { format = Formats.karaf } else if (Object.keys(this.addon.properties).length > 0) { for (const property in this.addon.properties) { @@ -157,7 +159,7 @@ export default { afterIcon: 'chat_bubble_2_fill', linkUrl: 'https://community.openhab.org/search?q=' + this.addon.id }) - } else { + } else if (this.addon.link) { info.push({ id: 'documentationLink', title: 'Documentation', diff --git a/bundles/org.openhab.ui/web/src/pages/settings/addons/addon-details.vue b/bundles/org.openhab.ui/web/src/pages/settings/addons/addon-details.vue index de877172b..b393a53a5 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/addons/addon-details.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/addons/addon-details.vue @@ -226,7 +226,7 @@ export default { addonDescription () { if (!this.descriptionReady) return null if (!this.addon) return null - if (this.addon.description && this.addon.link.indexOf('openhab.org/addons') < 0) return this.addon.description + if (this.addon.description && (!this.addon.link || this.addon.link.indexOf('openhab.org/addons') < 0)) return this.addon.description if (this.parsedDescription) { const firstHeading = this.parsedDescription.match(/ 0) return this.parsedDescription.substring(0, firstHeading.index) @@ -236,7 +236,7 @@ export default { }, docLinkUrl () { if (!this.addon) return '' - if (this.serviceId && this.serviceId !== 'karaf' && this.addon.link) return this.addon.link + if (this.serviceId && this.serviceId !== 'karaf') return this.addon.link ? this.addon.link : '' let url = `https://${this.$store.state.runtimeInfo.buildString === 'Release Build' ? 'www' : 'next'}.openhab.org` + `/addons/${this.addon.type.replace('misc', 'integrations').replace('binding', 'bindings').replace('transformation', 'transformations')}` + `/${this.addon.id}` @@ -329,8 +329,7 @@ export default { }) } else { // perform a few replaces for Discourse "cooked" HTML - let body = this.addon.detailedDescription - if (!body) return + let body = this.addon.detailedDescription ? this.addon.detailedDescription : '' body = body.replace(/
/gm, '
')
         body = body.replace(/<\/pre>/gm, '
') body = body.replace(//gm, '
')