From c8cd77b2653b303d47e2d6334f6bfba4777215b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Mon, 27 Sep 2021 19:35:22 +0800 Subject: [PATCH] :sparkles: defaultSortOrder --- conf.yml.example | 1 + conf/config.go | 1 + 2 files changed, 2 insertions(+) diff --git a/conf.yml.example b/conf.yml.example index cb081584..57a07d3c 100644 --- a/conf.yml.example +++ b/conf.yml.example @@ -7,6 +7,7 @@ info: check_update: true #前端是否显示更新 script: #自定义脚本,可以是脚本的链接,也可以直接是脚本内容,如document.querySelector('body').style="background-image:url('https://api.mtyqx.cn/api/random.php');background-attachment:fixed" autoplay: true #视频是否自动播放 + sort: name-descend #列名-排序方向(descend|ascend) preview: text: [txt,htm,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,yml,go,sh,c,cpp,h,hpp] #要预览的文本文件的后缀,可以自行添加 server: diff --git a/conf/config.go b/conf/config.go index d0051b64..2ffac7cf 100644 --- a/conf/config.go +++ b/conf/config.go @@ -22,6 +22,7 @@ type Config struct { CheckUpdate bool `yaml:"check_update" json:"check_update"` Script string `yaml:"script" json:"script"` Autoplay bool `yaml:"autoplay" json:"autoplay"` + Sort string `yaml:"sort" json:"sort"` Preview struct { Url string `yaml:"url" json:"url"` PreProcess []string `yaml:"pre_process" json:"pre_process"`