feat(compose): 正文内嵌隐藏块并升级 Markdown 编辑器

去掉整帖可见性表单,改为 :::hide 按块脱敏;工具栏补齐代码块、链接/图片对话框与粘贴拖拽上传。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 04:58:20 +08:00
parent d1155cbd64
commit 01e2fd05ca
19 changed files with 1867 additions and 471 deletions

View File

@@ -96,8 +96,6 @@ type CreatePostRequest struct {
Content string `json:"content" binding:"required,min=1"`
Tags string `json:"tags"`
PostType string `json:"post_type"`
ContentAccess string `json:"content_access"`
AccessPoints int `json:"access_points"`
TypeMeta string `json:"type_meta"`
AttachmentIDs []uint `json:"attachment_ids"`
}
@@ -118,8 +116,6 @@ func (h *Handlers) CreatePost(c *gin.Context) {
Content: req.Content,
Tags: req.Tags,
PostType: req.PostType,
ContentAccess: req.ContentAccess,
AccessPoints: req.AccessPoints,
TypeMeta: req.TypeMeta,
Status: status,
AttachmentIDs: req.AttachmentIDs,
@@ -141,8 +137,6 @@ type UpdatePostRequest struct {
Title string `json:"title" binding:"omitempty,min=1,max=256"`
Content string `json:"content" binding:"omitempty,min=1"`
Tags string `json:"tags"`
ContentAccess *string `json:"content_access"`
AccessPoints *int `json:"access_points"`
TypeMeta *string `json:"type_meta"`
AttachmentIDs *[]uint `json:"attachment_ids"`
}
@@ -165,8 +159,6 @@ func (h *Handlers) UpdatePost(c *gin.Context) {
Title: req.Title,
Content: req.Content,
Tags: req.Tags,
ContentAccess: req.ContentAccess,
AccessPoints: req.AccessPoints,
TypeMeta: req.TypeMeta,
AttachmentIDs: req.AttachmentIDs,
})