Skip to content

Commit 67c4355

Browse files
committed
Feat:支持上传前转换为webp格式
1 parent d9725d2 commit 67c4355

26 files changed

+41
-11
lines changed
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

functions/api/manage/sysConfig/page.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,36 @@ export async function getPageConfig(db, env) {
132132
placeholder: 'default',
133133
category: '客户端设置',
134134
},
135+
{
136+
id: 'defaultConvertToWebp',
137+
label: '默认转换WebP',
138+
type: 'boolean',
139+
default: false,
140+
tooltip: '上传前将图片转换为WebP格式,可有效减小文件体积',
141+
category: '客户端设置',
142+
},
143+
{
144+
id: 'defaultCustomerCompress',
145+
label: '默认开启压缩',
146+
type: 'boolean',
147+
default: true,
148+
tooltip: '上传前在本地进行压缩,仅对图片文件生效',
149+
category: '客户端设置',
150+
},
151+
{
152+
id: 'defaultCompressBar',
153+
label: '默认压缩阈值',
154+
placeholder: '5',
155+
tooltip: '图片大小超过此值将自动压缩,单位MB,范围1-20',
156+
category: '客户端设置',
157+
},
158+
{
159+
id: 'defaultCompressQuality',
160+
label: '默认期望大小',
161+
placeholder: '4',
162+
tooltip: '压缩后图片大小期望值,单位MB,范围0.5-压缩阈值',
163+
category: '客户端设置',
164+
},
135165
{
136166
id: 'loginBkImg',
137167
label: '登录页背景图',

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><link rel="apple-touch-icon" href="/logo.png"><link rel="mask-icon" href="/logo.png" color="#f4b400"><meta name="description" content="Sanyue ImgHub - A modern file hosting platform"><meta name="keywords" content="Sanyue, ImgHub, file hosting, image hosting, cloud storage"><meta name="author" content="SanyueQi"><title>Sanyue ImgHub</title><script defer="defer" src="/js/chunk-vendors.780b6559.js"></script><script defer="defer" src="/js/app.1c8e2b69.js"></script><link href="/css/chunk-vendors.4363ed49.css" rel="stylesheet"><link href="/css/app.52df53e3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
1+
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><link rel="apple-touch-icon" href="/logo.png"><link rel="mask-icon" href="/logo.png" color="#f4b400"><meta name="description" content="Sanyue ImgHub - A modern file hosting platform"><meta name="keywords" content="Sanyue, ImgHub, file hosting, image hosting, cloud storage"><meta name="author" content="SanyueQi"><title>Sanyue ImgHub</title><script defer="defer" src="/js/chunk-vendors.780b6559.js"></script><script defer="defer" src="/js/app.5c467426.js"></script><link href="/css/chunk-vendors.4363ed49.css" rel="stylesheet"><link href="/css/app.52df53e3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

index.html.gz

0 Bytes
Binary file not shown.

js/459.6a11b983.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

js/459.6a11b983.js.gz

-19.3 KB
Binary file not shown.

js/459.6a11b983.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

js/459.6a11b983.js.map.gz

-49.9 KB
Binary file not shown.

js/531.5ff0f58b.js.map.gz

-301 KB
Binary file not shown.

0 commit comments

Comments
 (0)