fix(print): hide description editor when no description is present

This commit is contained in:
kolaente 2026-05-20 17:58:13 +02:00
parent bc7c2059aa
commit 995aad3d53
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,7 @@
<template>
<div>
<div
:class="{'d-print-none': isEmpty}"
>
<h3>
<span class="icon is-grey">
<Icon icon="align-left" />
@ -48,6 +50,7 @@ import CustomTransition from '@/components/misc/CustomTransition.vue'
import Editor from '@/components/input/AsyncEditor'
import { clearEditorDraft } from '@/helpers/editorDraftStorage'
import { isEditorContentEmpty } from '@/helpers/editorContentEmpty'
import type { ITask } from '@/modelTypes/ITask'
import { useTaskStore } from '@/stores/tasks'
@ -82,6 +85,8 @@ const changeTimeout = ref<ReturnType<typeof setTimeout> | null>(null)
const descriptionStorageKey = computed(() => `task-description-${props.modelValue.id}`)
const isEmpty = computed(() => isEditorContentEmpty(description.value))
async function saveWithDelay() {
if (description.value === props.modelValue.description) {
hasChanges.value = false