[UI] Render docs link on ExtensionIcon only on docs panel.

This commit is contained in:
Fabio Manganiello 2024-02-26 23:46:31 +01:00
parent 8079b08a54
commit 5ab66e6746
Signed by: blacklight
GPG key ID: D90FBA7F76362774
2 changed files with 8 additions and 2 deletions

View file

@ -1,8 +1,9 @@
<template>
<div class="extension-icon" :style="{ width: `${size}`, height: `${size}` }">
<a :href="docsUrl" target="_blank">
<a :href="docsUrl" target="_blank" v-if="withDocsLink">
<img :src="iconUrl" :alt="extensionName" :title="extensionName" />
</a>
<img :src="iconUrl" :alt="extensionName" :title="extensionName" v-else />
</div>
</template>
@ -18,6 +19,11 @@ export default {
type: String,
default: '1.75em',
},
withDocsLink: {
type: Boolean,
default: false,
},
},
computed: {

View file

@ -3,7 +3,7 @@
<header>
<h2>
<a class="title" :href="extension.doc_url" target="_blank">
<ExtensionIcon :name="extension.name" size="2em" />
<ExtensionIcon :name="extension.name" size="2em" with-docs-link />
<span class="name" v-text="extension.name" />
</a>
</h2>