fix(project): show description in title attribute without html
Resolves https://community.vikunja.io/t/feedback-to-vikunja-0-24-0/2557/6 (cherry picked from commit 4aeb228c3a69218535fddd00378f511a6b5d2b13)
This commit is contained in:
parent
8f5273600a
commit
52fb43a6f7
@ -35,7 +35,7 @@
|
|||||||
<BaseButton
|
<BaseButton
|
||||||
class="project-button"
|
class="project-button"
|
||||||
:aria-label="project.title"
|
:aria-label="project.title"
|
||||||
:title="project.description"
|
:title="textOnlyDescription"
|
||||||
:to="{
|
:to="{
|
||||||
name: 'project.index',
|
name: 'project.index',
|
||||||
params: { projectId: project.id}
|
params: { projectId: project.id}
|
||||||
@ -53,6 +53,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import {computed} from 'vue'
|
||||||
import type {IProject} from '@/modelTypes/IProject'
|
import type {IProject} from '@/modelTypes/IProject'
|
||||||
|
|
||||||
import BaseButton from '@/components/base/BaseButton.vue'
|
import BaseButton from '@/components/base/BaseButton.vue'
|
||||||
@ -68,6 +69,10 @@ const props = defineProps<{
|
|||||||
const {background, blurHashUrl} = useProjectBackground(() => props.project)
|
const {background, blurHashUrl} = useProjectBackground(() => props.project)
|
||||||
|
|
||||||
const projectStore = useProjectStore()
|
const projectStore = useProjectStore()
|
||||||
|
|
||||||
|
const textOnlyDescription = computed(() => {
|
||||||
|
return props.project.description ? props.project.description.replace(/<[^>]*>/g, '') : ''
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user