mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-18 09:44:26 +08:00
perf: 创建项目时增加选择编辑器功能
This commit is contained in:
@@ -122,7 +122,7 @@ func (c *BookController) Setting() {
|
||||
if book.PrivateToken != "" {
|
||||
book.PrivateToken = conf.URLFor("DocumentController.Index", ":key", book.Identify, "token", book.PrivateToken)
|
||||
}
|
||||
fmt.Println("book.PrintState", book.PrintState)
|
||||
|
||||
c.Data["Model"] = book
|
||||
|
||||
}
|
||||
@@ -463,6 +463,7 @@ func (c *BookController) Create() {
|
||||
description := strings.TrimSpace(c.GetString("description", ""))
|
||||
privatelyOwned, _ := strconv.Atoi(c.GetString("privately_owned"))
|
||||
commentStatus := c.GetString("comment_status")
|
||||
editor := c.GetString("editor")
|
||||
itemId, _ := c.GetInt("itemId")
|
||||
|
||||
if bookName == "" {
|
||||
@@ -529,6 +530,7 @@ func (c *BookController) Create() {
|
||||
book.CommentCount = 0
|
||||
book.PrivatelyOwned = privatelyOwned
|
||||
book.CommentStatus = commentStatus
|
||||
|
||||
book.Identify = identify
|
||||
book.DocCount = 0
|
||||
book.MemberId = c.Member.MemberId
|
||||
@@ -538,8 +540,7 @@ func (c *BookController) Create() {
|
||||
book.IsDownload = 1
|
||||
book.AutoRelease = 0
|
||||
book.ItemId = itemId
|
||||
|
||||
book.Editor = "markdown"
|
||||
book.Editor = editor
|
||||
book.Theme = "default"
|
||||
|
||||
if err := book.Insert(c.Lang); err != nil {
|
||||
|
Reference in New Issue
Block a user