85 Commits

Author SHA1 Message Date
dependabot[bot]
38d52c4609 Bump js-yaml from 3.14.1 to 3.14.2 (#875)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 08:47:33 +08:00
dependabot[bot]
2b3f31a204 Bump cipher-base from 1.0.4 to 1.0.6 (#872)
Bumps [cipher-base](https://github.com/crypto-browserify/cipher-base) from 1.0.4 to 1.0.6.
- [Changelog](https://github.com/browserify/cipher-base/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/cipher-base/compare/v1.0.4...v1.0.6)

---
updated-dependencies:
- dependency-name: cipher-base
  dependency-version: 1.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 07:54:10 +08:00
dependabot[bot]
94332ee597 Bump sha.js from 2.4.11 to 2.4.12 (#873)
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11 to 2.4.12.
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 07:53:58 +08:00
dependabot[bot]
aa6dd044ba Bump form-data from 4.0.1 to 4.0.4 (#870)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.1 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.1...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 08:25:56 +08:00
dependabot[bot]
aa9aa31c42 Bump on-headers and compression (#868)
Bumps [on-headers](https://github.com/jshttp/on-headers) and [compression](https://github.com/expressjs/compression). These dependencies needed to be updated together.

Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/on-headers/compare/v1.0.2...v1.1.0)

Updates `compression` from 1.7.4 to 1.8.1
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/1.7.4...v1.8.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 11:09:24 +08:00
dependabot[bot]
bbdb1fb39d Bump brace-expansion from 1.1.11 to 1.1.12 (#866)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 10:00:46 +08:00
dependabot[bot]
b3f3594cd5 Bump pbkdf2 from 3.1.2 to 3.1.3 (#864)
Bumps [pbkdf2](https://github.com/crypto-browserify/pbkdf2) from 3.1.2 to 3.1.3.
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-29 09:51:03 +08:00
dependabot[bot]
c0504fe62f Bump http-proxy-middleware from 2.0.4 to 2.0.9 (#862) 2025-05-29 17:25:24 +08:00
dependabot[bot]
0bc23c796d Bump axios from 0.28.0 to 1.8.2 (#859) 2025-05-29 17:25:04 +08:00
zhendery
011b291e05 fix(水印): 添加水印后编码图片时漏掉了保存质量参数 (#856)
Co-authored-by: zhendery <zhendery@qq.com>
2025-02-15 02:36:56 +08:00
zhendery
effe173d9c fix(svg): svg也需要“缩略图”,复制一份svg到本地缩略图目录,否则从远程服务器拉取可能会比较慢。 (#852) 2025-01-08 06:33:12 +08:00
zhendery
bdd440d38f fix(图片上传): (小概率)修复图片“格式转换”时不同的图使用同一个临时文件导致变成同一张图的问题 (#851) 2025-01-08 06:32:50 +08:00
zhendery
fe5e4d9a67 feat: 添加svg矢量图的支持 (#833) 2024-12-28 20:47:52 +08:00
熊孝兵
66d7a0dce1 Update README.md 2024-12-28 20:46:24 +08:00
dependabot[bot]
4f13d7d5a1 Bump ip and webpack-dev-server (#848)
Removes [ip](https://github.com/indutny/node-ip). It's no longer used after updating ancestor dependency [webpack-dev-server](https://github.com/webpack/webpack-dev-server). These dependencies need to be updated together.


Removes `ip`

Updates `webpack-dev-server` from 4.7.4 to 4.15.2
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/v4.15.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.7.4...v4.15.2)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
- dependency-name: webpack-dev-server
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:25:19 +08:00
dependabot[bot]
093ef71c2c Bump aws/aws-sdk-php from 3.261.13 to 3.336.6 (#849)
Bumps [aws/aws-sdk-php](https://github.com/aws/aws-sdk-php) from 3.261.13 to 3.336.6.
- [Release notes](https://github.com/aws/aws-sdk-php/releases)
- [Commits](https://github.com/aws/aws-sdk-php/compare/3.261.13...3.336.6)

---
updated-dependencies:
- dependency-name: aws/aws-sdk-php
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:24:54 +08:00
dependabot[bot]
4a87a90d5b Bump browserify-sign from 4.2.1 to 4.2.3 (#847)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.3.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.3)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:24:29 +08:00
dependabot[bot]
17cb901046 Bump @babel/traverse from 7.17.3 to 7.26.4 (#846)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.17.3 to 7.26.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.4/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:24:16 +08:00
dependabot[bot]
c0ba47d47d Bump axios from 0.25.0 to 0.28.0 (#845)
Bumps [axios](https://github.com/axios/axios) from 0.25.0 to 0.28.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.28.0/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.25.0...v0.28.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:24:06 +08:00
dependabot[bot]
1d0cb15854 Bump follow-redirects from 1.14.9 to 1.15.9 (#844)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.9 to 1.15.9.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.9...v1.15.9)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:23:51 +08:00
dependabot[bot]
465ff63230 Bump ws from 8.5.0 to 8.18.0 (#843)
Bumps [ws](https://github.com/websockets/ws) from 8.5.0 to 8.18.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.5.0...8.18.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:23:37 +08:00
dependabot[bot]
04a421d3eb Bump webpack-dev-middleware from 5.3.1 to 5.3.4 (#842)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.1 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.1...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:23:26 +08:00
dependabot[bot]
2642719769 Bump webpack from 5.76.1 to 5.97.1 (#841)
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.1 to 5.97.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.1...v5.97.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:23:14 +08:00
dependabot[bot]
4de97fd91e Bump phpseclib/phpseclib from 3.0.19 to 3.0.43 (#840)
Bumps [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) from 3.0.19 to 3.0.43.
- [Release notes](https://github.com/phpseclib/phpseclib/releases)
- [Changelog](https://github.com/phpseclib/phpseclib/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phpseclib/phpseclib/compare/3.0.19...3.0.43)

---
updated-dependencies:
- dependency-name: phpseclib/phpseclib
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:19:17 +08:00
dependabot[bot]
ee93913aac Bump path-to-regexp from 1.8.0 to 1.9.0 (#839)
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:18:59 +08:00
dependabot[bot]
e54c4e551c Bump league/commonmark from 2.3.9 to 2.6.0 (#834)
Bumps [league/commonmark](https://github.com/thephpleague/commonmark) from 2.3.9 to 2.6.0.
- [Release notes](https://github.com/thephpleague/commonmark/releases)
- [Changelog](https://github.com/thephpleague/commonmark/blob/2.6/CHANGELOG.md)
- [Commits](https://github.com/thephpleague/commonmark/compare/2.3.9...2.6.0)

---
updated-dependencies:
- dependency-name: league/commonmark
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:18:45 +08:00
dependabot[bot]
743409726f Bump send and express (#835)
Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `send` from 0.17.2 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.17.2...0.19.0)

Updates `express` from 4.17.3 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.21.2)

---
updated-dependencies:
- dependency-name: send
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:18:07 +08:00
dependabot[bot]
2fa82cc231 Bump elliptic from 6.5.4 to 6.6.1 (#836)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.4 to 6.6.1.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.4...v6.6.1)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:17:56 +08:00
dependabot[bot]
dd4c40d846 Bump cookie and express (#837)
Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.4.2 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.1)

Updates `express` from 4.17.3 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.21.2)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:17:45 +08:00
dependabot[bot]
8acf78dac4 Bump laravel/framework from 9.52.4 to 9.52.17 (#838)
Bumps [laravel/framework](https://github.com/laravel/framework) from 9.52.4 to 9.52.17.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/11.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v9.52.4...v9.52.17)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:17:30 +08:00
dependabot[bot]
eb7c051512 Bump postcss from 8.4.12 to 8.4.31 (#723)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.12 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.12...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:14:05 +08:00
dependabot[bot]
5ec90a08a1 Bump semver from 5.7.1 to 5.7.2 (#694)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-28 20:13:52 +08:00
dependabot[bot]
911275c13b Bump guzzlehttp/psr7 from 2.4.4 to 2.5.0 (#651)
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.4 to 2.5.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.4.4...2.5.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 17:55:13 +08:00
dependabot[bot]
704a15896d Bump laminas/laminas-diactoros from 2.24.0 to 2.25.2 (#657)
Bumps [laminas/laminas-diactoros](https://github.com/laminas/laminas-diactoros) from 2.24.0 to 2.25.2.
- [Release notes](https://github.com/laminas/laminas-diactoros/releases)
- [Commits](https://github.com/laminas/laminas-diactoros/compare/2.24.0...2.25.2)

---
updated-dependencies:
- dependency-name: laminas/laminas-diactoros
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 17:55:03 +08:00
熊孝兵
c80b92b346 后台图片管理支持通过图片路径名称搜索。Fixed #640 2023-03-30 09:49:01 +08:00
熊孝兵
67fc980968 Merge remote-tracking branch 'origin/master' 2023-03-29 11:11:45 +08:00
熊孝兵
05af7dffb8 后台图片管理支持通过图片路径名称搜索。Fixed #640 2023-03-29 11:11:37 +08:00
dependabot[bot]
ee068513c6 Bump webpack from 5.70.0 to 5.76.1 (#633)
Bumps [webpack](https://github.com/webpack/webpack) from 5.70.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.70.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-29 11:10:27 +08:00
熊孝兵
fbb022c877 改进 WebDav 以适配多种认证方式。Fixes #497, #520 2023-03-17 08:46:05 +08:00
dependabot[bot]
2b90d5eb75 Bump symfony/http-kernel from 6.0.11 to 6.0.20 (#608)
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 6.0.11 to 6.0.20.
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/6.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-kernel/compare/v6.0.11...v6.0.20)

---
updated-dependencies:
- dependency-name: symfony/http-kernel
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-02 14:33:12 +08:00
dependabot[bot]
edb36f8a92 Bump json5 from 1.0.1 to 1.0.2 (#591)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 14:26:33 +08:00
熊孝兵
a5bbb26ec8 Update README.md 2022-12-07 08:06:09 +08:00
dependabot[bot]
9394e590a8 Bump loader-utils from 1.4.1 to 1.4.2 (#564)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 09:26:51 +08:00
dependabot[bot]
0cb84a9662 Bump loader-utils from 1.4.0 to 1.4.1 (#561)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 10:45:22 +08:00
Wisp X
bb37a11bfb 降低缩略图质量 2022-10-21 10:25:47 +08:00
Jerry
d5230acdb3 修复前端图片水印路径提示错误问题 (#546)
* 修复前端水印上传目录提示错误的问题
e.g. 本应放在 /storage/app/public 目录下
     但前端提示放在 /public 目录下

* 修复编辑角色组中图片水印存储位置提示不正确bug
2022-10-14 09:10:48 +08:00
Wisp X
c66e58353a 修复图片无法重命名的 bug (fixed #536) 2022-10-09 17:46:51 +08:00
Wisp X
6661f35a15 图片处理质量默认值改为 75% 2022-10-09 10:18:52 +08:00
Jerry
5a8eb833be 修复前端水印上传目录提示错误的问题 (#540)
e.g. 本应放在 /storage/app/public 目录下
     但前端提示放在 /public 目录下
2022-09-28 08:41:10 +08:00
Wisp X
1925a1ae7a minio 策略增加 bucket_endpoint 选项配置 2022-09-20 09:01:49 +08:00
Frank Qing
bb9ef6e267 Support minio https url (#534) 2022-09-20 08:23:02 +08:00
Wisp X
923f567e0a 升级拓展 2022-08-17 13:36:19 +08:00
Wisp X
62809f5300 改进升级方式 2022-08-17 13:06:14 +08:00
Wisp X
c46207c278 支持使用角色组控制上传图片的质量于格式 (Closed #415) 2022-08-17 11:35:05 +08:00
Wisp X
289ecffbb1 上传时及时销毁 InterventionImage 实例以节省内存。 2022-08-17 10:48:54 +08:00
Wisp X
2fdb10a60f 改进阿里云 oss client 连接方式 2022-08-17 10:37:53 +08:00
Wisp X
b2b1693a2f 公告支持手动打开 (Closed #504) 2022-08-17 10:28:28 +08:00
Wisp X
b6f5f2405b 修复角色组设置水印模式,无法选择「动态生成」的 bug (Fixed #502) 2022-08-17 10:09:52 +08:00
Wisp X
f49f52dc34 修改接口文档文案 2022-08-17 10:04:21 +08:00
Wisp X
cd1436add2 update packages 2022-08-17 10:00:07 +08:00
Wisp X
aefbbda2bf Merge remote-tracking branch 'origin/master' 2022-08-05 17:49:49 +08:00
Wisp X
768ca9f24a 修复使用原文件名规则时返回了错误链接的 bug.(Fixed #496) 2022-08-05 17:35:10 +08:00
dependabot[bot]
fb9c390bc7 Bump terser from 4.8.0 to 4.8.1 (#488)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 08:10:56 +08:00
Wisp X
a4a60f13a0 修复文件名含有特殊字符导致排版异常的 bug.(Fixed #471) 2022-07-11 14:13:46 +08:00
TeacherDu
5071c3a904 fix a bug (#474)
* fix a bug

https://github.com/lsky-org/lsky-pro/issues/473

* Update index.blade.php

Co-authored-by: Wisp X <wisp-x@qq.com>
2022-07-11 08:06:10 +08:00
dependabot[bot]
2c52c87c95 Bump guzzlehttp/guzzle from 7.4.4 to 7.4.5 (#453)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.4...7.4.5)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-22 08:31:33 +08:00
Wisp X
3161394a83 改进 dropdown 组件 2022-06-15 10:32:15 +08:00
Wisp X
8f6da67f4f 改进 dropdown 组件 2022-06-15 10:30:53 +08:00
Wisp X
4d3bfed846 Merge remote-tracking branch 'origin/master' 2022-06-15 10:19:00 +08:00
Wisp X
2086daf1ae 改进公告弹窗 Closed #447 2022-06-15 10:17:55 +08:00
dependabot[bot]
a8ab0c6680 Bump guzzlehttp/guzzle from 7.4.3 to 7.4.4 (#445)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.3 to 7.4.4.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.3...7.4.4)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 14:53:04 +08:00
Wisp X
8b5bf74aa2 修复新用户注册后 IP 为空的 bug. 2022-06-02 08:10:24 +08:00
Wisp X
c0513f85a1 支持设置图片 url 额外参数 Closed #435 2022-05-30 11:14:32 +08:00
dependabot[bot]
8f0db089af Bump guzzlehttp/guzzle from 7.4.2 to 7.4.3 (#434)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.2 to 7.4.3.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.2...7.4.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-26 06:49:04 +08:00
Wisp X
d705542f44 fix a bug 2022-05-23 17:38:05 +08:00
Wisp X
4266fd60b7 水印支持切换为覆盖原图或动态生成 2022-05-23 17:28:45 +08:00
Wisp X
315b5b8296 改进样式 2022-05-20 11:28:42 +08:00
Wisp X
10699d69f6 fix a bug 2022-05-20 09:09:40 +08:00
Wisp X
58da33d3c9 取消索引创建迁移文件 2022-05-17 16:42:25 +08:00
Wisp X
20871efb5c 改进 2022-05-11 15:27:57 +08:00
Wisp X
912e3747ee fix a bug 2022-05-10 13:22:55 +08:00
Wisp X
fba0d77e7b fix a bug 2022-05-07 09:56:55 +08:00
Wisp X
10dea5cffd fix a bug 2022-05-06 09:30:54 +08:00
Wisp X
f7983a2f21 修复PC端开启平板模式后无法响应触摸事件的问题 Fixed #386 2022-04-29 11:16:50 +08:00
Wisp X
8ab428c593 改进样式 2022-04-29 09:47:17 +08:00
50 changed files with 4802 additions and 3496 deletions

View File

@@ -15,10 +15,14 @@
[官网](https://www.lsky.pro) &middot; [官网](https://www.lsky.pro) &middot;
[文档](https://docs.lsky.pro) &middot; [文档](https://docs.lsky.pro) &middot;
[社区](https://github.com/lsky-org/lsky-pro/discussions) &middot; [社区](https://github.com/lsky-org/lsky-pro/discussions) &middot;
[演示](https://pic.iqy.ink) &middot; [演示](https://pic.vv1234.cn) &middot;
[Telegram 群组](https://t.me/lsky_pro) [Telegram 群组](https://t.me/lsky_pro)
> 正式版本请点击 [这里](https://github.com/lsky-org/lsky-pro/releases) 下载,发现 bug 请提交 [issues](https://github.com/lsky-org/lsky-pro/issues) (提问前建议阅读[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md)) > [!WARNING]
> 开源版本已停止维护,不再进行新特性更新和 bug 修复。
> master 分支为未安装三方拓展的版本,通常包含了最新未发布版本的一些实验性新特性和修复补丁,正式版本请点击 [这里](https://github.com/lsky-org/lsky-pro/releases) 下载。
> 发现 bug 请提交 [issues](https://github.com/lsky-org/lsky-pro/issues) (提问前建议阅读[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md))
> 有任何想法、建议、或分享,请移步 [社区](https://github.com/lsky-org/lsky-pro/discussions) > 有任何想法、建议、或分享,请移步 [社区](https://github.com/lsky-org/lsky-pro/discussions)
![看不见图片请使用科学上网](https://user-images.githubusercontent.com/22728201/157242302-bfbd04a0-fb30-4241-800e-cc2b1dad9b19.png) ![看不见图片请使用科学上网](https://user-images.githubusercontent.com/22728201/157242302-bfbd04a0-fb30-4241-800e-cc2b1dad9b19.png)

View File

@@ -54,4 +54,10 @@ final class GroupConfigKey
/** @var string 图片缓存时间 */ /** @var string 图片缓存时间 */
const ImageCacheTtl = 'image_cache_ttl'; const ImageCacheTtl = 'image_cache_ttl';
/** @var string 图片保存格式 */
const ImageSaveFormat = 'image_save_format';
/** @var string 图片保存质量 */
const ImageSaveQuality = 'image_save_quality';
} }

View File

@@ -21,4 +21,7 @@ final class MinioOption
/** @var string Bucket */ /** @var string Bucket */
const Bucket = 'bucket'; const Bucket = 'bucket';
/** @var string BucketEndpoint */
const BucketEndpoint = 'bucket_endpoint';
} }

View File

@@ -15,4 +15,10 @@ final class WebDavOption
/** @var string 密码 */ /** @var string 密码 */
const Password = 'password'; const Password = 'password';
/** @var string 认证方式 */
const AuthType = 'auth_type';
/** @var string 地址前缀 */
const Prefix = 'prefix';
} }

View File

@@ -0,0 +1,9 @@
<?php
namespace App\Enums\Watermark;
final class Mode
{
const Overlay = 1; // 覆盖原图
const Dynamic = 2; // 动态生成
}

View File

@@ -18,10 +18,10 @@ class ConsoleController extends Controller
$format = 'Y-m-d H:i:s'; $format = 'Y-m-d H:i:s';
$numbers = [ $numbers = [
'today' => Image::query()->whereBetween('created_at', [$carbon->startOfDay()->format($format), $carbon->endOfDay()->format($format)])->count('id'), 'today' => Image::query()->whereBetween('created_at', [$carbon->startOfDay()->format($format), $carbon->endOfDay()->format($format)])->count(),
'yesterday' => Image::query()->whereBetween('created_at', [$carbon->yesterday()->startOfDay()->format($format), $carbon->yesterday()->endOfDay()->format($format)])->count('id'), 'yesterday' => Image::query()->whereBetween('created_at', [$carbon->yesterday()->startOfDay()->format($format), $carbon->yesterday()->endOfDay()->format($format)])->count(),
'week' => Image::query()->whereBetween('created_at', [$carbon->startOfWeek()->format($format), $carbon->endOfWeek()->format($format)])->count('id'), 'week' => Image::query()->whereBetween('created_at', [$carbon->startOfWeek()->format($format), $carbon->endOfWeek()->format($format)])->count(),
'month' => Image::query()->whereBetween('created_at', [$carbon->startOfMonth()->format($format), $carbon->endOfMonth()->format($format)])->count('id'), 'month' => Image::query()->whereBetween('created_at', [$carbon->startOfMonth()->format($format), $carbon->endOfMonth()->format($format)])->count(),
]; ];
$start = Carbon::now()->parse('-30 day')->startOfDay(); $start = Carbon::now()->parse('-30 day')->startOfDay();

View File

@@ -39,8 +39,8 @@ class ImageController extends Controller
'is:guest' => $builder->whereNull('user_id'), 'is:guest' => $builder->whereNull('user_id'),
'is:adminer' => $builder->whereHas('user', fn (Builder $builder) => $builder->where('is_adminer', 1)), 'is:adminer' => $builder->whereHas('user', fn (Builder $builder) => $builder->where('is_adminer', 1)),
'order:earliest' => $builder->orderBy('created_at'), 'order:earliest' => $builder->orderBy('created_at'),
'order:utmost' => $builder->orderBy('size'), 'order:utmost' => $builder->orderByDesc('size'),
'order:least' => $builder->orderByDesc('size'), 'order:least' => $builder->orderBy('size'),
default => 0, default => 0,
}; };
@@ -64,7 +64,9 @@ class ImageController extends Controller
}); });
foreach ($words as $word) { foreach ($words as $word) {
$builder->where('origin_name', 'like', "%{$word}%")->orWhere('alias_name', 'like', "%{$word}%"); $builder->where('name', 'like', "%{$word}%")
->orWhere('origin_name', 'like', "%{$word}%")
->orWhere('alias_name', 'like', "%{$word}%");
} }
})->latest()->paginate(40); })->latest()->paginate(40);
$images->getCollection()->each(function (Image $image) { $images->getCollection()->each(function (Image $image) {

View File

@@ -45,6 +45,7 @@ class RegisteredUserController extends Controller
'name' => $request->name, 'name' => $request->name,
'email' => $request->email, 'email' => $request->email,
'password' => Hash::make($request->password), 'password' => Hash::make($request->password),
'registered_ip' => $request->ip(),
]); ]);
if (Utils::config(ConfigKey::IsUserNeedVerify)) { if (Utils::config(ConfigKey::IsUserNeedVerify)) {

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Enums\GroupConfigKey; use App\Enums\GroupConfigKey;
use App\Enums\UserStatus; use App\Enums\UserStatus;
use App\Enums\Watermark\Mode;
use App\Exceptions\UploadException; use App\Exceptions\UploadException;
use App\Http\Result; use App\Http\Result;
use App\Models\Group; use App\Models\Group;
@@ -158,10 +159,16 @@ class Controller extends BaseController
$contents = Cache::get($cacheKey); $contents = Cache::get($cacheKey);
} else { } else {
$contents = $image->filesystem()->read($image->pathname); $contents = $image->filesystem()->read($image->pathname);
$configs = collect($image->group?->configs->get(GroupConfigKey::WatermarkConfigs));
// 是否启用了水印功能跳过gif和ico图片 // 是否启用了水印功能跳过gif和ico图片
if ($image->group?->configs->get(GroupConfigKey::IsEnableWatermark) && ! in_array($image->extension, ['ico', 'gif'])) { if (
$configs = $image->group?->configs->get(GroupConfigKey::WatermarkConfigs); $image->group?->configs->get(GroupConfigKey::IsEnableWatermark) &&
$contents = $service->stickWatermark($contents, collect($configs))->encode()->getEncoded(); $configs->get('mode', Mode::Overlay) == Mode::Dynamic &&
! in_array($image->extension, ['ico', 'gif', 'svg'])
) {
$quality = $image->group?->configs->get(GroupConfigKey::ImageSaveQuality, 75);
$contents = $service->stickWatermark($contents, $configs)->encode($image->extension, $quality)->getEncoded();
} }
$cacheTtl = (int)$image->group?->configs->get(GroupConfigKey::ImageCacheTtl, 0); $cacheTtl = (int)$image->group?->configs->get(GroupConfigKey::ImageCacheTtl, 0);
// 是否启用了缓存 // 是否启用了缓存
@@ -178,8 +185,8 @@ class Controller extends BaseController
$mimetype = $image->mimetype; $mimetype = $image->mimetype;
// ico 图片直接输出,不经过 InterventionImage 处理 // ico svg 图片直接输出,不经过 InterventionImage 处理
if ($image->extension === 'ico') { if (in_array($image->extension, ['ico', 'svg'])) {
goto out; goto out;
} }

View File

@@ -34,9 +34,11 @@ class GroupRequest extends FormRequest
'configs.limit_per_day' => 'required|integer', 'configs.limit_per_day' => 'required|integer',
'configs.limit_per_week' => 'required|integer', 'configs.limit_per_week' => 'required|integer',
'configs.limit_per_month' => 'required|integer', 'configs.limit_per_month' => 'required|integer',
'configs.image_save_quality' => 'required|min:1|max:100',
'configs.image_save_format' => '',
'configs.path_naming_rule' => 'max:400', 'configs.path_naming_rule' => 'max:400',
'configs.file_naming_rule' => 'max:400', 'configs.file_naming_rule' => 'max:400',
'configs.accepted_file_suffixes' => 'required|array|in:jpeg,jpg,png,gif,tif,bmp,ico,psd,webp', 'configs.accepted_file_suffixes' => 'required|array|in:jpeg,jpg,png,gif,tif,bmp,ico,psd,webp,svg',
'configs.is_enable_scan' => 'boolean', 'configs.is_enable_scan' => 'boolean',
'configs.scanned_action' => [ 'configs.scanned_action' => [
@@ -64,6 +66,7 @@ class GroupRequest extends FormRequest
'configs.image_cache_ttl' => 'nullable|numeric', 'configs.image_cache_ttl' => 'nullable|numeric',
'configs.is_enable_watermark' => 'boolean', 'configs.is_enable_watermark' => 'boolean',
'configs.watermark_configs.mode' => ['in:1,2'],
'configs.watermark_configs.driver' => ['exclude_if:configs.is_enable_watermark,false', 'in:font,image'], 'configs.watermark_configs.driver' => ['exclude_if:configs.is_enable_watermark,false', 'in:font,image'],
'configs.watermark_configs.drivers.font.font' => [ 'configs.watermark_configs.drivers.font.font' => [
$requiredIfWatermark('font'), $requiredIfWatermark('font'),
@@ -115,6 +118,8 @@ class GroupRequest extends FormRequest
'configs.limit_per_month' => '每月上传限制', 'configs.limit_per_month' => '每月上传限制',
'configs.path_naming_rule' => '路径命名规则', 'configs.path_naming_rule' => '路径命名规则',
'configs.file_naming_rule' => '文件命名规则', 'configs.file_naming_rule' => '文件命名规则',
'configs.image_save_quality' => '图片保存质量',
'configs.image_save_format' => '图片保存格式',
'configs.accepted_file_suffixes' => '允许上传的文件后缀', 'configs.accepted_file_suffixes' => '允许上传的文件后缀',
'configs.is_enable_scan' => '是否启用图片审核', 'configs.is_enable_scan' => '是否启用图片审核',

View File

@@ -54,6 +54,7 @@ class StrategyRequest extends FormRequest
'intro' => 'max:2000', 'intro' => 'max:2000',
'key' => 'required|integer', 'key' => 'required|integer',
'configs.url' => ['required', 'url'], 'configs.url' => ['required', 'url'],
'configs.queries' => '',
]; ];
return array_merge($array, match((int)$this->input('key')) { return array_merge($array, match((int)$this->input('key')) {
@@ -123,6 +124,8 @@ class StrategyRequest extends FormRequest
'configs.base_uri' => 'required', 'configs.base_uri' => 'required',
'configs.username' => '', 'configs.username' => '',
'configs.password' => '', 'configs.password' => '',
'configs.auth_type' => '',
'configs.prefix' => '',
], ],
StrategyKey::Minio => [ StrategyKey::Minio => [
'configs.access_key' => 'required', 'configs.access_key' => 'required',
@@ -130,6 +133,7 @@ class StrategyRequest extends FormRequest
'configs.endpoint' => '', 'configs.endpoint' => '',
'configs.region' => '', 'configs.region' => '',
'configs.bucket' => 'required', 'configs.bucket' => 'required',
'configs.bucket_endpoint' => '',
], ],
}); });
} }
@@ -141,6 +145,7 @@ class StrategyRequest extends FormRequest
'intro' => '简介', 'intro' => '简介',
'key' => '策略', 'key' => '策略',
'configs.url' => '访问网址', 'configs.url' => '访问网址',
'configs.queries' => 'Url 额外参数',
]; ];
return array_merge($array, match((int)$this->input('key')) { return array_merge($array, match((int)$this->input('key')) {
@@ -197,9 +202,11 @@ class StrategyRequest extends FormRequest
'configs.passive' => '被动模式', 'configs.passive' => '被动模式',
], ],
StrategyKey::Webdav => [ StrategyKey::Webdav => [
'configs.base_uri' => 'required', 'configs.base_uri' => '连接地址',
'configs.username' => 'required', 'configs.username' => '用户名',
'configs.password' => 'required', 'configs.password' => '密码',
'configs.auth_type' => '认证方式',
'configs.prefix' => '前缀',
], ],
StrategyKey::Minio => [ StrategyKey::Minio => [
'configs.access_key' => 'AccessKey', 'configs.access_key' => 'AccessKey',
@@ -207,6 +214,7 @@ class StrategyRequest extends FormRequest
'configs.endpoint' => '连接地址', 'configs.endpoint' => '连接地址',
'configs.region' => '区域', 'configs.region' => '区域',
'configs.bucket' => 'Bucket 名称', 'configs.bucket' => 'Bucket 名称',
'configs.bucket_endpoint' => 'BucketEndpoint',
], ],
}); });
} }

View File

@@ -12,7 +12,7 @@ class AlbumRequest extends FormRequest
public function rules() public function rules()
{ {
return [ return [
'name' => 'required|max:60', 'name' => 'required|max:60|alpha_dash',
'intro' => 'max:600' 'intro' => 'max:600'
]; ];
} }
@@ -22,6 +22,7 @@ class AlbumRequest extends FormRequest
return [ return [
'name.required' => '名称不能为空', 'name.required' => '名称不能为空',
'name.max' => '名称字符过长,最大不能超过 60', 'name.max' => '名称字符过长,最大不能超过 60',
'name.alpha_dash' => '名称只能是字母、数字,短破折号(-和下划线_',
'intro.max' => '简介字符过长,最大不能超过 600' 'intro.max' => '简介字符过长,最大不能超过 600'
]; ];
} }

View File

@@ -34,7 +34,7 @@ class ImageRenameRequest extends FormRequest
'id.numeric' => '图片选择异常', 'id.numeric' => '图片选择异常',
'name.required' => '请输入名称', 'name.required' => '请输入名称',
'name.max' => '名称长度不能超过 50 个字符', 'name.max' => '名称长度不能超过 50 个字符',
'name.string' => '名称格式不正确' 'name.string' => '名称格式不正确',
]; ];
} }
} }

View File

@@ -30,7 +30,7 @@ class UserSettingRequest extends FormRequest
'name.required' => '昵称不能为空', 'name.required' => '昵称不能为空',
'name.between' => '昵称必须在 2-20 个字符之间', 'name.between' => '昵称必须在 2-20 个字符之间',
'url.url' => '个人主页地址格式不正确', 'url.url' => '个人主页地址格式不正确',
'password.between' => '昵称必须在 6-32 个字符之间', 'password.between' => '密码必须在 6-32 个字符之间',
'configs.array' => '配置值不正确', 'configs.array' => '配置值不正确',
'configs.default_album.required' => '默认相册选择错误', 'configs.default_album.required' => '默认相册选择错误',
'configs.default_album.numeric' => '默认相册选择错误', 'configs.default_album.numeric' => '默认相册选择错误',

View File

@@ -174,10 +174,13 @@ class Image extends Model
return new Attribute(function () { return new Attribute(function () {
// 是否启用原图保护功能 // 是否启用原图保护功能
if ($this->group?->configs->get(GroupConfigKey::IsEnableOriginalProtection)) { if ($this->group?->configs->get(GroupConfigKey::IsEnableOriginalProtection)) {
return asset("{$this->key}.{$this->extension}"); $url = asset("{$this->key}.{$this->extension}");
} else { } else {
return rtrim($this->strategy?->configs->get('url'), '/').'/'.ltrim($this->pathname, '/'); $url = rtrim($this->strategy?->configs->get('url'), '/').'/'.ltrim($this->pathname, '/');
} }
// 拼接图片 url
return $url.($this->strategy?->configs->get('queries') ?: '');
}); });
} }
@@ -237,7 +240,7 @@ class Image extends Model
public function getThumbnailPathname(): string public function getThumbnailPathname(): string
{ {
return trim(config('app.thumbnail_path'), '/')."/{$this->md5}.png"; return trim(config('app.thumbnail_path'), '/')."/{$this->md5}.". ($this->extension === 'svg' ? 'svg' : "png");
} }
private function generateKey($length = 6): string private function generateKey($length = 6): string

View File

@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Sabre\DAV\Client;
/** /**
* @property int $id * @property int $id
@@ -56,6 +57,13 @@ class Strategy extends Model
StrategyKey::Minio => 'Minio', StrategyKey::Minio => 'Minio',
]; ];
const WEBDAV_AUTH_TYPES = [
'' => 'Auto',
Client::AUTH_BASIC => 'Basic',
Client::AUTH_DIGEST => 'Digest',
Client::AUTH_NTLM => 'Ntlm',
];
protected static function booted() protected static function booted()
{ {
static::saving(function (self $strategy) { static::saving(function (self $strategy) {

View File

@@ -46,7 +46,10 @@ class AppServiceProvider extends ServiceProvider
View::composer('*', function (\Illuminate\View\View $view) { View::composer('*', function (\Illuminate\View\View $view) {
/** @var Group $group */ /** @var Group $group */
$group = Auth::check() ? Auth::user()->group : Group::query()->where('is_guest', true)->first(); $group = Auth::check() ? Auth::user()->group : Group::query()->where('is_guest', true)->first();
$view->with('_group', $group); $view->with([
'_group' => $group,
'_is_notice' => strip_tags(Utils::config(ConfigKey::SiteNotice)),
]);
}); });
} }
} }

View File

@@ -25,6 +25,7 @@ use App\Enums\UserConfigKey;
use App\Enums\UserStatus; use App\Enums\UserStatus;
use App\Enums\Watermark\FontOption; use App\Enums\Watermark\FontOption;
use App\Enums\Watermark\ImageOption; use App\Enums\Watermark\ImageOption;
use App\Enums\Watermark\Mode;
use App\Exceptions\UploadException; use App\Exceptions\UploadException;
use App\Models\Group; use App\Models\Group;
use App\Models\Image; use App\Models\Image;
@@ -51,8 +52,8 @@ use League\Flysystem\FilesystemException;
use League\Flysystem\Ftp\FtpAdapter; use League\Flysystem\Ftp\FtpAdapter;
use League\Flysystem\Ftp\FtpConnectionOptions; use League\Flysystem\Ftp\FtpConnectionOptions;
use League\Flysystem\Local\LocalFilesystemAdapter; use League\Flysystem\Local\LocalFilesystemAdapter;
use League\Flysystem\PhpseclibV2\SftpAdapter; use League\Flysystem\PhpseclibV3\SftpAdapter;
use League\Flysystem\PhpseclibV2\SftpConnectionProvider; use League\Flysystem\PhpseclibV3\SftpConnectionProvider;
use League\Flysystem\WebDAV\WebDAVAdapter; use League\Flysystem\WebDAV\WebDAVAdapter;
use Overtrue\Flysystem\Cos\CosAdapter; use Overtrue\Flysystem\Cos\CosAdapter;
use Overtrue\Flysystem\Qiniu\QiniuAdapter; use Overtrue\Flysystem\Qiniu\QiniuAdapter;
@@ -150,6 +151,34 @@ class ImageService
// 上传频率限制 // 上传频率限制
$this->rateLimiter($configs, $request); $this->rateLimiter($configs, $request);
// 图片处理,跳过 ico gif svg
if (! in_array($extension, ['ico', 'gif', 'svg'])) {
// 图片保存质量与格式
$quality = $configs->get(GroupConfigKey::ImageSaveQuality, 75);
$format = $configs->get(GroupConfigKey::ImageSaveFormat);
if ($quality < 100 || $format) {
// 获取拓展名,判断是否需要转换
$format = $format ?: $extension;
$filename = Str::replaceLast($extension, $format, $file->getClientOriginalName());
$handleImage = InterventionImage::make($file)->save('tmp_' . md5_file($file->getRealPath()), $quality);
$file = new UploadedFile($handleImage->basePath(), $filename, $handleImage->mime());
// 重新设置拓展名
$extension = $format;
$handleImage->destroy();
}
// 是否启用水印,覆盖原图片
if (
$configs->get(GroupConfigKey::IsEnableWatermark) &&
collect($configs->get(GroupConfigKey::WatermarkConfigs))->get('mode', Mode::Overlay) == Mode::Overlay
) {
$watermarkImage = $this->stickWatermark($file, collect($configs->get(GroupConfigKey::WatermarkConfigs)));
$watermarkImage->save();
$file = new UploadedFile($watermarkImage->basePath(), $file->getClientOriginalName(), $file->getMimeType());
$watermarkImage->destroy();
}
}
$filename = $this->replacePathname( $filename = $this->replacePathname(
$configs->get(GroupConfigKey::PathNamingRule).'/'.$configs->get(GroupConfigKey::FileNamingRule), $file, $configs->get(GroupConfigKey::PathNamingRule).'/'.$configs->get(GroupConfigKey::FileNamingRule), $file,
); );
@@ -216,8 +245,8 @@ class ImageService
throw new UploadException('图片记录保存失败'); throw new UploadException('图片记录保存失败');
} }
// 图片检测,跳过 tif、ico 以及 psd 格式 // 图片检测,跳过 tif、ico、psd、svg 格式
if ($configs->get(GroupConfigKey::IsEnableScan) && ! in_array($extension, ['psd', 'ico', 'tif'])) { if ($configs->get(GroupConfigKey::IsEnableScan) && ! in_array($extension, ['psd', 'ico', 'tif', 'svg'])) {
$scanConfigs = $configs->get(GroupConfigKey::ScanConfigs); $scanConfigs = $configs->get(GroupConfigKey::ScanConfigs);
if ($this->scan( if ($this->scan(
driver: $scanConfigs['driver'], driver: $scanConfigs['driver'],
@@ -237,9 +266,11 @@ class ImageService
} }
} }
// 生成缩略图
$this->makeThumbnail($image, $file); $this->makeThumbnail($image, $file);
// 上传完成后删除临时文件
unlink($file->getPathname());
return $image; return $image;
} }
@@ -263,10 +294,10 @@ class ImageService
bucket: $configs->get(S3Option::Bucket), bucket: $configs->get(S3Option::Bucket),
), ),
StrategyKey::Oss => new OssAdapter( StrategyKey::Oss => new OssAdapter(
client: new OssClient( client: new OssClient($configs->get(
accessKeyId: $configs->get(OssOption::AccessKeyId), OssOption::AccessKeyId),
accessKeySecret: $configs->get(OssOption::AccessKeySecret), $configs->get(OssOption::AccessKeySecret),
endpoint: $configs->get(OssOption::Endpoint), $configs->get(OssOption::Endpoint),
), ),
bucket: $configs->get(OssOption::Bucket), bucket: $configs->get(OssOption::Bucket),
), ),
@@ -309,11 +340,12 @@ class ImageService
'timeout' => 30, 'timeout' => 30,
]), ]),
), ),
StrategyKey::Webdav => new WebDAVAdapter(new Client([ StrategyKey::Webdav => new WebDAVAdapter(new Client(([
'baseUri' => $configs->get(WebDavOption::BaseUri), 'baseUri' => $configs->get(WebDavOption::BaseUri),
'userName' => $configs->get(WebDavOption::Username), 'userName' => $configs->get(WebDavOption::Username),
'password' => $configs->get(WebDavOption::Password) 'password' => $configs->get(WebDavOption::Password),
])), 'authType' => (int)$configs->get(WebDavOption::AuthType),
])), $configs->get(WebDavOption::Prefix) ?: ''),
StrategyKey::Minio => new AwsS3V3Adapter( StrategyKey::Minio => new AwsS3V3Adapter(
client: new S3Client([ client: new S3Client([
'credentials' => [ 'credentials' => [
@@ -323,6 +355,7 @@ class ImageService
'endpoint' => $configs->get(MinioOption::Endpoint), 'endpoint' => $configs->get(MinioOption::Endpoint),
'region' => $configs->get(MinioOption::Region), 'region' => $configs->get(MinioOption::Region),
'version' => '2006-03-01', 'version' => '2006-03-01',
'bucket_endpoint' => (bool)$configs->get(MinioOption::BucketEndpoint),
]), ]),
bucket: $configs->get(MinioOption::Bucket), bucket: $configs->get(MinioOption::Bucket),
), ),
@@ -342,7 +375,7 @@ class ImageService
'hours' => ['key' => GroupConfigKey::LimitPerHour, 'str' => '小时'], 'hours' => ['key' => GroupConfigKey::LimitPerHour, 'str' => '小时'],
'days' => ['key' => GroupConfigKey::LimitPerDay, 'str' => '天'], 'days' => ['key' => GroupConfigKey::LimitPerDay, 'str' => '天'],
'weeks' => ['key' => GroupConfigKey::LimitPerWeek, 'str' => '周'], 'weeks' => ['key' => GroupConfigKey::LimitPerWeek, 'str' => '周'],
'months' => ['key' => GroupConfigKey::LimitPerWeek, 'str' => '月'], 'months' => ['key' => GroupConfigKey::LimitPerMonth, 'str' => '月'],
]; ];
foreach ($array as $key => $item) { foreach ($array as $key => $item) {
@@ -524,21 +557,26 @@ class ImageService
@mkdir(dirname($pathname)); @mkdir(dirname($pathname));
} }
@ini_set('memory_limit', '512M'); // 生成缩略图svg等格式本身体积足够小且网页原生支持(比生成的png缩略图还小),不用生成缩略图,直接复制文件
if($image->extension ==='svg') {
copy($data->getPathname(), $pathname);
}else{
@ini_set('memory_limit', '512M');
$img = InterventionImage::make($data); $img = InterventionImage::make($data);
$width = $w = $image->width; $width = $w = $image->width;
$height = $h = $image->height; $height = $h = $image->height;
if ($w > $max && $h > $max) { if ($w > $max && $h > $max) {
$scale = min($max / $w, $max / $h); $scale = min($max / $w, $max / $h);
$width = (int)($w * $scale); $width = (int)($w * $scale);
$height = (int)($h * $scale); $height = (int)($h * $scale);
}
$img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png', 60)->save($pathname);
$img->destroy();
} }
$img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png')->save($pathname);
} catch (\Throwable $e) { } catch (\Throwable $e) {
Utils::e($e, '生成缩略图时出现异常'); Utils::e($e, '生成缩略图时出现异常');
} }
@@ -606,7 +644,7 @@ class ImageService
'{md5-16}' => substr(md5(microtime().Str::random()), 0, 16), '{md5-16}' => substr(md5(microtime().Str::random()), 0, 16),
'{str-random-16}' => Str::random(), '{str-random-16}' => Str::random(),
'{str-random-10}' => Str::random(10), '{str-random-10}' => Str::random(10),
'{filename}' => rtrim($file->getClientOriginalName(), '.'.$file->getClientOriginalExtension()), '{filename}' => Str::replaceLast('.'.$file->getClientOriginalExtension(), '', $file->getClientOriginalName()),
'{uid}' => Auth::check() ? Auth::id() : 0, '{uid}' => Auth::check() ? Auth::id() : 0,
]; ];
return str_replace(array_keys($array), array_values($array), $pathname); return str_replace(array_keys($array), array_values($array), $pathname);

View File

@@ -115,13 +115,9 @@ class UpgradeService
$version = $this->getVersions()->first()['name']; $version = $this->getVersions()->first()['name'];
Config::query()->where('name', ConfigKey::AppVersion)->update(['value' => $version]); Config::query()->where('name', ConfigKey::AppVersion)->update(['value' => $version]);
// 执行数据库迁移 // 执行数据库迁移
Artisan::call('migrate'); Artisan::call('migrate', ['--seed' => true]);
// 清除配置缓存
Cache::forget('configs');
// 清除缓存 // 清除缓存
Artisan::call('route:clear'); Artisan::call('optimize:clear');
Artisan::call('cache:clear');
Artisan::call('view:clear');
Artisan::call('package:discover'); Artisan::call('package:discover');
} catch (\Throwable $e) { } catch (\Throwable $e) {
Utils::e($e, '升级失败'); Utils::e($e, '升级失败');

View File

@@ -147,7 +147,7 @@ class Utils
{ {
foreach ($array as &$value) { foreach ($array as &$value) {
if (is_array($value)) { if (is_array($value)) {
$value = self::filter($value); $value = self::filter($value, $callback, $mode);
} }
} }
return array_filter($array, $callback, $mode); return array_filter($array, $callback, $mode);

View File

@@ -20,7 +20,7 @@
"laravel/tinker": "^2.7", "laravel/tinker": "^2.7",
"league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-aws-s3-v3": "^3.0",
"league/flysystem-ftp": "^3.0", "league/flysystem-ftp": "^3.0",
"league/flysystem-sftp": "^3.0", "league/flysystem-sftp-v3": "^3.0",
"league/flysystem-webdav": "^3.0", "league/flysystem-webdav": "^3.0",
"overtrue/flysystem-cos": "^5.0", "overtrue/flysystem-cos": "^5.0",
"overtrue/flysystem-qiniu": "^3.0", "overtrue/flysystem-qiniu": "^3.0",

3295
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -13,11 +13,12 @@ use App\Enums\Scan\TencentOption;
use App\Enums\UserConfigKey; use App\Enums\UserConfigKey;
use App\Enums\Watermark\FontOption; use App\Enums\Watermark\FontOption;
use App\Enums\Watermark\ImageOption; use App\Enums\Watermark\ImageOption;
use App\Enums\Watermark\Mode;
return [ return [
'app' => [ 'app' => [
ConfigKey::AppName => 'Lsky Pro', ConfigKey::AppName => 'Lsky Pro',
ConfigKey::AppVersion => 'V 2.0.4', ConfigKey::AppVersion => 'V 2.1',
ConfigKey::SiteKeywords => 'Lsky Pro,lsky,兰空图床', ConfigKey::SiteKeywords => 'Lsky Pro,lsky,兰空图床',
ConfigKey::SiteDescription => 'Lsky Pro, Your photo album on the cloud.', ConfigKey::SiteDescription => 'Lsky Pro, Your photo album on the cloud.',
ConfigKey::SiteNotice => '', ConfigKey::SiteNotice => '',
@@ -75,6 +76,7 @@ return [
], ],
], ],
GroupConfigKey::WatermarkConfigs => [ GroupConfigKey::WatermarkConfigs => [
'mode' => Mode::Overlay,
'driver' => 'font', 'driver' => 'font',
'drivers' => [ 'drivers' => [
'font' => [ 'font' => [
@@ -104,7 +106,9 @@ return [
GroupConfigKey::LimitPerDay => 300, GroupConfigKey::LimitPerDay => 300,
GroupConfigKey::LimitPerWeek => 600, GroupConfigKey::LimitPerWeek => 600,
GroupConfigKey::LimitPerMonth => 999, GroupConfigKey::LimitPerMonth => 999,
GroupConfigKey::AcceptedFileSuffixes => ['jpeg', 'jpg', 'png', 'gif', 'tif', 'bmp', 'ico', 'psd', 'webp'], GroupConfigKey::AcceptedFileSuffixes => ['jpeg', 'jpg', 'png', 'gif', 'tif', 'bmp', 'ico', 'psd', 'webp', 'svg'],
GroupConfigKey::ImageSaveFormat => '',
GroupConfigKey::ImageSaveQuality => 75,
GroupConfigKey::PathNamingRule => '{Y}/{m}/{d}', GroupConfigKey::PathNamingRule => '{Y}/{m}/{d}',
GroupConfigKey::FileNamingRule => '{uniqid}', GroupConfigKey::FileNamingRule => '{uniqid}',
GroupConfigKey::ImageCacheTtl => 2626560, GroupConfigKey::ImageCacheTtl => 2626560,

View File

@@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('images', function (Blueprint $table) {
$table->index('key');
$table->index('md5');
$table->index('sha1');
$table->index('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('images', function (Blueprint $table) {
$table->dropIndex('images_key_index');
$table->dropIndex('images_md5_index');
$table->dropIndex('images_sha1_index');
$table->dropIndex('images_created_at_index');
});
}
};

View File

@@ -2,6 +2,7 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Models\Config;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
@@ -13,6 +14,10 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// $this->call([]); // 初始化系统默认配置
foreach (config('convention.app') as $key => $value) {
$content = is_array($value) ? json_encode($value, JSON_UNESCAPED_UNICODE) : $value;
Config::query()->firstOrCreate(['name' => $key], ['value' => $content]);
}
} }
} }

View File

@@ -2,7 +2,6 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Enums\ConfigKey;
use App\Enums\StrategyKey; use App\Enums\StrategyKey;
use App\Models\Group; use App\Models\Group;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;

4430
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
"@tailwindcss/forms": "^0.4.0", "@tailwindcss/forms": "^0.4.0",
"alpinejs": "^3.4.2", "alpinejs": "^3.4.2",
"autoprefixer": "^10.1.0", "autoprefixer": "^10.1.0",
"axios": "^0.25", "axios": "^1.8",
"blueimp-canvas-to-blob": "^3.29.0", "blueimp-canvas-to-blob": "^3.29.0",
"blueimp-file-upload": "^10.32.0", "blueimp-file-upload": "^10.32.0",
"blueimp-load-image": "^5.16.0", "blueimp-load-image": "^5.16.0",
@@ -33,7 +33,7 @@
"less-loader": "^10.2.0", "less-loader": "^10.2.0",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"masonry-layout": "^4.2.2", "masonry-layout": "^4.2.2",
"postcss": "^8.2.1", "postcss": "^8.4.31",
"postcss-import": "^14.0.1", "postcss-import": "^14.0.1",
"resolve-url-loader": "^4.0.0", "resolve-url-loader": "^4.0.0",
"sweetalert2": "^11.3.3", "sweetalert2": "^11.3.3",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -56,7 +56,7 @@ window.utils = {
|| navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i) || navigator.userAgent.match(/Windows Phone/i)
) { ) {
return true; return window.screen.width < 768;
} }
return false; return false;
}, },

View File

@@ -79,6 +79,21 @@
<x-input type="text" name="configs[file_naming_rule]" id="file_naming_rule" autocomplete="file_naming_rule" placeholder="请输入文件命名规则" value="{{ $default->get('file_naming_rule') }}" /> <x-input type="text" name="configs[file_naming_rule]" id="file_naming_rule" autocomplete="file_naming_rule" placeholder="请输入文件命名规则" value="{{ $default->get('file_naming_rule') }}" />
</div> </div>
<div class="col-span-6 sm:col-span-3">
<label for="image_save_quality" class="block text-sm font-medium text-gray-700">图片保存质量</label>
<x-input type="number" name="configs[image_save_quality]" id="image_save_quality" autocomplete="path_naming_rule" placeholder="请输入图片保存质量" value="{{ $default->get('image_save_quality', 100) }}" />
</div>
<div class="col-span-6 sm:col-span-3">
<label for="image_save_format" class="block text-sm font-medium text-gray-700">图片转换格式</label>
<x-select id="configs[image_save_format]" name="configs[image_save_format]" autocomplete="image_save_format">
<option value="">不转换格式</option>
@foreach($default->get('accepted_file_suffixes') as $extension)
<option value="{{ strtolower($extension) }}">{{ strtoupper($extension) }}</option>
@endforeach
</x-select>
</div>
<div class="col-span-6"> <div class="col-span-6">
<x-fieldset title="是否默认" faq="设置默认后,新用户注册以后将会属于该默认角色组,且默认组只能有一个。"> <x-fieldset title="是否默认" faq="设置默认后,新用户注册以后将会属于该默认角色组,且默认组只能有一个。">
<x-switch id="is_default" name="is_default" value="1"></x-switch> <x-switch id="is_default" name="is_default" value="1"></x-switch>
@@ -204,9 +219,15 @@
<div data-tab="watermark" class="hidden grid grid-cols-6 gap-6"> <div data-tab="watermark" class="hidden grid grid-cols-6 gap-6">
<p class="mb-3 text-red-600 text-sm"><i class="fas fa-exclamation"></i> 开启水印功能前请注意考虑图片版权问题。</p> <p class="mb-3 text-red-600 text-sm"><i class="fas fa-exclamation"></i> 开启水印功能前请注意考虑图片版权问题。</p>
<div class="col-span-6 mb-4"> <div class="col-span-6 mb-4">
<x-fieldset title="开启水印" faq="请注意,水印功能仅在开启了「原图保护」功能的情况下生效。"> <x-fieldset title="开启水印" faq="请注意,水印模式为动态生成时,仅在开启了「原图保护」功能的情况下生效。">
<x-switch id="configs[is_enable_watermark]" name="configs[is_enable_watermark]" value="1"></x-switch> <x-switch id="configs[is_enable_watermark]" name="configs[is_enable_watermark]" value="1"></x-switch>
</x-fieldset> </x-fieldset>
<div class="col-span-6 mt-4 mb-4">
<x-fieldset title="水印模式">
<x-fieldset-radio id="configs[watermark_configs][mode]_overlay" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Overlay }}" checked>覆盖原图</x-fieldset-radio>
<x-fieldset-radio id="configs[watermark_configs][mode]_dynamic" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Dynamic }}">动态生成</x-fieldset-radio>
</x-fieldset>
</div>
<div class="col-span-6 mt-4 mb-4"> <div class="col-span-6 mt-4 mb-4">
<x-fieldset title="水印类型"> <x-fieldset title="水印类型">
<x-fieldset-radio id="configs[watermark_configs][driver]_font" name="configs[watermark_configs][driver]" data-select="watermark" value="font" checked>文字水印</x-fieldset-radio> <x-fieldset-radio id="configs[watermark_configs][driver]_font" name="configs[watermark_configs][driver]" data-select="watermark" value="font" checked>文字水印</x-fieldset-radio>
@@ -256,7 +277,7 @@
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[watermark_configs][drivers][image][image]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印图片</label> <label for="configs[watermark_configs][drivers][image][image]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印图片</label>
<x-input type="text" name="configs[watermark_configs][drivers][image][image]" id="configs[watermark_configs][drivers][image][image]" autocomplete="image" placeholder="请输入水印路径例如images/lsky.png" /> <x-input type="text" name="configs[watermark_configs][drivers][image][image]" id="configs[watermark_configs][drivers][image][image]" autocomplete="image" placeholder="请输入水印路径例如images/lsky.png" />
<small class="text-yellow-500">请将水印图片放置 {{ public_path() }} 目录下</small> <small class="text-yellow-500">请将水印图片放置 {{ storage_path('app/public') }} 目录下</small>
</div> </div>
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[watermark_configs][drivers][image][position]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印位置</label> <label for="configs[watermark_configs][drivers][image][position]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印位置</label>

View File

@@ -75,6 +75,21 @@
<x-input type="text" name="configs[file_naming_rule]" id="file_naming_rule" autocomplete="file_naming_rule" placeholder="请输入文件命名规则" value="{{ $group->configs->get('file_naming_rule') }}" /> <x-input type="text" name="configs[file_naming_rule]" id="file_naming_rule" autocomplete="file_naming_rule" placeholder="请输入文件命名规则" value="{{ $group->configs->get('file_naming_rule') }}" />
</div> </div>
<div class="col-span-6 sm:col-span-3">
<label for="image_save_quality" class="block text-sm font-medium text-gray-700">图片保存质量</label>
<x-input type="number" name="configs[image_save_quality]" id="image_save_quality" autocomplete="path_naming_rule" placeholder="请输入图片保存质量" value="{{ $group->configs->get('image_save_quality', 100) }}" />
</div>
<div class="col-span-6 sm:col-span-3">
<label for="image_save_format" class="block text-sm font-medium text-gray-700">图片转换格式</label>
<x-select id="configs[image_save_format]" name="configs[image_save_format]" autocomplete="image_save_format">
<option value="">不转换格式</option>
@foreach($default->get('accepted_file_suffixes') as $extension)
<option value="{{ strtolower($extension) }}" @selected($group->configs->get('image_save_format') === $extension)>{{ strtoupper($extension) }}</option>
@endforeach
</x-select>
</div>
<div class="col-span-6"> <div class="col-span-6">
<x-fieldset title="是否默认" faq="设置默认后,新用户注册以后将会属于该默认角色组,且默认组只能有一个。"> <x-fieldset title="是否默认" faq="设置默认后,新用户注册以后将会属于该默认角色组,且默认组只能有一个。">
<x-switch id="is_default" name="is_default" value="1" :checked="(bool)$group->is_default"></x-switch> <x-switch id="is_default" name="is_default" value="1" :checked="(bool)$group->is_default"></x-switch>
@@ -204,9 +219,15 @@
<div data-tab="watermark" class="hidden grid grid-cols-6 gap-6"> <div data-tab="watermark" class="hidden grid grid-cols-6 gap-6">
<p class="mb-3 text-red-600 text-sm"><i class="fas fa-exclamation"></i> 开启水印功能前请注意考虑图片版权问题。</p> <p class="mb-3 text-red-600 text-sm"><i class="fas fa-exclamation"></i> 开启水印功能前请注意考虑图片版权问题。</p>
<div class="col-span-6 mb-4"> <div class="col-span-6 mb-4">
<x-fieldset title="开启水印" faq="请注意,水印功能仅在开启了「原图保护」功能的情况下生效。"> <x-fieldset title="开启水印" faq="请注意,水印模式为动态生成时,仅在开启了「原图保护」功能的情况下生效。">
<x-switch id="configs[is_enable_watermark]" name="configs[is_enable_watermark]" value="1" :checked="(bool)$group->configs->get('is_enable_watermark')"></x-switch> <x-switch id="configs[is_enable_watermark]" name="configs[is_enable_watermark]" value="1" :checked="(bool)$group->configs->get('is_enable_watermark')"></x-switch>
</x-fieldset> </x-fieldset>
<div class="col-span-6 mt-4 mb-4">
<x-fieldset title="水印模式">
<x-fieldset-radio id="configs[watermark_configs][mode]_overlay" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Overlay }}" :checked="($group->configs['watermark_configs']['mode'] ?? '') == \App\Enums\Watermark\Mode::Overlay">覆盖原图</x-fieldset-radio>
<x-fieldset-radio id="configs[watermark_configs][mode]_dynamic" name="configs[watermark_configs][mode]" value="{{ \App\Enums\Watermark\Mode::Dynamic }}" :checked="($group->configs['watermark_configs']['mode'] ?? '') == \App\Enums\Watermark\Mode::Dynamic">动态生成</x-fieldset-radio>
</x-fieldset>
</div>
<div class="col-span-6 mt-4 mb-4"> <div class="col-span-6 mt-4 mb-4">
<x-fieldset title="水印类型"> <x-fieldset title="水印类型">
<x-fieldset-radio id="configs[watermark_configs][driver]_font" name="configs[watermark_configs][driver]" data-select="watermark" value="font" :checked="($group->configs['watermark_configs']['driver'] ?? '') === 'font'">文字水印</x-fieldset-radio> <x-fieldset-radio id="configs[watermark_configs][driver]_font" name="configs[watermark_configs][driver]" data-select="watermark" value="font" :checked="($group->configs['watermark_configs']['driver'] ?? '') === 'font'">文字水印</x-fieldset-radio>
@@ -256,7 +277,7 @@
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[watermark_configs][drivers][image][image]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印图片</label> <label for="configs[watermark_configs][drivers][image][image]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印图片</label>
<x-input type="text" name="configs[watermark_configs][drivers][image][image]" id="configs[watermark_configs][drivers][image][image]" autocomplete="image" placeholder="请输入水印路径例如images/lsky.png" value="{{ $group->configs['watermark_configs']['drivers']['image']['image'] ?? '' }}" /> <x-input type="text" name="configs[watermark_configs][drivers][image][image]" id="configs[watermark_configs][drivers][image][image]" autocomplete="image" placeholder="请输入水印路径例如images/lsky.png" value="{{ $group->configs['watermark_configs']['drivers']['image']['image'] ?? '' }}" />
<small class="text-yellow-500">请将水印图片放置 {{ public_path() }} 目录下</small> <small class="text-yellow-500">请将水印图片放置 {{ storage_path('app/public') }} 目录下</small>
</div> </div>
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[watermark_configs][drivers][image][position]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印位置</label> <label for="configs[watermark_configs][drivers][image][position]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>水印位置</label>

View File

@@ -194,8 +194,8 @@
</dl> </dl>
<dl> <dl>
<div class="bg-gray-50 px-2 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="bg-gray-50 px-2 py-3 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">剩余容量</dt> <dt class="text-sm font-medium text-gray-500">已用容量</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2 truncate">__surplus_capacity__</dd> <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2 truncate">__used_capacity__</dd>
</div> </div>
</dl> </dl>
<dl> <dl>
@@ -389,7 +389,7 @@
.replace(/__name__/g, user.name) .replace(/__name__/g, user.name)
.replace(/__email__/g, user.email) .replace(/__email__/g, user.email)
.replace(/__capacity__/g, utils.formatSize(user.capacity * 1024)) .replace(/__capacity__/g, utils.formatSize(user.capacity * 1024))
.replace(/__surplus_capacity__/g, utils.formatSize(user.images_sum_size * 1024)) .replace(/__used_capacity__/g, utils.formatSize(user.images_sum_size * 1024))
.replace(/__image_num__/g, user.image_num) .replace(/__image_num__/g, user.image_num)
.replace(/__album_num__/g, user.album_num) .replace(/__album_num__/g, user.album_num)
.replace(/__registered_ip__/g, user.registered_ip || '-') .replace(/__registered_ip__/g, user.registered_ip || '-')

View File

@@ -46,6 +46,10 @@
本地储存的访问网址必须有根路径例如https://www.lsky.pro/uploads 中的 uploads 就是根路径,且根路径不能和其他策略重复。修改根路径直接影响已经上传并已使用的链接的访问。 本地储存的访问网址必须有根路径例如https://www.lsky.pro/uploads 中的 uploads 就是根路径,且根路径不能和其他策略重复。修改根路径直接影响已经上传并已使用的链接的访问。
</small> </small>
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-6"> <div class="col-span-6">
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700">储存路径</label> <label for="configs[root]" class="block text-sm font-medium text-gray-700">储存路径</label>
@@ -60,6 +64,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label> <label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label>
<x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" /> <x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" />
@@ -87,6 +95,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label> <label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label>
<x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" /> <x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" />
@@ -110,6 +122,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[app_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AppId</label> <label for="configs[app_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AppId</label>
<x-input type="text" name="configs[app_id]" id="configs[app_id]" placeholder="请输入 AppId" /> <x-input type="text" name="configs[app_id]" id="configs[app_id]" placeholder="请输入 AppId" />
@@ -138,6 +154,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label> <label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label>
<x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" /> <x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" />
@@ -157,6 +177,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[service]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>服务名称</label> <label for="configs[service]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>服务名称</label>
<x-input type="text" name="configs[service]" id="configs[service]" placeholder="请输入服务名称" /> <x-input type="text" name="configs[service]" id="configs[service]" placeholder="请输入服务名称" />
@@ -176,11 +200,13 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-6"> <div class="col-span-3 sm:col-span-2 mb-4">
<div class="col-span-6 sm:col-span-3 mb-4"> <label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label> <x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="/" /> </div>
</div> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label>
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="/" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label> <label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label>
@@ -222,11 +248,13 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-6"> <div class="col-span-3 sm:col-span-2 mb-4">
<div class="col-span-6 sm:col-span-3 mb-4"> <label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label> <x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="/" /> </div>
</div> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label>
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="/" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label> <label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label>
@@ -260,10 +288,26 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[base_uri]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>连接地址</label> <label for="configs[base_uri]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>连接地址</label>
<x-input type="url" name="configs[base_uri]" id="configs[base_uri]" placeholder="请输入连接地址" /> <x-input type="url" name="configs[base_uri]" id="configs[base_uri]" placeholder="请输入连接地址" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="webdav-configs[auth_type]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>认证方式</label>
<x-select id="webdav-auth-type" name="configs[auth_type]" select2>
@foreach(\App\Models\Strategy::WEBDAV_AUTH_TYPES as $key => $type)
<option value="{{ $key }}" {{ $loop->first ? 'selected' : '' }}>{{ $type }}</option>
@endforeach
</x-select>
</div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="webdav-configs[prefix]" class="block text-sm font-medium text-gray-700">路径前缀</label>
<x-input type="text" name="configs[prefix]" id="webdav-configs[prefix]" placeholder="请输入路径前缀"></x-input>
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[username]" class="block text-sm font-medium text-gray-700">用户名</label> <label for="configs[username]" class="block text-sm font-medium text-gray-700">用户名</label>
<x-input type="text" name="configs[username]" id="configs[username]" placeholder="请输入用户名" /> <x-input type="text" name="configs[username]" id="configs[username]" placeholder="请输入用户名" />
@@ -279,6 +323,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label> <label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label>
<x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" /> <x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" />
@@ -299,6 +347,11 @@
<label for="configs[bucket]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>Bucket 名称</label> <label for="configs[bucket]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>Bucket 名称</label>
<x-input type="text" name="configs[bucket]" id="configs[bucket]" placeholder="请输入 Bucket 名称" /> <x-input type="text" name="configs[bucket]" id="configs[bucket]" placeholder="请输入 Bucket 名称" />
</div> </div>
<div class="col-span-6">
<label for="configs[bucket_endpoint]" class="block text-sm font-medium mb-2 text-gray-700">BucketEndpoint</label>
<x-switch id="configs[bucket_endpoint]" name="configs[bucket_endpoint]" value="1"></x-switch>
<p><small class="text-gray-500"><i class="fas fa-exclamation-circle"></i> 开启此选项后将会直接以「连接地址」作为数据交互传输域名,否则可能会以桶名称拼接域名(例如http://桶名称.连接地址.com)</small></p>
</div>
</div> </div>
</div> </div>
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6"> <div class="px-4 py-3 bg-gray-50 text-right sm:px-6">

View File

@@ -50,6 +50,10 @@
本地储存的访问网址必须有根路径例如https://www.lsky.pro/uploads 中的 uploads 就是根路径,且根路径不能和其他策略重复。修改根路径直接影响已经上传并已使用的链接的访问。 本地储存的访问网址必须有根路径例如https://www.lsky.pro/uploads 中的 uploads 就是根路径,且根路径不能和其他策略重复。修改根路径直接影响已经上传并已使用的链接的访问。
</small> </small>
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-6"> <div class="col-span-6">
<div class="col-span-6 sm:col-span-3 mb-4"> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700">储存路径</label> <label for="configs[root]" class="block text-sm font-medium text-gray-700">储存路径</label>
@@ -66,6 +70,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label> <label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label>
<x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" value="{{ $strategy->configs->get('access_key_id') }}" /> <x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" value="{{ $strategy->configs->get('access_key_id') }}" />
@@ -95,6 +103,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label> <label for="configs[access_key_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKeyId</label>
<x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" value="{{ $strategy->configs->get('access_key_id') }}" /> <x-input type="text" name="configs[access_key_id]" id="configs[access_key_id]" placeholder="请输入 AccessKeyId" value="{{ $strategy->configs->get('access_key_id') }}" />
@@ -120,6 +132,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[app_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AppId</label> <label for="configs[app_id]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AppId</label>
<x-input type="text" name="configs[app_id]" id="configs[app_id]" placeholder="请输入 AppId" value="{{ $strategy->configs->get('app_id') }}" /> <x-input type="text" name="configs[app_id]" id="configs[app_id]" placeholder="请输入 AppId" value="{{ $strategy->configs->get('app_id') }}" />
@@ -150,6 +166,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label> <label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label>
<x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" value="{{ $strategy->configs->get('access_key') }}" /> <x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" value="{{ $strategy->configs->get('access_key') }}" />
@@ -171,6 +191,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[service]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>服务名称</label> <label for="configs[service]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>服务名称</label>
<x-input type="text" name="configs[service]" id="configs[service]" placeholder="请输入服务名称" value="{{ $strategy->configs->get('service') }}" /> <x-input type="text" name="configs[service]" id="configs[service]" placeholder="请输入服务名称" value="{{ $strategy->configs->get('service') }}" />
@@ -192,11 +216,13 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-6"> <div class="col-span-3 sm:col-span-2 mb-4">
<div class="col-span-6 sm:col-span-3 mb-4"> <label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label> <x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="{{ $strategy->configs->get('root') }}" /> </div>
</div> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label>
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="{{ $strategy->configs->get('root') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label> <label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label>
@@ -240,11 +266,13 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-6"> <div class="col-span-3 sm:col-span-2 mb-4">
<div class="col-span-6 sm:col-span-3 mb-4"> <label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label> <x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="{{ $strategy->configs->get('root') }}" /> </div>
</div> <div class="col-span-6 sm:col-span-3 mb-4">
<label for="configs[root]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>根目录</label>
<x-input type="text" name="configs[root]" id="configs[root]" autocomplete="text" placeholder="请输入根目录路径" value="{{ $strategy->configs->get('root') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label> <label for="configs[host]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>主机地址</label>
@@ -280,10 +308,26 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[base_uri]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>连接地址</label> <label for="configs[base_uri]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>连接地址</label>
<x-input type="url" name="configs[base_uri]" id="configs[base_uri]" placeholder="请输入连接地址" value="{{ $strategy->configs->get('base_uri') }}" /> <x-input type="url" name="configs[base_uri]" id="configs[base_uri]" placeholder="请输入连接地址" value="{{ $strategy->configs->get('base_uri') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="webdav-configs[auth_type]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>认证方式</label>
<x-select id="webdav-auth-type" name="configs[auth_type]" select2>
@foreach(\App\Models\Strategy::WEBDAV_AUTH_TYPES as $key => $type)
<option value="{{ $key }}" {{ $key == $strategy->configs->get('auth_type') ? 'selected' : '' }}>{{ $type }}</option>
@endforeach
</x-select>
</div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="webdav-configs[prefix]" class="block text-sm font-medium text-gray-700">路径前缀</label>
<x-input type="text" name="configs[prefix]" id="webdav-configs[prefix]" placeholder="请输入路径前缀" value="{{ $strategy->configs->get('prefix') }}"></x-input>
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[username]" class="block text-sm font-medium text-gray-700">用户名</label> <label for="configs[username]" class="block text-sm font-medium text-gray-700">用户名</label>
<x-input type="text" name="configs[username]" id="configs[username]" placeholder="请输入用户名" value="{{ $strategy->configs->get('username') }}" /> <x-input type="text" name="configs[username]" id="configs[username]" placeholder="请输入用户名" value="{{ $strategy->configs->get('username') }}" />
@@ -301,6 +345,10 @@
<label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label> <label for="configs[url]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>访问域名</label>
<x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" /> <x-input type="url" name="configs[url]" id="configs[url]" placeholder="请输入图片访问域名 http(s)://" value="{{ $strategy->configs->get('url') }}" />
</div> </div>
<div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[queries]" class="block text-sm font-medium text-gray-700">URL Queries</label>
<x-input type="text" name="configs[queries]" id="configs[queries]" placeholder="请输入 url 额外参数" value="{{ $strategy->configs->get('queries') }}" />
</div>
<div class="col-span-3 sm:col-span-2 mb-4"> <div class="col-span-3 sm:col-span-2 mb-4">
<label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label> <label for="configs[access_key]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>AccessKey</label>
<x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" value="{{ $strategy->configs->get('access_key') }}" /> <x-input type="text" name="configs[access_key]" id="configs[access_key]" placeholder="请输入 AccessKey" value="{{ $strategy->configs->get('access_key') }}" />
@@ -321,6 +369,11 @@
<label for="configs[bucket]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>储存桶名称</label> <label for="configs[bucket]" class="block text-sm font-medium text-gray-700"><span class="text-red-600">*</span>储存桶名称</label>
<x-input type="text" name="configs[bucket]" id="configs[bucket]" placeholder="请输入 Bucket 名称" value="{{ $strategy->configs->get('bucket') }}" /> <x-input type="text" name="configs[bucket]" id="configs[bucket]" placeholder="请输入 Bucket 名称" value="{{ $strategy->configs->get('bucket') }}" />
</div> </div>
<div class="col-span-6">
<label for="configs[bucket_endpoint]" class="block text-sm font-medium mb-2 text-gray-700">BucketEndpoint</label>
<x-switch id="configs[bucket_endpoint]" name="configs[bucket_endpoint]" value="1" :checked="(bool)$strategy->configs->get('bucket_endpoint')"></x-switch>
<p><small class="text-gray-500"><i class="fas fa-exclamation-circle"></i> 开启此选项后将会直接以「连接地址」作为数据交互传输域名,否则可能会以桶名称拼接域名(例如http://桶名称.连接地址.com)</small></p>
</div>
</div> </div>
@endif @endif
</div> </div>

View File

@@ -12,7 +12,7 @@
<div> <div>
<p class="text-lg text-gray-700 font-semibold">验证方式</p> <p class="text-lg text-gray-700 font-semibold">验证方式</p>
<div class="my-2 text-sm bg-white rounded-md p-4 overflow-x-auto"> <div class="my-2 text-sm bg-white rounded-md p-4 overflow-x-auto">
当前版本接口采用 「HTTP 基本验证」的方式验证授权,获取到 token 后,通过设置请求 header 标头来验证请求,例如: 当前版本接口采用 「HTTP 基本验证」的方式验证授权,获取到 token 后,通过设置请求 header 标头来验证请求(Bearer Token),例如:
<b class="block my-2 text-gray-600 text-sm">"Authorization": "Bearer 1|1bJbwlqBfnggmOMEZqXT5XusaIwqiZjCDs7r1Ob5"</b> <b class="block my-2 text-gray-600 text-sm">"Authorization": "Bearer 1|1bJbwlqBfnggmOMEZqXT5XusaIwqiZjCDs7r1Ob5"</b>
<p class="text-sm">如果未设置 Authorization 的情况下请求上传接口,将会被视为游客上传。</p> <p class="text-sm">如果未设置 Authorization 的情况下请求上传接口,将会被视为游客上传。</p>
</div> </div>

View File

@@ -1,15 +1,27 @@
@if(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) @if($_is_notice)
<x-modal id="notice-modal"> <x-modal id="notice-modal">
<div class="markdown-body"> <div class="markdown-body">
{!! (new Parsedown())->parse(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) !!} {!! (new Parsedown())->parse(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) !!}
</div> </div>
<div class="mt-4 w-full text-right">
<x-button type="button" @click="$store.modal.close('notice-modal');">OK</x-button>
</div>
</x-modal> </x-modal>
@push('scripts') @push('scripts')
<script> <script>
if (! sessionStorage.getItem('noticed')) { let noticeHash = "{{ md5(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) }}";
Alpine.store('modal').open('notice-modal')
sessionStorage.setItem('noticed', '1'); let openNotice = function () {
Alpine.store('modal').open('notice-modal');
localStorage.setItem('notice-hash', noticeHash);
}
if (localStorage.getItem('notice-hash') !== noticeHash) {
setTimeout(function () {
openNotice();
}, 1000)
} }
</script> </script>
@endpush @endpush

View File

@@ -1,6 +1,6 @@
<div class="rounded w-full overflow-hidden"> <div class="rounded w-full overflow-hidden shadow-custom">
<div class="px-4 py-3 bg-slate-50 text-gray-800 text-md truncate">{{ $title }}</div> <div class="px-4 py-3 bg-slate-50 text-gray-800 text-md truncate">{{ $title }}</div>
<div class="bg-white w-full shadow-custom"> <div class="bg-white w-full">
{{ $content }} {{ $content }}
</div> </div>
</div> </div>

View File

@@ -1 +1 @@
<a {{$attributes->merge(['class' => 'block px-4 py-2 active:bg-gray-100 text-sm text-gray-700', 'role' => 'menuitem', 'tabindex' => '-1']) }}>{{ $slot }}</a> <a {{$attributes->merge(['class' => 'block px-4 py-2 active:bg-gray-100 text-sm text-gray-700 truncate hover:bg-sky-500 hover:text-white', 'role' => 'menuitem', 'tabindex' => '-1']) }}>{{ $slot }}</a>

View File

@@ -7,12 +7,12 @@
<div x-show="open" <div x-show="open"
x-transition:enter="transition ease-out duration-200" x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-start="transform opacity-0 translate-y-9"
x-transition:enter-end="transform opacity-100 scale-100" x-transition:enter-end="transform opacity-100 translate-y-0"
x-transition:leave="transition ease-in duration-75" x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-start="transform opacity-100 translate-y-0"
x-transition:leave-end="transform opacity-0 scale-95" x-transition:leave-end="transform opacity-0 translate-y-9"
class="absolute z-[9] {{ $classes[$direction] }} mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" class="absolute z-[9] {{ $classes[$direction] }} mt-2 w-48 rounded-md shadow-[10px_0px_50px_-15px_rgba(0,0,0,0.25)] py-1 bg-white "
role="menu" role="menu"
aria-orientation="vertical" aria-orientation="vertical"
aria-labelledby="user-menu-button" aria-labelledby="user-menu-button"

View File

@@ -188,7 +188,7 @@
.html() .html()
.replace(/__id__/g, guid) .replace(/__id__/g, guid)
.replace(/__src__/g, blob) .replace(/__src__/g, blob)
.replace(/__name__/g, file.name) .replace(/__name__/g, file.name.replace(/\$/g, '$$$$'))
.replace(/__info__/g, utils.formatSize(file.size)); .replace(/__info__/g, utils.formatSize(file.size));
data.$preview = $previews.append(html).show().find(`[data-id="${guid}"]`); data.$preview = $previews.append(html).show().find(`[data-id="${guid}"]`);
queue[guid] = data; queue[guid] = data;

View File

@@ -15,8 +15,8 @@
@stack('styles') @stack('styles')
<!-- Styles --> <!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/common.css') }}?t=20220427"> <link rel="stylesheet" href="{{ asset('css/common.css') }}?t=20220817">
<link rel="stylesheet" href="{{ asset('css/app.css') }}?t=20220427"> <link rel="stylesheet" href="{{ asset('css/app.css') }}?t=20220817">
</head> </head>
<body class="font-sans antialiased overflow-hidden"> <body class="font-sans antialiased overflow-hidden">
<div class="min-h-screen bg-gray-100" x-data x-cloak> <div class="min-h-screen bg-gray-100" x-data x-cloak>
@@ -44,7 +44,7 @@
</div> </div>
</body> </body>
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}?t=20220427"></script> <script src="{{ asset('js/app.js') }}?t=20220817"></script>
@include('common.notice') @include('common.notice')
<script> <script>
// 开关组件默认值 // 开关组件默认值

View File

@@ -15,8 +15,8 @@
@stack('styles') @stack('styles')
<!-- Styles --> <!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/common.css') }}?t=20220427"> <link rel="stylesheet" href="{{ asset('css/common.css') }}?t=20220817">
<link rel="stylesheet" href="{{ asset('css/app.css') }}?t=20220427"> <link rel="stylesheet" href="{{ asset('css/app.css') }}?t=20220817">
</head> </head>
<body class="font-sans antialiased"> <body class="font-sans antialiased">
<div class="min-h-screen text-gray-900 bg-gray-100"> <div class="min-h-screen text-gray-900 bg-gray-100">
@@ -24,7 +24,7 @@
</div> </div>
</body> </body>
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}?t=20220427"></script> <script src="{{ asset('js/app.js') }}?t=20220817"></script>
@if(file_exists(public_path('js/custom.js'))) @if(file_exists(public_path('js/custom.js')))
<script src="{{ asset('js/custom.js') }}"></script> <script src="{{ asset('js/custom.js') }}"></script>
@endif @endif

View File

@@ -1,4 +1,4 @@
<header class="transition-all duration-300 w-full h-14 bg-gray-700 text-white flex justify-center fixed top-0 z-[9] shadow-[0_15px_30px_-15px_rgba(0,0,0,0.5)]"> <header class="transition-all duration-300 w-full h-14 bg-gray-700 text-white flex justify-center fixed top-0 z-[9] shadow-[0_15px_10px_-15px_rgba(0,0,0,0.3)]">
<x-container class="w-full px-6 flex justify-between items-center"> <x-container class="w-full px-6 flex justify-between items-center">
<div class="flex justify-start items-center max-w-[70%]"> <div class="flex justify-start items-center max-w-[70%]">
<a href="javascript:void(0)" @click="$store.sidebar.toggle()" class="w-6 h-6 p-4 rounded-full sm:hidden -ml-1 mr-4 flex justify-center items-center"> <a href="javascript:void(0)" @click="$store.sidebar.toggle()" class="w-6 h-6 p-4 rounded-full sm:hidden -ml-1 mr-4 flex justify-center items-center">
@@ -7,9 +7,8 @@
<a href="" class="text-xl truncate" id="header-title">@yield('title', \App\Utils::config(\App\Enums\ConfigKey::AppName))</a> <a href="" class="text-xl truncate" id="header-title">@yield('title', \App\Utils::config(\App\Enums\ConfigKey::AppName))</a>
</div> </div>
<div class="flex justify-end items-center space-x-4"> <div class="flex justify-end items-center space-x-4">
@if($_group->strategies->isNotEmpty()) @includeWhen($_is_notice, 'layouts.notice')
@include('layouts.strategies') @includeWhen($_group->strategies->isNotEmpty(), 'layouts.strategies')
@endif
@include('layouts.user-nav') @include('layouts.user-nav')
</div> </div>
</x-container> </x-container>

View File

@@ -0,0 +1,15 @@
@if($_is_notice)
<button type="button" class="bg-gray-800 flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" id="open-notice" aria-expanded="false" aria-haspopup="true">
<div class="h-8 w-8 rounded-full flex items-center justify-center bg-white">
<i class="fas fa-envelope text-gray-900"></i>
</div>
<span class="px-2 sm:block hidden">公告</span>
</button>
@push('scripts')
<script>
$('#open-notice').click(function () {
openNotice();
});
</script>
@endpush
@endif

View File

@@ -269,14 +269,14 @@
for (const i in images) { for (const i in images) {
html += $('#images-item-tpl').html() html += $('#images-item-tpl').html()
.replace(/__id__/g, images[i].id) .replace(/__id__/g, images[i].id)
.replace(/__name__/g, images[i].filename) .replace(/__name__/g, images[i].filename.replace(/\$/g, '$$$$'))
.replace(/__human_date__/g, images[i].human_date) .replace(/__human_date__/g, images[i].human_date)
.replace(/__date__/g, images[i].date) .replace(/__date__/g, images[i].date)
.replace(/__url__/g, images[i].url) .replace(/__url__/g, images[i].url)
.replace(/__thumb_url__/g, images[i].thumb_url) .replace(/__thumb_url__/g, images[i].thumb_url)
.replace(/__width__/g, images[i].width) .replace(/__width__/g, images[i].width)
.replace(/__height__/g, images[i].height) .replace(/__height__/g, images[i].height)
.replace(/__json__/g, JSON.stringify(images[i])) .replace(/__json__/g, JSON.stringify(images[i]).replace(/\$/g, '$$$$'))
} }
$photos.append(html); $photos.append(html);
@@ -686,8 +686,8 @@
let content = $('#image-detail-tpl').html() let content = $('#image-detail-tpl').html()
.replace(/__album_name__/g, image.album ? image.album.name : '-') .replace(/__album_name__/g, image.album ? image.album.name : '-')
.replace(/__strategy_name__/g, image.strategy ? image.strategy.name : '-') .replace(/__strategy_name__/g, image.strategy ? image.strategy.name : '-')
.replace(/__filename__/g, image.filename) .replace(/__filename__/g, image.filename.replace(/\$/g, '$$$$'))
.replace(/__origin_name__/g, image.origin_name) .replace(/__origin_name__/g, image.origin_name.replace(/\$/g, '$$$$'))
.replace(/__size__/g, utils.formatSize(image.size * 1024)) .replace(/__size__/g, utils.formatSize(image.size * 1024))
.replace(/__mimetype__/g, image.mimetype) .replace(/__mimetype__/g, image.mimetype)
.replace(/__width__/g, image.width) .replace(/__width__/g, image.width)

View File

@@ -5,7 +5,7 @@
<p class="mb-3 font-semibold text-lg text-gray-700">基础设置</p> <p class="mb-3 font-semibold text-lg text-gray-700">基础设置</p>
<form action="{{ route('settings.update') }}" method="POST"> <form action="{{ route('settings.update') }}" method="POST">
@csrf @csrf
<div class="overflow-hidden sm:rounded-md"> <div class="overflow-hidden sm:rounded-md shadow-custom">
<div class="px-3 py-4 bg-white sm:p-6"> <div class="px-3 py-4 bg-white sm:p-6">
<div class="grid grid-cols-6 gap-6"> <div class="grid grid-cols-6 gap-6">
<div class="col-span-6 sm:col-span-3"> <div class="col-span-6 sm:col-span-3">

View File

@@ -10,9 +10,8 @@
<a href="{{ route('/') }}" class="text-white text-xl truncate">{{ \App\Utils::config(\App\Enums\ConfigKey::AppName) }}</a> <a href="{{ route('/') }}" class="text-white text-xl truncate">{{ \App\Utils::config(\App\Enums\ConfigKey::AppName) }}</a>
</div> </div>
<div class="flex justify-end items-center space-x-4"> <div class="flex justify-end items-center space-x-4">
@if($_group->strategies->isNotEmpty()) @includeWhen($_is_notice, 'layouts.notice')
@include('layouts.strategies') @includeWhen($_group->strategies->isNotEmpty(), 'layouts.strategies')
@endif
@if(Auth::check()) @if(Auth::check())
@include('layouts.user-nav') @include('layouts.user-nav')

View File

@@ -14,7 +14,7 @@ module.exports = {
sans: ['Nunito', ...defaultTheme.fontFamily.sans], sans: ['Nunito', ...defaultTheme.fontFamily.sans],
}, },
boxShadow: { boxShadow: {
custom: '6px 6px 30px 11px rgba(0, 0, 0, 0.03)', custom: '0px 4px 6px -1px rgba(0, 0, 0, 0.04)',
}, },
}, },
}, },