fix(project): show description in title attribute without html
Some checks failed
continuous-integration/drone/push Build is failing

Resolves https://community.vikunja.io/t/feedback-to-vikunja-0-24-0/2557/6
This commit is contained in:
kolaente 2024-09-11 18:23:43 +02:00
parent b52d6dbf59
commit 4aeb228c3a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

@ -35,7 +35,7 @@
<BaseButton
class="project-button"
:aria-label="project.title"
:title="project.description"
:title="textOnlyDescription"
:to="{
name: 'project.index',
params: { projectId: project.id}
@ -53,6 +53,7 @@
</template>
<script lang="ts" setup>
import {computed} from 'vue'
import type {IProject} from '@/modelTypes/IProject'
import BaseButton from '@/components/base/BaseButton.vue'
@ -68,6 +69,10 @@ const props = defineProps<{
const {background, blurHashUrl} = useProjectBackground(() => props.project)
const projectStore = useProjectStore()
const textOnlyDescription = computed(() => {
return props.project.description ? props.project.description.replace(/<[^>]*>/g, '') : ''
})
</script>
<style lang="scss" scoped>