diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json index 0b1df19af..e8607e7d2 100644 --- a/frontend/src/i18n/lang/en.json +++ b/frontend/src/i18n/lang/en.json @@ -226,6 +226,7 @@ "unfavorite": "Remove this project from favorites", "openSettingsMenu": "Open project settings menu", "description": "Project description", + "favoriteDescription": "This project has all tasks marked as favorites.", "create": { "header": "New project", "titlePlaceholder": "The project's title goes here…", diff --git a/frontend/src/views/project/ProjectInfo.vue b/frontend/src/views/project/ProjectInfo.vue index 1b1080674..8fda1bed1 100644 --- a/frontend/src/views/project/ProjectInfo.vue +++ b/frontend/src/views/project/ProjectInfo.vue @@ -27,11 +27,14 @@ import {computed} from 'vue' import DOMPurify from 'dompurify' import {useProjectStore} from '@/stores/projects' +import {useI18n} from 'vue-i18n' const props = defineProps<{ projectId: number }>() +const {t} = useI18n() + const projectStore = useProjectStore() const project = computed(() => projectStore.projects[props.projectId]) const htmlDescription = computed(() => { @@ -39,6 +42,10 @@ const htmlDescription = computed(() => { if (description === '') { return '' } + + if (project.value.id === -1) { + return t('project.favoriteDescription') + } return DOMPurify.sanitize(description, {ADD_ATTR: ['target']}) })