summaryrefslogtreecommitdiff
path: root/src/main/resources/config.json
blob: d862a3cadd8d2b3c120d80d4c28c3d0d5e488b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
    "system": {
        "authentication": "shiro"
    },
    "global": {
        "uploadPath": {
            "windows": "upload",
            "mac": "upload",
            "linux": "upload"
        },
        "uploadForm": "yyyyMMdd",
        "tokenPath": {
            "windows": "token.json",
            "mac": "token.json",
            "linux": "token.json"
        },
        "allowRegister": true,
        "allowLogin": true,
        "loadParticle": false,
        "anonymousUser": {
            "visible": true,
            "downloadable": true
        },
        "css": [
            {
                "selector": ".random-image",
                "style": [
                    "background-color: #800080",
                    "color: #FFF300"
                ]
            },
            {
                "selector": ".jq-nav-item a",
                "style": "color: #FFF300"
            },
            {
                "selector": ".jq-nav",
                "style": "background-color: #800080"
            },
            {
                "selector": [
                    ".content-box",
                    ".form-control"
                ],
                "style": "background: rgba(255,255,255,0.8)"
            },
            {
                "selector": ".btn",
                "style": "opacity: 0.8"
            }
        ],
        "background": {
            "useImage": true,
            "imageIndex": 0,
            "imageList": [
                "https://fakedog.xyz/homedb/srcm/upload/20180123/bg_1.jpg",
                "https://fakedog.xyz/homedb/srcm/upload/20180123/bg_2.jpg",
                "https://fakedog.xyz/homedb/srcm/upload/20180123/bg_3.jpg"
            ],
            "random": true,
            "listGenerator": {
                "enable": true,
                "prefix": "https://fakedog.xyz/image/background/anime/bg_",
                "suffix": ".jpg",
                "start": 1,
                "end": 158
            }
        }
    },
    "user": {
        "pageSize": 30,
        "password": {
            "minLength": 6,
            "maxLength": 20
        },
        "emailVerify": false,
        "emailConfig": {
            "host": "",
            "port": 587,
            "personal": "efo",
            "from": "[email protected]",
            "key": "123456",
            "ssl": false
        },
        "usernameMatch": {
            "pattern": "^[a-zA-Z][a-zA-Z0-9]{3,15}$",
            "description": "用户名只能使用长度为4到16位的英文字母和数字,且必须以字母开始"
        },
        "defaultAuth": {
            "isDownloadable": true,
            "isUploadable": true,
            "isDeletable": false,
            "isUpdatable": false,
            "isVisible": true
        },
        "orderBy": "id desc"
    },
    "download": {
        "pageSize": 30,
        "orderBy": "id desc"
    },
    "auth": {
        "pageSize": 30,
        "orderBy": "id desc",
        "default": {
            "isDownloadable": true,
            "isUploadable": true,
            "isDeletable": true,
            "isUpdatable": true,
            "isVisible": true
        }
    },
    "file": {
        "pageSize": 30,
        "maxSize": "10240 MB",
        "tag": {
            "require": false,
            "maxLength": 5,
            "maxSize": 5
        },
        "orderBy": "id desc",
        "coverIfExists": false,
        "linkRule": {
            "custom": "/{year}/{month}/{day}/{randomId}{fileSuffix}",
            "support": [
                "{year}",
                "{month}",
                "{day}",
                "{author}",
                "{fileName}",
                "{categoryName}",
                "{randomId}",
                "{fileSuffix}"
            ]
        },
        "suffixMatch": {
            "pattern": "[a-zA-Z0-9]{0,10}",
            "description": "文件后缀只能包括数字和字母且长度不超过10"
        },
        "defaultAuth": {
            "isDownloadable": true,
            "isUploadable": true,
            "isDeletable": true,
            "isUpdatable": true,
            "isVisible": true
        }
    }
}