mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)
This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
This commit is contained in:
parent
0572c78938
commit
a38ba634a4
17 changed files with 239 additions and 223 deletions
|
@ -69,7 +69,6 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
|||
ctx.Data["PageIsEdit"] = true
|
||||
ctx.Data["IsNewFile"] = isNewFile
|
||||
ctx.Data["RequireHighlightJS"] = true
|
||||
ctx.Data["RequireEasyMDE"] = true
|
||||
canCommit := renderCommitRights(ctx)
|
||||
|
||||
treePath := cleanUploadFileName(ctx.Repo.TreePath)
|
||||
|
@ -200,7 +199,6 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b
|
|||
ctx.Data["PageHasPosted"] = true
|
||||
ctx.Data["IsNewFile"] = isNewFile
|
||||
ctx.Data["RequireHighlightJS"] = true
|
||||
ctx.Data["RequireEasyMDE"] = true
|
||||
ctx.Data["TreePath"] = form.TreePath
|
||||
ctx.Data["TreeNames"] = treeNames
|
||||
ctx.Data["TreePaths"] = treePaths
|
||||
|
@ -544,7 +542,6 @@ func DeleteFilePost(ctx *context.Context) {
|
|||
func UploadFile(ctx *context.Context) {
|
||||
ctx.Data["PageIsUpload"] = true
|
||||
ctx.Data["RequireTribute"] = true
|
||||
ctx.Data["RequireEasyMDE"] = true
|
||||
upload.AddUploadContext(ctx, "repo")
|
||||
canCommit := renderCommitRights(ctx)
|
||||
treePath := cleanUploadFileName(ctx.Repo.TreePath)
|
||||
|
@ -580,7 +577,6 @@ func UploadFilePost(ctx *context.Context) {
|
|||
form := web.GetForm(ctx).(*forms.UploadRepoFileForm)
|
||||
ctx.Data["PageIsUpload"] = true
|
||||
ctx.Data["RequireTribute"] = true
|
||||
ctx.Data["RequireEasyMDE"] = true
|
||||
upload.AddUploadContext(ctx, "repo")
|
||||
canCommit := renderCommitRights(ctx)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue