功能优化和新增 (#956)

* feat: 首页项目拖拽排序功能

* feat: 增加首页项目拖拽排序增加只能管理员进行, 排序失败元素回到原本位置

* perf: 新建文章以后直接进入到编辑文章页面

* perf: 优化文档打开时或刷新时样式闪动问题

* perf: 优化表格样式

* feat: 支持上传视频功能

* feat: 视频样式调整

* feat: 直接粘贴视频上传功能

* perf: 优化markdown目录显示
This commit is contained in:
zhanzhenping
2024-07-05 15:31:34 +08:00
committed by GitHub
parent 710d5bcf50
commit 1ea922106d
12 changed files with 243 additions and 131 deletions

View File

@@ -79,7 +79,7 @@ avatar=/static/images/headimgurl.jpg
token_size=12
#上传文件的后缀,如果不限制后缀可以设置为 *
upload_file_ext=txt|doc|docx|xls|xlsx|ppt|pptx|pdf|7z|rar|jpg|jpeg|png|gif
upload_file_ext=txt|doc|docx|xls|xlsx|ppt|pptx|pdf|7z|rar|jpg|jpeg|png|gif|mp4|webm|avi
#上传的文件大小限制
# - 如果不填写, 则默认1GB如果希望超过1GB必须带单位

View File

@@ -106,9 +106,9 @@ func GetDefaultCover() string {
return URLForWithCdnImage(web.AppConfig.DefaultString("cover", "/static/images/book.jpg"))
}
// 获取允许的商城文件的类型.
// 获取允许的上传文件的类型.
func GetUploadFileExt() []string {
ext := web.AppConfig.DefaultString("upload_file_ext", "png|jpg|jpeg|gif|txt|doc|docx|pdf")
ext := web.AppConfig.DefaultString("upload_file_ext", "png|jpg|jpeg|gif|txt|doc|docx|pdf|mp4")
temp := strings.Split(ext, "|")
@@ -201,7 +201,7 @@ func GetExportOutputPath() string {
return exportOutputPath
}
// 判断是否是允许商城的文件类型.
// 判断是否是允许上传的文件类型.
func IsAllowUploadFileExt(ext string) bool {
if strings.HasPrefix(ext, ".") {