feat: force the short to include an image
This commit is contained in:
@@ -131,6 +131,10 @@ export default function ShortEditor() {
|
||||
const updatePage = useUpdatePage()
|
||||
|
||||
const savePage = async () => {
|
||||
if (!values.images?.length) {
|
||||
toast.error(t("Please upload at least one image."))
|
||||
return
|
||||
}
|
||||
const baseValues = {
|
||||
...values,
|
||||
characterId: site.data?.characterId,
|
||||
|
||||
@@ -232,5 +232,6 @@
|
||||
"Content": "内容",
|
||||
"Home": "主页",
|
||||
"Archives": "归档",
|
||||
"About": "关于"
|
||||
"About": "关于",
|
||||
"Please upload at least one image." : "请至少上传一张图片。"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user