diff --git a/reposilite-frontend/src/components/card/ArtifactSnippet.vue b/reposilite-frontend/src/components/card/ArtifactSnippet.vue index e03b02a91..1c2b0bcf0 100644 --- a/reposilite-frontend/src/components/card/ArtifactSnippet.vue +++ b/reposilite-frontend/src/components/card/ArtifactSnippet.vue @@ -18,6 +18,7 @@ import XmlTag from './XmlTag.vue' import CodeString from './CodeString.vue' import CodeBrackets from "./CodeBrackets.vue" +import { computed, ref } from "vue"; defineProps({ configuration: { @@ -29,23 +30,28 @@ defineProps({ required: true } }) + +const preElement = ref() +const content = computed(() => preElement?.value?.textContent) + +defineExpose({ content }) \ No newline at end of file + diff --git a/reposilite-frontend/src/components/card/RepositorySnippet.vue b/reposilite-frontend/src/components/card/RepositorySnippet.vue index b5b9f1965..cd7a165bd 100644 --- a/reposilite-frontend/src/components/card/RepositorySnippet.vue +++ b/reposilite-frontend/src/components/card/RepositorySnippet.vue @@ -18,7 +18,7 @@ import XmlTag from './XmlTag.vue' import CodeString from './CodeString.vue' import CodeBrackets from "./CodeBrackets.vue" -import {computed} from 'vue' +import { computed, ref } from 'vue' const props = defineProps({ configuration: { @@ -40,29 +40,33 @@ const gradleId = computed(() => { return gradleIdUppercase.charAt(0).toLowerCase() + gradleIdUppercase.slice(1) }) +const preElement = ref(null) +const content = computed(() => preElement?.value?.textContent) + +defineExpose({ content })