feat(editor): allow passing placeholder down
This commit is contained in:
parent
1443e23f18
commit
daa2ed3b1c
@ -175,12 +175,14 @@ const {
|
|||||||
isEditEnabled = true,
|
isEditEnabled = true,
|
||||||
bottomActions = [],
|
bottomActions = [],
|
||||||
showSave = false,
|
showSave = false,
|
||||||
|
placeholder = '',
|
||||||
} = defineProps<{
|
} = defineProps<{
|
||||||
modelValue: string,
|
modelValue: string,
|
||||||
uploadCallback?: UploadCallback,
|
uploadCallback?: UploadCallback,
|
||||||
isEditEnabled?: boolean,
|
isEditEnabled?: boolean,
|
||||||
bottomActions?: BottomAction[],
|
bottomActions?: BottomAction[],
|
||||||
showSave?: boolean,
|
showSave?: boolean,
|
||||||
|
placeholder?: string,
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'save'])
|
const emit = defineEmits(['update:modelValue', 'save'])
|
||||||
@ -269,6 +271,10 @@ const editor = useEditor({
|
|||||||
if (!isEditEnabled) {
|
if (!isEditEnabled) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (placeholder !== '') {
|
||||||
|
return placeholder
|
||||||
|
}
|
||||||
|
|
||||||
return t('input.editor.placeholder')
|
return t('input.editor.placeholder')
|
||||||
},
|
},
|
||||||
|
@ -258,7 +258,7 @@
|
|||||||
"identifier": "Project Identifier",
|
"identifier": "Project Identifier",
|
||||||
"identifierPlaceholder": "The project identifier goes here…",
|
"identifierPlaceholder": "The project identifier goes here…",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"descriptionPlaceholder": "The projects description goes here…",
|
"descriptionPlaceholder": "Enter a description for this project, hit '/' for more options…",
|
||||||
"color": "Color",
|
"color": "Color",
|
||||||
"success": "The project was successfully updated."
|
"success": "The project was successfully updated."
|
||||||
},
|
},
|
||||||
@ -383,7 +383,7 @@
|
|||||||
"title": "Title",
|
"title": "Title",
|
||||||
"titlePlaceholder": "The saved filter title goes here…",
|
"titlePlaceholder": "The saved filter title goes here…",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"descriptionPlaceholder": "The description goes here…",
|
"descriptionPlaceholder": "Add a description for this filter here, hit '/' for more options…",
|
||||||
"includeNulls": "Include Tasks which don't have a value set",
|
"includeNulls": "Include Tasks which don't have a value set",
|
||||||
"requireAll": "Require all filters to be true for a task to show up",
|
"requireAll": "Require all filters to be true for a task to show up",
|
||||||
"showDoneTasks": "Show Done Tasks",
|
"showDoneTasks": "Show Done Tasks",
|
||||||
@ -744,7 +744,7 @@
|
|||||||
"loading": "Loading comments…",
|
"loading": "Loading comments…",
|
||||||
"edited": "edited {date}",
|
"edited": "edited {date}",
|
||||||
"creating": "Creating comment…",
|
"creating": "Creating comment…",
|
||||||
"placeholder": "Add your comment…",
|
"placeholder": "Add your comment, hit '/' for more options…",
|
||||||
"comment": "Comment",
|
"comment": "Comment",
|
||||||
"delete": "Delete this comment",
|
"delete": "Delete this comment",
|
||||||
"deleteText1": "Are you sure you want to delete this comment?",
|
"deleteText1": "Are you sure you want to delete this comment?",
|
||||||
@ -758,7 +758,7 @@
|
|||||||
"1week": "1 week"
|
"1week": "1 week"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"placeholder": "Click here to enter a description…",
|
"placeholder": "Enter a description, hit '/' for more options…",
|
||||||
"empty": "No description available yet."
|
"empty": "No description available yet."
|
||||||
},
|
},
|
||||||
"assignee": {
|
"assignee": {
|
||||||
@ -909,7 +909,7 @@
|
|||||||
"namePlaceholder": "The team's name goes here…",
|
"namePlaceholder": "The team's name goes here…",
|
||||||
"nameRequired": "Please specify a name.",
|
"nameRequired": "Please specify a name.",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"descriptionPlaceholder": "The teams description goes here…",
|
"descriptionPlaceholder": "Describe the team here, hit '/' for more options…",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
"member": "Member"
|
"member": "Member"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user