From 495c3f25e9a3173989735b20a595e0c0a64f9768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <36558727+Xhofe@users.noreply.github.com> Date: Thu, 31 Dec 2020 16:15:15 +0800 Subject: [PATCH] =?UTF-8?q?:new:=20=E6=A3=80=E6=9F=A5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++---- conf.yml.example | 1 + conf/config.go | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6f4c5534cb3..9055c587593 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,16 @@ #### TODO - [x] 排序 -- [ ] 文件预览 +- [x] 文件预览 - [x] 图片 - [x] 视频 - [x] 音频 - - [ ] 文档 - [x] `Readme`渲染 - [x] 密码加密 - [ ] 搜索与翻页 -- [ ] 文件直链 +- [x] 文件直链 - [ ] 路径优化 -- [ ] 缓存 +- [x] 缓存 ### 如何使用 diff --git a/conf.yml.example b/conf.yml.example index 442ca969baa..3bc567f6bd0 100644 --- a/conf.yml.example +++ b/conf.yml.example @@ -6,6 +6,7 @@ info: footer_text: Xhofe's Blog #网页底部文字 footer_url: https://www.nn.ci #网页底部文字链接 music_img: https://img.oez.cc/2020/12/19/0f8b57866bdb5.gif #预览音乐文件时的图片 + check_update: true #前端是否显示更新 server: port: "5244" #程序监听端口 search: true #是否开启搜索接口,开启搜索之后密码和根目录都会失效,所以前端暂时不做搜索 diff --git a/conf/config.go b/conf/config.go index 9426a8b802d..a880cff19f7 100644 --- a/conf/config.go +++ b/conf/config.go @@ -9,6 +9,7 @@ type Config struct { FooterText string `yaml:"footer_text" json:"footer_text"` FooterUrl string `yaml:"footer_url" json:"footer_url"` MusicImg string `yaml:"music_img" json:"music_img"` + CheckUpdate bool `yaml:"check_update" json:"check_update"` } `yaml:"info"` Server struct{ Port string `yaml:"port"`//端口