Compare commits

..

108 Commits

Author SHA1 Message Date
xiaojunnuo
29d37075dd v1.38.7 2026-02-05 16:30:37 +08:00
xiaojunnuo
f311bac580 build: prepare to build 2026-02-05 16:26:01 +08:00
xiaojunnuo
beb7a4c992 perf: 第三方登录支持Microsoft 2026-02-05 16:14:05 +08:00
xiaojunnuo
4d86fb319b perf: 优化zerossl申请证书稳定性 2026-02-05 12:22:55 +08:00
xiaojunnuo
5ea4f46de7 perf: eab从更多参数中挪到外面 2026-02-05 11:39:06 +08:00
xiaojunnuo
1d8d5251ae chore: domain-selector 优化 2026-02-05 11:29:10 +08:00
xiaojunnuo
54c8217808 fix: 修复有域名记录时,域名输入框无法关闭的bug 2026-02-05 11:27:32 +08:00
xiaojunnuo
ba623903e0 chore: publish-atom.yaml 2026-02-05 02:05:04 +08:00
xiaojunnuo
907af3ae18 chore: publish 2026-02-05 02:03:57 +08:00
xiaojunnuo
24ae8a6b66 chore:2 2026-02-05 02:02:01 +08:00
xiaojunnuo
1646a5cdd2 chore: atom publish 2026-02-05 01:59:08 +08:00
xiaojunnuo
814f17d10b build: release 2026-02-05 01:33:21 +08:00
xiaojunnuo
40fe105903 build: release 2026-02-05 01:31:16 +08:00
xiaojunnuo
42a347d8b1 build: publish 2026-02-05 01:18:22 +08:00
xiaojunnuo
5450e5dac4 build: trigger build image 2026-02-05 01:18:09 +08:00
xiaojunnuo
1368259a1e v1.38.6 2026-02-05 01:16:39 +08:00
xiaojunnuo
81a495f267 build: prepare to build 2026-02-05 01:13:43 +08:00
xiaojunnuo
693a4a6633 perf: oauth支持github 和google, 修复头像显示问题 2026-02-05 01:10:01 +08:00
xiaojunnuo
82786c580a chore: tip 2026-02-05 00:42:25 +08:00
xiaojunnuo
e19743f705 perf: count tip 2026-02-05 00:07:15 +08:00
xiaojunnuo
9166a57930 perf: 当域名管理中没有域名时,创建流水线时不展开域名选择框 2026-02-04 23:09:16 +08:00
xiaojunnuo
bd511f97cb fix: 修复新网找错域名的bug 2026-02-03 18:28:41 +08:00
xiaojunnuo
560bf40e4b chore: 1 2026-02-03 16:28:11 +08:00
xiaojunnuo
4f4652c1cd docs: 1 2026-02-03 12:28:30 +08:00
xiaojunnuo
60e13c2a1d Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev 2026-02-03 09:50:29 +08:00
xiaojunnuo
1fe0dc4d16 chore: 1 2026-02-03 09:50:23 +08:00
xiaojunnuo
181a1e3c0a build: release 2026-02-03 00:18:06 +08:00
xiaojunnuo
6bba771856 build: publish 2026-02-03 00:04:32 +08:00
xiaojunnuo
921f1f42fb build: trigger build image 2026-02-03 00:04:20 +08:00
xiaojunnuo
eeb1f27fa4 v1.38.5 2026-02-03 00:02:52 +08:00
xiaojunnuo
9ce21ad152 build: prepare to build 2026-02-02 23:59:55 +08:00
xiaojunnuo
c036929cfe chore: order count 2026-02-02 23:40:10 +08:00
xiaojunnuo
21591a3a89 chore: plus失效原因显示 2026-02-02 16:54:23 +08:00
xiaojunnuo
a2e9a41a7e perf: 支持绑定两个url地址 2026-02-02 16:36:43 +08:00
xiaojunnuo
0902349130 Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev 2026-02-02 15:31:17 +08:00
xiaojunnuo
f900db8e10 chore: 赞助数量状态样式 2026-02-02 15:31:02 +08:00
xiaojunnuo
0fa9b344e0 perf: 将重置密码的日志挪到启动成功之后,方便查看 2026-02-02 11:46:55 +08:00
xiaojunnuo
f48ef3d17b Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev 2026-02-02 11:31:27 +08:00
xiaojunnuo
40801d0a06 fix: 某些情况下登陆页面没有显示重置密码文档链接的问题 2026-02-02 11:31:17 +08:00
xiaojunnuo
c6ccf1cf21 chore: vscode 显示多存储库 2026-02-02 10:21:25 +08:00
xiaojunnuo
d311992983 chore: vip modal content转到单独的组件中 2026-02-02 02:29:26 +08:00
xiaojunnuo
b4babbe2c7 chore: bindUrl2初步 2026-02-02 02:02:58 +08:00
xiaojunnuo
0719f4c99e fix: 修复部署到火山引擎vod,获取域名列表为空的bug 2026-02-01 23:10:45 +08:00
xiaojunnuo
eb5de15033 fix: 修复oidc配置取消后获取登出地址失败后无法列出oauth列表的bug 2026-02-01 22:43:35 +08:00
xiaojunnuo
b229486d3b chore: 1 2026-02-01 15:43:19 +08:00
xiaojunnuo
33b8d3e219 chore: aliyun esa ok 2026-02-01 15:40:35 +08:00
xiaojunnuo
230256793f fix: 阿里云esa查询证书限制接口无效,改成配置证书数量上限检查方式进行清理 2026-02-01 15:37:45 +08:00
xiaojunnuo
540ef96745 fix: 修复litessl new-nonce报428的bug 2026-02-01 15:25:28 +08:00
xiaojunnuo
1baf30a671 build: release 2026-02-01 02:25:55 +08:00
xiaojunnuo
5e93840e48 build: publish 2026-02-01 02:12:29 +08:00
xiaojunnuo
73a5908039 build: trigger build image 2026-02-01 02:12:17 +08:00
xiaojunnuo
8429148273 v1.38.4 2026-02-01 02:10:55 +08:00
xiaojunnuo
17f40e2180 build: prepare to build 2026-02-01 02:08:21 +08:00
xiaojunnuo
0345b12379 chore: 1 2026-02-01 02:04:12 +08:00
xiaojunnuo
163b0de874 chore: acepanel 2026-02-01 02:00:10 +08:00
xiaojunnuo
1661caed05 perf: 支持部署到AcePanel 2026-02-01 01:58:21 +08:00
xiaojunnuo
1089aeab9e chore: 阿里云上传证书返回值优化为带region的 2026-01-31 19:36:37 +08:00
xiaojunnuo
1a0d3eeb1b perf: 支持部署到阿里云GA 2026-01-31 19:30:20 +08:00
xiaojunnuo
c27636529d chore: 1 2026-01-31 03:11:29 +08:00
xiaojunnuo
ac85488245 perf: 优化证书未过期时的任务日志提示 2026-01-31 03:04:58 +08:00
xiaojunnuo
433e98b645 perf: 当ip证书天数太小时,自动调整更新天数,避免每次运行都重新申请ip证书 2026-01-31 02:54:33 +08:00
xiaojunnuo
873654669e chore: 支持从domain中查询子域名托管 2026-01-31 02:39:28 +08:00
xiaojunnuo
8b96f218d5 fix: 修复1:: 形式的ipv6校验失败的bug 2026-01-31 02:07:06 +08:00
xiaojunnuo
52cbff0e15 perf: 首页证书数量支持点击跳转 2026-01-31 01:09:49 +08:00
xiaojunnuo
32de8d9ccb fix: 修复阿里云esa超过免费配额之后无法部署证书的bug,改成删除最旧的那张证书 2026-01-30 19:13:30 +08:00
xiaojunnuo
e06da886f7 Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev 2026-01-30 17:15:39 +08:00
xiaojunnuo
cdd5ad3a8e chore: 1 2026-01-30 17:10:31 +08:00
xiaojunnuo
9bee0e460b perf: 修复旧版本流水线数据发送通知标题为空的bug 2026-01-30 17:08:17 +08:00
xiaojunnuo
60c8ace443 perf: 支持部署到华为elb 2026-01-29 23:39:57 +08:00
xiaojunnuo
933aaeaf25 chore: cfTurnstile 2026-01-29 22:10:27 +08:00
xiaojunnuo
ca43c77525 perf: 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了 2026-01-29 17:21:39 +08:00
xiaojunnuo
b204182c13 build: release 2026-01-29 01:17:50 +08:00
xiaojunnuo
dfb4165a12 build: release 2026-01-29 01:16:15 +08:00
xiaojunnuo
26a54cd228 build: publish 2026-01-29 01:03:11 +08:00
xiaojunnuo
e229f14121 build: trigger build image 2026-01-29 01:02:59 +08:00
xiaojunnuo
ee6cdfb391 v1.38.3 2026-01-29 01:01:31 +08:00
xiaojunnuo
58354e563c build: prepare to build 2026-01-29 00:57:53 +08:00
xiaojunnuo
48f1bf0918 perf: 站点监控,检查状态挪到前面显示 2026-01-29 00:57:29 +08:00
xiaojunnuo
0ffe1f2cef chore: metadata refresh 2026-01-29 00:50:45 +08:00
xiaojunnuo
8fe1adacf3 build: prepare to build 2026-01-29 00:48:55 +08:00
xiaojunnuo
30245c5d8a chore: 移除错误引用 2026-01-29 00:48:50 +08:00
xiaojunnuo
67a5225bde chore: 修复默认更新天数无效的bug 2026-01-29 00:46:29 +08:00
xiaojunnuo
58c3d7087b perf: 证书仓库页面增加到期状态查询条件 2026-01-29 00:38:33 +08:00
xiaojunnuo
c408687af7 perf: ucloud支持部署到ulb(alb、clb统一成一个) 2026-01-28 23:53:57 +08:00
xiaojunnuo
33b284afc0 fix: 站点检查多个ip连接超时的报错显示不出来的bug 2026-01-28 19:22:00 +08:00
xiaojunnuo
78004bdfb5 perf: ucloud支持部署到alb 2026-01-27 19:25:50 +08:00
xiaojunnuo
640950d4c8 perf: 部署插件支持ucloud alb 2026-01-27 00:32:23 +08:00
xiaojunnuo
998de0f9a0 perf: 优化首页图标 2026-01-27 00:32:03 +08:00
xiaojunnuo
ce6e515309 chore: tour 2026-01-26 19:07:29 +08:00
xiaojunnuo
e054c8fc55 perf: 首次使用提示新手教程按钮 2026-01-26 18:49:16 +08:00
xiaojunnuo
9fa1c2eb3e perf: 优化首页统计数据,饼图替换成证书数量统计 2026-01-26 00:42:47 +08:00
xiaojunnuo
64a314c19e chore: zindex 2026-01-25 23:08:42 +08:00
xiaojunnuo
40be42406c perf: 输入证书域名时,支持点击导入域名 2026-01-25 22:57:59 +08:00
xiaojunnuo
bca0eefc83 chore: domain import icon 2026-01-25 13:06:19 +08:00
xiaojunnuo
662ca19f8f chore: domain import 优化 2026-01-25 13:01:12 +08:00
xiaojunnuo
65f9d482f3 chore: domain import task 2026-01-25 02:09:16 +08:00
xiaojunnuo
7058d5cb93 perf: 域名导入任务进度条 2026-01-25 00:50:36 +08:00
xiaojunnuo
f7b13c69e9 chore: page turn 2026-01-24 23:36:44 +08:00
xiaojunnuo
9f21b1a097 perf: 所有的dnsprovider 支持导入域名列表 2026-01-23 18:37:38 +08:00
xiaojunnuo
53983002b6 fix: 当通知配置被删除时,使用默认通知配置进行发送 2026-01-23 17:10:10 +08:00
xiaojunnuo
d3c0914ac1 perf: 多个dns 提供商支持导入域名 2026-01-23 16:56:01 +08:00
xiaojunnuo
7eb9694221 perf: 支持导入51dns域名 2026-01-23 15:28:33 +08:00
xiaojunnuo
b8f0d37420 docs: 1 2026-01-23 14:13:53 +08:00
xiaojunnuo
1d5b1c239c perf: 证书流水线创建域名输入框支持获取域名数据进行选择 2026-01-22 18:33:39 +08:00
xiaojunnuo
d1ebc08478 chore: publish 优化 2026-01-22 13:50:20 +08:00
xiaojunnuo
5074a91669 build: release 2026-01-22 13:11:06 +08:00
xiaojunnuo
40e56c4040 build: publish 2026-01-22 12:32:55 +08:00
xiaojunnuo
3b0ed9310a build: trigger build image 2026-01-22 12:32:42 +08:00
224 changed files with 6953 additions and 1163 deletions

View File

@@ -30,7 +30,7 @@ jobs:
- name: publish_to_github
id: publish_to_github
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export GITHUB_TOKEN=${{ secrets.GH_TOKEN }}
rm -rf ./pnpm*.yaml
npm install -g pnpm
pnpm install

View File

@@ -13,5 +13,12 @@
"explorer.autoReveal": false,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
},
"[less]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"scm.repositories.visible": 9,
"scm.repositories.explorer": false,
"scm.repositories.selectionMode": "multiple",
"scm.repositories.sortOrder": "discovery time"
}

View File

@@ -3,6 +3,87 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
### Bug Fixes
* 修复有域名记录时域名输入框无法关闭的bug ([54c8217](https://github.com/certd/certd/commit/54c8217808453b121abf646b004596f28932509f))
### Performance Improvements
* eab从更多参数中挪到外面 ([5ea4f46](https://github.com/certd/certd/commit/5ea4f46de7ae403a7a16e9488dc1d9c7523d019a))
* 第三方登录支持Microsoft ([beb7a4c](https://github.com/certd/certd/commit/beb7a4c99277262bb9681c5594cfcd3e36c52074))
* 优化zerossl申请证书稳定性 ([4d86fb3](https://github.com/certd/certd/commit/4d86fb319b81dbf6fa6485982105725b1b066593))
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
### Bug Fixes
* 修复新网找错域名的bug ([bd511f9](https://github.com/certd/certd/commit/bd511f97cb7fbdcaeff7ac899f0460a5c7b41826))
### Performance Improvements
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([9166a57](https://github.com/certd/certd/commit/9166a579301a60750f0b72b6a42b0c8d730695fd))
* count tip ([e19743f](https://github.com/certd/certd/commit/e19743f70553700f1f91bff76f87370f749dd247))
* oauth支持github 和google 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
### Bug Fixes
* 阿里云esa查询证书限制接口无效改成配置证书数量上限检查方式进行清理 ([2302567](https://github.com/certd/certd/commit/230256793f8ad87ef8a0738c37108bf7b5ab9853))
* 某些情况下登陆页面没有显示重置密码文档链接的问题 ([40801d0](https://github.com/certd/certd/commit/40801d0a0668c77adb57fae42b4b6615b198a88d))
* 修复部署到火山引擎vod获取域名列表为空的bug ([0719f4c](https://github.com/certd/certd/commit/0719f4c99e9198544d03431107b53652e076e881))
* 修复litessl new-nonce报428的bug ([540ef96](https://github.com/certd/certd/commit/540ef967457a7871637cfdb5012ed1fa3261757b))
* 修复oidc配置取消后获取登出地址失败后无法列出oauth列表的bug ([eb5de15](https://github.com/certd/certd/commit/eb5de150332fd914c56b812c3ba2c2445f902bb7))
### Performance Improvements
* 将重置密码的日志挪到启动成功之后,方便查看 ([0fa9b34](https://github.com/certd/certd/commit/0fa9b344e08cf355aee7a7566f061cc5d95dc374))
* 支持绑定两个url地址 ([a2e9a41](https://github.com/certd/certd/commit/a2e9a41a7e712395c0e3ee6fe55b370aa1fc1f12))
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
### Bug Fixes
* 修复1:: 形式的ipv6校验失败的bug ([8b96f21](https://github.com/certd/certd/commit/8b96f218d5284033f10c186c0ce18e4c16d8e9b2))
* 修复阿里云esa超过免费配额之后无法部署证书的bug改成删除最旧的那张证书 ([32de8d9](https://github.com/certd/certd/commit/32de8d9ccb08d26414adbdde950d7cd405dc344a))
### Performance Improvements
* 当ip证书天数太小时自动调整更新天数避免每次运行都重新申请ip证书 ([433e98b](https://github.com/certd/certd/commit/433e98b6450fa7d0491151f159e432bf3dfe4feb))
* 首页证书数量支持点击跳转 ([52cbff0](https://github.com/certd/certd/commit/52cbff0e15329aecd3edcf81315fb7ceab9ec290))
* 修复旧版本流水线数据发送通知标题为空的bug ([9bee0e4](https://github.com/certd/certd/commit/9bee0e460bfebe8db76742b80b2d52854392f4de))
* 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了 ([ca43c77](https://github.com/certd/certd/commit/ca43c775250154def63c4acd96d65dc95d1c0c2b))
* 优化证书未过期时的任务日志提示 ([ac85488](https://github.com/certd/certd/commit/ac85488245197694560aad7df9425ca215ef7ff7))
* 支持部署到阿里云GA ([1a0d3ee](https://github.com/certd/certd/commit/1a0d3eeb1b0b5ce08f05af84b6161e00c1fe1815))
* 支持部署到华为elb ([60c8ace](https://github.com/certd/certd/commit/60c8ace443e848155d3ce12e95b84766a4610d3a))
* 支持部署到AcePanel ([1661cae](https://github.com/certd/certd/commit/1661caed05e3413dc3e2b14ce62b75aa03ad90e0))
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Bug Fixes
* 当通知配置被删除时,使用默认通知配置进行发送 ([5398300](https://github.com/certd/certd/commit/53983002b6553a929b72e2c70a26809a9f306e89))
* 站点检查多个ip连接超时的报错显示不出来的bug ([33b284a](https://github.com/certd/certd/commit/33b284afc0ae6391658d573e32b1ce7765e51cb2))
### Performance Improvements
* 部署插件支持ucloud alb ([640950d](https://github.com/certd/certd/commit/640950d4c847c72cae2986e3c2cae10d52a67fdf))
* 多个dns 提供商支持导入域名 ([d3c0914](https://github.com/certd/certd/commit/d3c0914ac16db8ac77f9c60285bb20cfab7a3cb0))
* 首次使用提示新手教程按钮 ([e054c8f](https://github.com/certd/certd/commit/e054c8fc55063fd96548f1c19049070524a63411))
* 输入证书域名时,支持点击导入域名 ([40be424](https://github.com/certd/certd/commit/40be42406c6fd5de11f594fc6913178d9e7d8943))
* 所有的dnsprovider 支持导入域名列表 ([9f21b1a](https://github.com/certd/certd/commit/9f21b1a09797d7dab253e4416c538b55fb8f4488))
* 优化首页统计数据,饼图替换成证书数量统计 ([9fa1c2e](https://github.com/certd/certd/commit/9fa1c2eb3e55ef630333ae24284aa8b54e3414b6))
* 优化首页图标 ([998de0f](https://github.com/certd/certd/commit/998de0f9a031339b019aa7a09e61e994664a8047))
* 域名导入任务进度条 ([7058d5c](https://github.com/certd/certd/commit/7058d5cb935cab8c75b98493ed497a22dbe70883))
* 站点监控,检查状态挪到前面显示 ([48f1bf0](https://github.com/certd/certd/commit/48f1bf091869b87dd17feaca5efd8680ef741582))
* 证书仓库页面增加到期状态查询条件 ([58c3d70](https://github.com/certd/certd/commit/58c3d7087bb66358d896a741e12005f690b2bd5e))
* 证书流水线创建域名输入框支持获取域名数据进行选择 ([1d5b1c2](https://github.com/certd/certd/commit/1d5b1c239cf350920eb2eb9fd293af74ef412853))
* 支持导入51dns域名 ([7eb9694](https://github.com/certd/certd/commit/7eb96942214aed0dfc9c3c5a669374da67052c49))
* ucloud支持部署到alb ([78004bd](https://github.com/certd/certd/commit/78004bdfb552a3b83298fa09d518ca282a529d90))
* ucloud支持部署到ulbalb、clb统一成一个 ([c408687](https://github.com/certd/certd/commit/c408687af7669afe733b5506720ca795555acdce))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
### Bug Fixes

View File

@@ -39,7 +39,7 @@ Certd® 是一个免费的全自动证书管理系统,让你的网站证书永
* **站点证书监控** 定时监控网站证书的过期时间
* **多用户管理** 用户可以管理自己的证书流水线
* **多语言支持** 中英双语切换
* **一键无忧升级** 版本向下兼容
* **无忧升级** 版本向下兼容
![](./docs/images/intro/intro.svg)

View File

@@ -3,6 +3,91 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
### Bug Fixes
* 修复新网找错域名的bug ([bd511f9](https://github.com/certd/certd/commit/bd511f97cb7fbdcaeff7ac899f0460a5c7b41826))
### Performance Improvements
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([9166a57](https://github.com/certd/certd/commit/9166a579301a60750f0b72b6a42b0c8d730695fd))
* count tip ([e19743f](https://github.com/certd/certd/commit/e19743f70553700f1f91bff76f87370f749dd247))
* oauth支持github 和google 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
### Bug Fixes
* 阿里云esa查询证书限制接口无效改成配置证书数量上限检查方式进行清理 ([2302567](https://github.com/certd/certd/commit/230256793f8ad87ef8a0738c37108bf7b5ab9853))
* 某些情况下登陆页面没有显示重置密码文档链接的问题 ([40801d0](https://github.com/certd/certd/commit/40801d0a0668c77adb57fae42b4b6615b198a88d))
* 修复部署到火山引擎vod获取域名列表为空的bug ([0719f4c](https://github.com/certd/certd/commit/0719f4c99e9198544d03431107b53652e076e881))
* 修复litessl new-nonce报428的bug ([540ef96](https://github.com/certd/certd/commit/540ef967457a7871637cfdb5012ed1fa3261757b))
* 修复oidc配置取消后获取登出地址失败后无法列出oauth列表的bug ([eb5de15](https://github.com/certd/certd/commit/eb5de150332fd914c56b812c3ba2c2445f902bb7))
### Performance Improvements
* 将重置密码的日志挪到启动成功之后,方便查看 ([0fa9b34](https://github.com/certd/certd/commit/0fa9b344e08cf355aee7a7566f061cc5d95dc374))
* 支持绑定两个url地址 ([a2e9a41](https://github.com/certd/certd/commit/a2e9a41a7e712395c0e3ee6fe55b370aa1fc1f12))
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
### Bug Fixes
* 修复1:: 形式的ipv6校验失败的bug ([8b96f21](https://github.com/certd/certd/commit/8b96f218d5284033f10c186c0ce18e4c16d8e9b2))
* 修复阿里云esa超过免费配额之后无法部署证书的bug改成删除最旧的那张证书 ([32de8d9](https://github.com/certd/certd/commit/32de8d9ccb08d26414adbdde950d7cd405dc344a))
### Performance Improvements
* 当ip证书天数太小时自动调整更新天数避免每次运行都重新申请ip证书 ([433e98b](https://github.com/certd/certd/commit/433e98b6450fa7d0491151f159e432bf3dfe4feb))
* 首页证书数量支持点击跳转 ([52cbff0](https://github.com/certd/certd/commit/52cbff0e15329aecd3edcf81315fb7ceab9ec290))
* 修复旧版本流水线数据发送通知标题为空的bug ([9bee0e4](https://github.com/certd/certd/commit/9bee0e460bfebe8db76742b80b2d52854392f4de))
* 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了 ([ca43c77](https://github.com/certd/certd/commit/ca43c775250154def63c4acd96d65dc95d1c0c2b))
* 优化证书未过期时的任务日志提示 ([ac85488](https://github.com/certd/certd/commit/ac85488245197694560aad7df9425ca215ef7ff7))
* 支持部署到阿里云GA ([1a0d3ee](https://github.com/certd/certd/commit/1a0d3eeb1b0b5ce08f05af84b6161e00c1fe1815))
* 支持部署到华为elb ([60c8ace](https://github.com/certd/certd/commit/60c8ace443e848155d3ce12e95b84766a4610d3a))
* 支持部署到AcePanel ([1661cae](https://github.com/certd/certd/commit/1661caed05e3413dc3e2b14ce62b75aa03ad90e0))
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Bug Fixes
* 当通知配置被删除时,使用默认通知配置进行发送 ([5398300](https://github.com/certd/certd/commit/53983002b6553a929b72e2c70a26809a9f306e89))
* 站点检查多个ip连接超时的报错显示不出来的bug ([33b284a](https://github.com/certd/certd/commit/33b284afc0ae6391658d573e32b1ce7765e51cb2))
### Performance Improvements
* 部署插件支持ucloud alb ([640950d](https://github.com/certd/certd/commit/640950d4c847c72cae2986e3c2cae10d52a67fdf))
* 多个dns 提供商支持导入域名 ([d3c0914](https://github.com/certd/certd/commit/d3c0914ac16db8ac77f9c60285bb20cfab7a3cb0))
* 首次使用提示新手教程按钮 ([e054c8f](https://github.com/certd/certd/commit/e054c8fc55063fd96548f1c19049070524a63411))
* 输入证书域名时,支持点击导入域名 ([40be424](https://github.com/certd/certd/commit/40be42406c6fd5de11f594fc6913178d9e7d8943))
* 所有的dnsprovider 支持导入域名列表 ([9f21b1a](https://github.com/certd/certd/commit/9f21b1a09797d7dab253e4416c538b55fb8f4488))
* 优化首页统计数据,饼图替换成证书数量统计 ([9fa1c2e](https://github.com/certd/certd/commit/9fa1c2eb3e55ef630333ae24284aa8b54e3414b6))
* 优化首页图标 ([998de0f](https://github.com/certd/certd/commit/998de0f9a031339b019aa7a09e61e994664a8047))
* 域名导入任务进度条 ([7058d5c](https://github.com/certd/certd/commit/7058d5cb935cab8c75b98493ed497a22dbe70883))
* 站点监控,检查状态挪到前面显示 ([48f1bf0](https://github.com/certd/certd/commit/48f1bf091869b87dd17feaca5efd8680ef741582))
* 证书仓库页面增加到期状态查询条件 ([58c3d70](https://github.com/certd/certd/commit/58c3d7087bb66358d896a741e12005f690b2bd5e))
* 证书流水线创建域名输入框支持获取域名数据进行选择 ([1d5b1c2](https://github.com/certd/certd/commit/1d5b1c239cf350920eb2eb9fd293af74ef412853))
* 支持导入51dns域名 ([7eb9694](https://github.com/certd/certd/commit/7eb96942214aed0dfc9c3c5a669374da67052c49))
* ucloud支持部署到alb ([78004bd](https://github.com/certd/certd/commit/78004bdfb552a3b83298fa09d518ca282a529d90))
* ucloud支持部署到ulbalb、clb统一成一个 ([c408687](https://github.com/certd/certd/commit/c408687af7669afe733b5506720ca795555acdce))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
### Bug Fixes
* 编辑插件author不允许出现符号 ([5ea2b09](https://github.com/certd/certd/commit/5ea2b09dc30397c086a2498f958f661e7fef10fc))
* 修复插件修改名字和删除后没有注销注册的bug ([61192b9](https://github.com/certd/certd/commit/61192b998a7088a8f446fd224cc242def462a79b))
* 修复流水线复制出错的bug ([418bcdd](https://github.com/certd/certd/commit/418bcddc95bf19d2659d2a9cfe336bc059d157b0))
### Performance Improvements
* 优化流水线创建入口,各种证书申请任务类型拆分成多个按钮 ([f75c73d](https://github.com/certd/certd/commit/f75c73d739ee271fb718148416836dbe09bb3266))
* 域名导入 ([ad64384](https://github.com/certd/certd/commit/ad64384891c13342980b7559924666dcfb2796c2))
* 支持从提供商导入域名列表 ([f442363](https://github.com/certd/certd/commit/f4423638a2ee779d48fc17b3819ce3bee55b0361))
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
* cname记录支持批量导入和导出 ([607afe8](https://github.com/certd/certd/commit/607afe864a12d6f50993895a4e10f4c9a3dd8fee))
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
### Bug Fixes

View File

@@ -1,14 +1,5 @@
# 专业版赞助
## 开源为什么要做专业版收费?
1. 纯靠为爱发电不可持续容易烂尾比如我的dev-sidecar项目即便是拥有20K+star也差点凉凉幸亏有另外大佬接手用爱发电
2. 没有赞助的项目,作者会比较任性,不会用心倾听用户的心声,不顾用户体验(比如:下意识拒绝需求、频繁破坏性变更升级、全盘推倒重来之类的)
3. 没有赞助的项目,交流群的戾气有时候比较重,容易起冲突
## 赞助权益:
1. 可加入专属VIP群可以获得作者一对一技术支持必要时可以远程协助
# 专业版赞助
## 开源为什么要做专业版收费?
1. 纯靠为爱发电不可持续,容易烂尾(比如:我的[dev-sidecar项目](https://github.com/docmirror/dev-sidecar)即便是拥有20K+star也差点凉凉幸亏有另外大佬接手用爱发电
2. 没有赞助的项目,作者会比较任性,不会用心倾听用户的心声,不顾用户体验(比如:下意识拒绝需求、频繁破坏性变更升级、全盘推倒重来之类的)

View File

@@ -15,6 +15,8 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
![首页](../images/start/home.png)
![](../images/start/first.png)
## 1、关于证书续期
>* 实际上没有办法不改变证书文件本身情况下直接续期或者续签。
>* 我们所说的续期,其实就是按照全套流程重新申请一份新证书,然后重新部署上去。

24
docs/guide/info.json Normal file
View File

@@ -0,0 +1,24 @@
{
"notice": "永久专业版上线新用户立减50升级到最新版点击下方“立即赞助”按钮前往获取",
"plus": {
"name": "专业版",
"price": "89.9",
"price3": "199",
"tooltip": "开源需要您的赞助支持",
"priceText":"¥89.9/年",
"discountText":"永久专业版50优惠券立即领取"
},
"comm": {
"name": "商业版",
"price": "399",
"price3": "899",
"tooltip": "3年优惠300",
"priceText":"¥399/年",
"discountText":"¥899/3年3年优惠300"
},
"app":{
"minVersion":"1.36.0",
"minVersionTip":"版本过低,为了您的数据安全,请尽快升级"
}
}

View File

@@ -5,12 +5,20 @@
![](./images/1.png)
:::tip
接口key分两种权限范围
1. 仅开放接口: 仅能访问下面`接口文档`中的接口
2. 用户级别: 可访问Certd所有接口没有文档可以在浏览器中F12抓取网络请求参考
:::
## 接口文档
https://apifox.com/apidoc/shared-2e76f8c4-7c58-413b-a32d-a1316529af44/254949529e0
## Token生成方法
### Token生成方法
header中传入x-certd-token即可调用开放接口
1、首先从OpenKey页面生成keyIdkeySecret
@@ -19,10 +27,10 @@ header中传入x-certd-token即可调用开放接口
4、然后将content和sign分别base64后用.号连接: x-certd-token = base64(content) +"."+base64(sign)
## 参数
### 参数
支持证书id和域名两种方式获取证书。
## 创建新的证书申请
### 创建新的证书申请
参数autoApply=true将在没有证书时自动触发申请证书检查逻辑如下
1. 如果证书仓库里面有,且没有过期,就直接返回证书
2. 如果没有或者已过期,就会去找流水线,有就触发流水线执行
@@ -30,7 +38,7 @@ header中传入x-certd-token即可调用开放接口
4. 再次采用相同参数请求接口,如果在申请过程中,就会提示`正在申请中`,可轮循获取状态,直到证书申请成功。
## SDK
### SDK
待开发
## 客户端工具

View File

@@ -14,62 +14,63 @@
| 10.| **baota授权** | |
| 11.| **天翼云授权** | |
| 12.| **51dns授权** | |
| 13.| **SFTP授权** | |
| 14.| **阿里云OSS授权** | 包含地域和Bucket |
| 15.| **APISIX授权** | |
| 16.| **亚马逊云aws授权** | |
| 17.| **亚马逊云科技(国区)授权** | |
| 18.| **CacheFly** | CacheFly |
| 19.| **EAB授权** | ZeroSSL证书申请需要EAB授权 |
| 20.| **google cloud** | 谷歌云授权 |
| 21.| **cloudflare授权** | |
| 22.| **中国移动CND授权** | |
| 23.| **授权插件示例** | |
| 24.| **dns.la授权** | |
| 25.| **多吉云** | |
| 26.| **Dokploy授权** | |
| 27.| **farcdn授权** | |
| 28.| **FlexCDN授权** | |
| 29.| **Gcore** | Gcore |
| 30.| **Github授权** | |
| 31.| **godaddy授权** | |
| 32.| **金山云授权** | |
| 33.| **FTP授权** | |
| 34.| **七牛OSS授权** | |
| 35.| **腾讯云COS授权** | 腾讯云对象存储授权,包含地域和存储桶 |
| 36.| **s3/minio授权** | S3/minio oss授权 |
| 37.| **namesilo授权** | |
| 38.| **1panel授权** | 账号和密码 |
| 39.| **支付宝** | |
| 40.| **白山云授权** | |
| 41.| **宝塔云WAF授权** | 用于连接和管理宝塔云WAF服务的授权配置 |
| 42.| **cdnfly授权** | |
| 43.| **k8s授权** | |
| 44.| **括彩云cdn授权** | 括彩云CDN每月免费30G[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
| 45.| **LeCDN授权** | |
| 46.| **lucky** | |
| 47.| **猫云授权** | |
| 48.| **plesk授权** | |
| 49.| **长亭雷池授权** | |
| 50.| **群晖登录授权** | |
| 51.| **uniCloud** | unicloud授权 |
| 52.| **微信支付** | |
| 53.| **易盾rcdn授权** | 易盾CDN每月免费30G[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) |
| 54.| **易发云短信** | sms.yfyidc.cn/ |
| 55.| **易盾DCDN授权** | https://user.yiduncdn.com |
| 56.| **易支付** | |
| 57.| **proxmox** | |
| 58.| **UCloud授权** | 优刻得授权 |
| 59.| **又拍云** | |
| 60.| **网宿授权** | |
| 61.| **西部数码授权** | |
| 62.| **我爱云授权** | 我爱云CDN |
| 63.| **新网授权(代理方式)** | |
| 64.| **新网授权** | |
| 65.| **新网互联授权** | 仅支持代理账号ip需要加入白名单 |
| 66.| **Zenlayer授权** | Zenlayer授权 |
| 67.| **GoEdge授权** | |
| 68.| **雨云授权** | https://app.rainyun.com/ |
| 13.| **AcePanel授权** | |
| 14.| **SFTP授权** | |
| 15.| **阿里云OSS授权** | 包含地域和Bucket |
| 16.| **APISIX授权** | |
| 17.| **亚马逊云aws授权** | |
| 18.| **亚马逊云科技(国区)授权** | |
| 19.| **CacheFly** | CacheFly |
| 20.| **EAB授权** | ZeroSSL证书申请需要EAB授权 |
| 21.| **google cloud** | 谷歌云授权 |
| 22.| **cloudflare授权** | |
| 23.| **中国移动CND授权** | |
| 24.| **授权插件示例** | 这是一个示例授权插件,用于演示如何实现一个授权插件 |
| 25.| **dns.la授权** | |
| 26.| **多吉云** | |
| 27.| **Dokploy授权** | |
| 28.| **farcdn授权** | |
| 29.| **FlexCDN授权** | |
| 30.| **Gcore** | Gcore |
| 31.| **Github授权** | |
| 32.| **godaddy授权** | |
| 33.| **金山云授权** | |
| 34.| **FTP授权** | |
| 35.| **七牛OSS授权** | |
| 36.| **腾讯云COS授权** | 腾讯云对象存储授权,包含地域和存储桶 |
| 37.| **s3/minio授权** | S3/minio oss授权 |
| 38.| **namesilo授权** | |
| 39.| **1panel授权** | 账号和密码 |
| 40.| **支付宝** | |
| 41.| **白山云授权** | |
| 42.| **宝塔云WAF授权** | 用于连接和管理宝塔云WAF服务的授权配置 |
| 43.| **cdnfly授权** | |
| 44.| **k8s授权** | |
| 45.| **括彩云cdn授权** | 括彩云CDN每月免费30G[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
| 46.| **LeCDN授权** | |
| 47.| **lucky** | |
| 48.| **猫云授权** | |
| 49.| **plesk授权** | |
| 50.| **长亭雷池授权** | |
| 51.| **群晖登录授权** | |
| 52.| **uniCloud** | unicloud授权 |
| 53.| **微信支付** | |
| 54.| **易盾rcdn授权** | 易盾CDN每月免费30G[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) |
| 55.| **易发云短信** | sms.yfyidc.cn/ |
| 56.| **易盾DCDN授权** | https://user.yiduncdn.com |
| 57.| **易支付** | |
| 58.| **proxmox** | |
| 59.| **UCloud授权** | 优刻得授权 |
| 60.| **又拍云** | |
| 61.| **网宿授权** | |
| 62.| **西部数码授权** | |
| 63.| **我爱云授权** | 我爱云CDN |
| 64.| **新网授权(代理方式)** | |
| 65.| **新网授权** | |
| 66.| **新网互联授权** | 仅支持代理账号ip需要加入白名单 |
| 67.| **Zenlayer授权** | Zenlayer授权 |
| 68.| **GoEdge授权** | |
| 69.| **雨云授权** | https://app.rainyun.com/ |
<style module>
table th:first-of-type {

View File

@@ -1,11 +1,11 @@
# 任务插件
`116` 款任务插件
`122` 款任务插件
## 1. 证书申请
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **证书申请JS版** | 免费通配符域名证书申请,支持多个域名打到同一个证书上 |
| 2.| **商用证书托管** | 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次) |
| 2.| **已有证书托管** | 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次) |
| 3.| **获取阿里云订阅证书** | 从阿里云拉取订阅模式的商用证书 |
| 4.| **证书申请Lego** | 支持海量DNS解析提供商推荐使用一样的免费通配符域名证书申请支持多个域名打到同一个证书上 |
## 2. 主机
@@ -53,26 +53,28 @@
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **Dokploy-部署server证书** | 自动更新Dokploy server证书 |
| 2.| **飞牛NAS-部署证书** | |
| 3.| **1Panel-部署面板证书** | 更新1Panel的面板证书 |
| 4.| **1Panel-更新证书** | 更新1Panel的证书包括面板证书和站点证书 |
| 5.| **宝塔-删除过期证书** | 删除证书夹中过期证书 |
| 6.| **宝塔-WAF证书部署** | 部署宝塔云WAF/aaWAF |
| 7.| **宝塔-面板证书部署** | 部署宝塔面板本身的ssl证书 |
| 8.| **宝塔win-网站证书部署** | 部署到Windows版宝塔管理的站点的ssl证书 |
| 9.| **宝塔-网站证书部署** | 部署宝塔管理的站点的ssl证书目前支持宝塔网站站点、docker站点等。本插件也支持aaPanel。 |
| 10.| **K8S-Apply自定义yaml** | apply自定义yaml到k8s |
| 11.| **K8S-Ingress 证书部署** | 部署证书到k8s的Ingress |
| 12.| **K8S-部署证书到Secret** | 部署证书到k8s的secret |
| 13.| **lucky-更新Lucky证书** | |
| 14.| **Plesk-部署Plesk网站证书** | |
| 15.| **Plesk-更新证书** | 不会创建新证书记录,直接更新旧的证书 |
| 16.| **雷池-更新证书** | 更新长亭雷池WAF的证书 |
| 17.| **群晖-部署证书到群晖面板** | Synology支持6.x以上版本 |
| 18.| **uniCloud-部署到服务空间** | 部署到服务空间 |
| 19.| **Proxmox-上传证书到Proxmox** | |
| 20.| **威联通-部署证书到威联通** | 部署证书到qnap |
| 1.| **AcePanel-部署到网站** | 上传证书并部署到指定网站 |
| 2.| **AcePanel-面板证书** | 部署AcePanel面板证书 |
| 3.| **Dokploy-部署server证书** | 自动更新Dokploy server证书 |
| 4.| **飞牛NAS-部署证书** | |
| 5.| **1Panel-部署面板证书** | 更新1Panel的面板证书 |
| 6.| **1Panel-更新证书** | 更新1Panel的证书包括面板证书和站点证书 |
| 7.| **宝塔-删除过期证书** | 删除证书夹中过期证书 |
| 8.| **宝塔-WAF证书部署** | 部署宝塔云WAF/aaWAF |
| 9.| **宝塔-面板证书部署** | 部署宝塔面板本身的ssl证书 |
| 10.| **宝塔win-网站证书部署** | 部署到Windows版宝塔管理的站点的ssl证书 |
| 11.| **宝塔-网站证书部署** | 部署宝塔管理的站点的ssl证书目前支持宝塔网站站点、docker站点等。本插件也支持aaPanel。 |
| 12.| **K8S-Apply自定义yaml** | apply自定义yaml到k8s |
| 13.| **K8S-Ingress 证书部署** | 部署证书到k8s的Ingress |
| 14.| **K8S-部署证书到Secret** | 部署证书到k8s的secret |
| 15.| **lucky-更新Lucky证书** | |
| 16.| **Plesk-部署Plesk网站证书** | |
| 17.| **Plesk-更新证书** | 不会创建新证书记录,直接更新旧的证书 |
| 18.| **雷池-更新证书** | 更新长亭雷池WAF的证书 |
| 19.| **群晖-部署证书到群晖面板** | Synology支持6.x以上版本 |
| 20.| **uniCloud-部署到服务空间** | 部署到服务空间 |
| 21.| **Proxmox-上传证书到Proxmox** | |
| 22.| **威联通-部署证书到威联通** | 部署证书到qnap |
## 5. 阿里云
| 序号 | 名称 | 说明 |
@@ -86,19 +88,21 @@
| 7.| **阿里云-部署证书至DCDN** | 依赖证书申请前置任务自动部署域名证书至阿里云DCDN |
| 8.| **阿里云-部署至ESA** | 部署证书到阿里云ESA(边缘安全加速),自动删除过期证书 |
| 9.| **阿里云-部署至阿里云FC(3.0)** | 部署证书到阿里云函数计算FC3.0 |
| 10.| **阿里云-部署至NLB网络负载均衡** | NLB,网络负载均衡,更新监听器的默认证书 |
| 11.| **阿里云-部署证书至OSS** | 部署域名证书至阿里云OSS自定义域名不是上传到阿里云oss |
| 12.| **阿里云-部署至CLB(传统负载均衡)** | 部署证书到阿里云CLB(传统负载均衡) |
| 13.| **阿里云-部署至VOD** | 部署证书到阿里云视频点播vod |
| 14.| **阿里云-部署至阿里云WAF** | 部署证书到阿里云WAF |
| 15.| **阿里云-上传证书到CAS** | 上传证书到阿里云证书管理服务CAS如果不想在阿里云上同一份证书上传多次可以把此任务作为前置任务其他阿里云任务证书那一项选择此任务的输出 |
| 10.| **阿里云-部署至GA** | 部署证书到阿里云GA(全球加速),支持更新默认证书和扩展证书 |
| 11.| **阿里云-部署至NLB网络负载均衡** | NLB,网络负载均衡,更新监听器的默认证书 |
| 12.| **阿里云-部署证书至OSS** | 部署域名证书至阿里云OSS自定义域名不是上传到阿里云oss |
| 13.| **阿里云-部署至CLB(传统负载均衡)** | 部署证书到阿里云CLB(传统负载均衡) |
| 14.| **阿里云-部署至VOD** | 部署证书到阿里云视频点播vod |
| 15.| **阿里云-部署至阿里云WAF** | 部署证书到阿里云WAF |
| 16.| **阿里云-上传证书到CAS** | 上传证书到阿里云证书管理服务CAS如果不想在阿里云上同一份证书上传多次可以把此任务作为前置任务其他阿里云任务证书那一项选择此任务的输出 |
## 6. 华为云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **华为云-部署证书至CDN** | |
| 2.| **华为云-部署证书至OBS** | |
| 3.| **华为云-上传证书至CCM** | 上传证书到华为云云证书管理CCM |
| 2.| **华为云-部署证书至ELB负载均衡** | |
| 3.| **华为云-部署证书至OBS** | |
| 4.| **华为云-上传证书至CCM** | 上传证书到华为云云证书管理CCM |
## 7. 腾讯云
| 序号 | 名称 | 说明 |
@@ -138,8 +142,10 @@
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **UCloud-部署到CDN** | 将证书部署到UCloud CDN |
| 2.| **UCloud-部署到WAF** | 将证书部署到UCloud WAF |
| 3.| **UCloud-上传到USSL** | 将证书上传到UCloud USSL |
| 2.| **UCloud-部署到负载均衡** | 将证书部署到UCloud负载均衡(ULB/ALB/CLB) |
| 3.| **UCloud-部署到对象存储(US3)** | 将证书部署到UCloud对象存储(US3) |
| 4.| **UCloud-部署到WAF** | 将证书部署到UCloud WAF |
| 5.| **UCloud-上传到USSL** | 将证书上传到UCloud USSL |
## 11. 百度云
| 序号 | 名称 | 说明 |

View File

@@ -52,3 +52,11 @@ service:
3. DNS 有其他平台申请过的_acme-challenge记录删除即可
## 7. DNS problem: NXDOMAIN looking up TXT for _acme-challenge.xxx
`
DNS problem: NXDOMAIN looking up TXT for _acme-challenge.xxxxx - check that a DNS record exists for this domain
`
证书颁发机构向域名ns查询TXT验证记录失败有以下几种可能
1、域名的ns服务器修改成别的了但申请证书时的DNS提供商选择错误检查确认配置正确的DNS提供商
2、证书颁发机构与ns域名服务器之间访问不通无法查询到TXT记录尝试更换证书颁发机构
3、ns服务商解析值生效慢尝试修改证书申请任务里面的等待生效时长600-1000s

View File

@@ -15,3 +15,4 @@
## 2. 图文教程链接
如果不方便登录系统,您还可以直接查看 [图文教程](https://gitee.com/certd/certd/blob/v2/step.md)
![alt text](../images/start/first.png)

BIN
docs/images/start/first.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.38.2"
"version": "1.38.7"
}

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/publishlab/node-acme-client/compare/v1.38.6...v1.38.7) (2026-02-05)
### Performance Improvements
* 优化zerossl申请证书稳定性 ([4d86fb3](https://github.com/publishlab/node-acme-client/commit/4d86fb319b81dbf6fa6485982105725b1b066593))
## [1.38.6](https://github.com/publishlab/node-acme-client/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/acme-client
## [1.38.5](https://github.com/publishlab/node-acme-client/compare/v1.38.4...v1.38.5) (2026-02-02)
### Bug Fixes
* 修复litessl new-nonce报428的bug ([540ef96](https://github.com/publishlab/node-acme-client/commit/540ef967457a7871637cfdb5012ed1fa3261757b))
## [1.38.4](https://github.com/publishlab/node-acme-client/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/acme-client
## [1.38.3](https://github.com/publishlab/node-acme-client/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/acme-client
## [1.38.2](https://github.com/publishlab/node-acme-client/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"module": "scr/index.js",
"main": "src/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.38.2",
"@certd/basic": "^1.38.7",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.9.0",
@@ -70,5 +70,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -103,7 +103,9 @@ class AcmeClient {
max: this.opts.backoffMax,
};
this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping, opts.logger);
const cacheNonce = true
// const cacheNonce = this.sslProvider === 'litessl';
this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping, opts.logger, cacheNonce);
this.api = new AcmeApi(this.http, this.opts.accountUrl);
this.logger = opts.logger;
}
@@ -598,7 +600,7 @@ class AcmeClient {
throw new Error(`[${d}] Unexpected item status: ${resp.data.status}`);
};
this.log(`[${d}] Waiting for valid status 等待valid状态: ${item.url}`, this.backoffOpts);
this.log(`[${d}] Waiting for valid status 等待valid状态: ${item.url}`, JSON.stringify(this.backoffOpts));
return util.retry(verifyFn, this.backoffOpts);
}

View File

@@ -19,7 +19,7 @@ import { getJwk } from './crypto/index.js';
*/
class HttpClient {
constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {},logger) {
constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {}, logger, cacheNonce= false) {
this.directoryUrl = directoryUrl;
this.accountKey = accountKey;
this.externalAccountBinding = externalAccountBinding;
@@ -31,7 +31,34 @@ class HttpClient {
this.directoryMaxAge = 86400;
this.directoryTimestamp = 0;
this.urlMapping = urlMapping;
this.log = logger? logger.info.bind(logger) : log;
this.log = logger ? logger.info.bind(logger) : log;
this.nonces = [];
this.cacheNonce = cacheNonce;
}
pushNonce(nonce) {
if (!this.cacheNonce || !nonce) {
return;
}
this.nonces.push({
nonce,
expires: Date.now() + 30*1000,
});
}
popNonce() {
while (true) {
if (this.nonces.length === 0) {
return null;
}
const item = this.nonces.shift();
if (!item) {
return null;
}
if (item.expires < Date.now()) {
continue;
}
return item.nonce;
}
}
/**
@@ -70,6 +97,13 @@ class HttpClient {
const resp = await axios.request(opts);
this.log(`RESP ${resp.status} ${method} ${url}`);
const nonce = resp.headers['replay-nonce'];
if (nonce) {
//如果有nonce
this.pushNonce(nonce);
}
return resp;
}
@@ -127,6 +161,13 @@ class HttpClient {
*/
async getNonce() {
//尝试从队列中pop一个nonce
const nonce = this.popNonce();
if (nonce) {
return nonce;
}
const url = await this.getResourceUrl('newNonce');
const resp = await this.request(url, 'head');
@@ -134,7 +175,11 @@ class HttpClient {
throw new Error('Failed to get nonce from ACME provider');
}
if (this.cacheNonce) {
return this.popNonce();
}
return resp.headers['replay-nonce'];
}
/**

View File

@@ -3,6 +3,35 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/basic
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/basic
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/basic
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
### Bug Fixes
* 修复1:: 形式的ipv6校验失败的bug ([8b96f21](https://github.com/certd/certd/commit/8b96f218d5284033f10c186c0ce18e4c16d8e9b2))
### Performance Improvements
* 支持部署到阿里云GA ([1a0d3ee](https://github.com/certd/certd/commit/1a0d3eeb1b0b5ce08f05af84b6161e00c1fe1815))
* 支持部署到华为elb ([60c8ace](https://github.com/certd/certd/commit/60c8ace443e848155d3ce12e95b84766a4610d3a))
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Bug Fixes
* 站点检查多个ip连接超时的报错显示不出来的bug ([33b284a](https://github.com/certd/certd/commit/33b284afc0ae6391658d573e32b1ce7765e51cb2))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/basic

View File

@@ -1 +1 @@
12:26
16:26

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -47,5 +47,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -58,8 +58,13 @@ function isIpv6(d: string) {
if (!d) {
return false;
}
const isIPv6Regex = /^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4})$/gm;
return isIPv6Regex.test(d);
try {
// 尝试构造URL用IPv6作为hostname
new URL(`http://[${d}]`);
return true;
} catch {
return false;
}
}
function isIp(d: string) {

View File

@@ -25,26 +25,30 @@ export class HttpError extends Error {
if (!error) {
return;
}
super(error.message || error.response?.statusText);
const message = error?.message;
let message = error?.message || error?.response.statusText || error?.code;
if (message && typeof message === "string" && message.indexOf) {
for (const key in errorMap) {
if (message.indexOf(key) > -1) {
this.message = `${this.message}(${errorMap[key]})`;
message = `${message}(${errorMap[key]})`;
break;
}
}
}
if (!message) {
message = error.message;
}
if (error.errors && error.errors.length > 0) {
message += " \n" + error.errors.map((item: any) => item.message).join("\n ");
}
super(message);
this.name = error.name;
this.code = error.code;
this.status = error.response?.status;
this.statusText = error.response?.statusText || error.code;
if (!this.message) {
this.message = error.code;
}
this.request = {
baseURL: error.config?.baseURL,
url: error.config?.url,
@@ -173,39 +177,40 @@ export function createAxiosService({ logger }: { logger: ILogger }) {
},
(error: any) => {
const status = error.response?.status;
let message = "";
switch (status) {
case 400:
error.message = "请求错误";
message = "请求错误";
break;
case 401:
error.message = "认证/登录失败";
message = "认证/登录失败";
break;
case 403:
error.message = "拒绝访问";
message = "拒绝访问";
break;
case 404:
error.message = `请求地址出错`;
message = `请求地址出错`;
break;
case 408:
error.message = "请求超时";
message = "请求超时";
break;
case 500:
error.message = "服务器内部错误";
message = "服务器内部错误";
break;
case 501:
error.message = "服务未实现";
message = "服务未实现";
break;
case 502:
error.message = "网关错误";
message = "网关错误";
break;
case 503:
error.message = "服务不可用";
message = "服务不可用";
break;
case 504:
error.message = "网关超时";
message = "网关超时";
break;
case 505:
error.message = "HTTP版本不受支持";
message = "HTTP版本不受支持";
break;
case 302:
//重定向
@@ -213,9 +218,12 @@ export function createAxiosService({ logger }: { logger: ILogger }) {
default:
break;
}
if (status) {
message += ` [${status}] `;
}
const errorCode = error.code;
let errorMessage = null;
let errorMessage = "";
if (errorCode === "ECONNABORTED") {
errorMessage = "请求连接终止";
} else if (errorCode === "ETIMEDOUT") {
@@ -227,11 +235,17 @@ export function createAxiosService({ logger }: { logger: ILogger }) {
} else if (errorCode === "ENOTFOUND") {
errorMessage = "请求地址不存在";
}
if (errorMessage) {
error.message = errorMessage + "," + error.message;
if (errorCode) {
errorMessage += ` [${errorCode}] `;
}
logger.error(`请求出错status:${error.response?.status || error.code},statusText:${error.response?.statusText || error.code},url:${error.config?.url},method:${error.config?.method}`);
if (message) {
errorMessage += `,${message}`;
}
if (error.message) {
errorMessage += `(${error.message})`;
}
error.message = errorMessage;
logger.error(`请求出错:${errorMessage} status:${status},statusText:${error.response?.statusText || error.code},url:${error.config?.url},method:${error.config?.method}`);
logger.error("返回数据:", JSON.stringify(error.response?.data));
if (error.response?.data) {
const message = error.response.data.message || error.response.data.msg || error.response.data.error;

View File

@@ -1,8 +1,17 @@
import dayjs from "dayjs";
export const stringUtils = {
maxLength(str?: string, length = 100) {
if (str) {
return str.length > length ? str.slice(0, length) + '...' : str;
return str.length > length ? str.slice(0, length) + "..." : str;
}
return '';
return "";
},
appendTimeSuffix(str?: string) {
if (str) {
return `${str}-${dayjs().format("YYYYMMDDHHmmssSSS")}`;
}
return "";
},
};

View File

@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/pipeline
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/pipeline
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/pipeline
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
### Performance Improvements
* 修复旧版本流水线数据发送通知标题为空的bug ([9bee0e4](https://github.com/certd/certd/commit/9bee0e460bfebe8db76742b80b2d52854392f4de))
* 支持部署到阿里云GA ([1a0d3ee](https://github.com/certd/certd/commit/1a0d3eeb1b0b5ce08f05af84b6161e00c1fe1815))
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/pipeline
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
### Bug Fixes

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -18,8 +18,8 @@
"compile": "tsc --skipLibCheck --watch"
},
"dependencies": {
"@certd/basic": "^1.38.2",
"@certd/plus-core": "^1.38.2",
"@certd/basic": "^1.38.7",
"@certd/plus-core": "^1.38.7",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"reflect-metadata": "^0.1.13"
@@ -45,5 +45,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -35,7 +35,14 @@ export class Pager {
}
}
export async function doPageTurn<T>(req: { pager: Pager; getPage: (pager: Pager) => Promise<PageRes<T>>; itemHandle?: (item: T) => Promise<void>; batchHandle?: (pageRes: PageRes<T>) => Promise<void> }) {
export type PageTurnReq<T = any> = {
pager: Pager;
getPage: (pager: Pager) => Promise<PageRes<T>>;
itemHandle?: (item: T) => Promise<void>;
batchHandle?: (pageRes: PageRes<T>) => Promise<void>;
};
export async function doPageTurn<T>(req: PageTurnReq<T>) {
let count = 0;
const { pager, getPage, itemHandle, batchHandle } = req;
while (true) {

View File

@@ -465,6 +465,8 @@ export class Executor {
templateData.errors = errors;
templateData.pipelineResult = pipelineResult;
templateData.title = subject;
templateData.content = content;
for (const notification of this.pipeline.notifications) {
if (!notification.when.includes(when)) {

View File

@@ -249,10 +249,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
abstract execute(): Promise<void | string>;
appendTimeSuffix(name?: string) {
if (name == null) {
name = "certd";
}
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
return utils.string.appendTimeSuffix(name);
}
buildCertName(domain: string, prefix = "") {
@@ -297,6 +294,10 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
getStepIdFromRefInput(ref = ".") {
return ref.split(".")[1];
}
buildDomainGroupOptions(options: any[], domains: string[]) {
return utils.options.buildGroupOptions(options, domains);
}
}
export type OutputVO = {

View File

@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/lib-huawei
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/lib-huawei
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/lib-huawei
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/lib-huawei
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/lib-huawei
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/lib-huawei

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -24,5 +24,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/lib-iframe
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/lib-iframe
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/lib-iframe
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/lib-iframe
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/lib-iframe
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/lib-iframe

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -31,5 +31,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/jdcloud
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/jdcloud
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/jdcloud
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/jdcloud
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/jdcloud
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/jdcloud

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/jdcloud",
"version": "1.38.2",
"version": "1.38.7",
"description": "jdcloud openApi sdk",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
@@ -56,5 +56,5 @@
"fetch"
]
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/lib-k8s
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/lib-k8s
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/lib-k8s
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/lib-k8s
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/lib-k8s
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/lib-k8s

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-k8s",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -17,7 +17,7 @@
"pub": "npm publish"
},
"dependencies": {
"@certd/basic": "^1.38.2",
"@certd/basic": "^1.38.7",
"@kubernetes/client-node": "0.21.0"
},
"devDependencies": {
@@ -32,5 +32,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -3,6 +3,31 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/lib-server
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/lib-server
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
### Performance Improvements
* 支持绑定两个url地址 ([a2e9a41](https://github.com/certd/certd/commit/a2e9a41a7e712395c0e3ee6fe55b370aa1fc1f12))
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/lib-server
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Performance Improvements
* 域名导入任务进度条 ([7058d5c](https://github.com/certd/certd/commit/7058d5cb935cab8c75b98493ed497a22dbe70883))
* 证书仓库页面增加到期状态查询条件 ([58c3d70](https://github.com/certd/certd/commit/58c3d7087bb66358d896a741e12005f690b2bd5e))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/lib-server

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/lib-server",
"version": "1.38.2",
"version": "1.38.7",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -28,11 +28,11 @@
],
"license": "AGPL",
"dependencies": {
"@certd/acme-client": "^1.38.2",
"@certd/basic": "^1.38.2",
"@certd/pipeline": "^1.38.2",
"@certd/plugin-lib": "^1.38.2",
"@certd/plus-core": "^1.38.2",
"@certd/acme-client": "^1.38.7",
"@certd/basic": "^1.38.7",
"@certd/pipeline": "^1.38.7",
"@certd/plugin-lib": "^1.38.7",
"@certd/plus-core": "^1.38.7",
"@midwayjs/cache": "3.14.0",
"@midwayjs/core": "3.20.11",
"@midwayjs/i18n": "3.20.13",
@@ -64,5 +64,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -20,6 +20,7 @@ export class PlusService {
const subjectId = installInfo.siteId;
const bindUrl = installInfo.bindUrl;
const bindUrl2 = installInfo.bindUrl2;
const installTime = installInfo.installTime;
const saveLicense = async (license: string) => {
let licenseInfo: SysLicenseInfo = await this.sysSettingsService.getSetting(SysLicenseInfo);
@@ -30,7 +31,7 @@ export class PlusService {
await this.sysSettingsService.saveSetting(licenseInfo);
};
return new PlusRequestService({ subjectId, bindUrl, installTime, saveLicense });
return new PlusRequestService({ subjectId, bindUrl, bindUrl2, installTime, saveLicense });
}
async getSubjectId() {
@@ -53,9 +54,9 @@ export class PlusService {
await plusRequestService.verify({ license: licenseInfo.license });
}
async bindUrl(url: string) {
async bindUrl(url: string, url2?:string) {
const plusRequestService = await this.getPlusRequestService();
const res = await plusRequestService.bindUrl(url);
const res = await plusRequestService.bindUrl(url,url2);
this.plusRequestService = null;
return res;
}
@@ -150,6 +151,12 @@ export class PlusService {
}
}
async getTodayOrderCount () {
await this.register();
const plusRequestService = await this.getPlusRequestService();
return await plusRequestService.getOrderCount()
}
async requestWithToken(config: HttpRequestConfig) {
const plusRequestService = await this.getPlusRequestService();
const token = await this.getAccessToken();

View File

@@ -53,6 +53,8 @@ export class SysPublicSettings extends BaseSettings {
//默认到期前更新天数
defaultCertRenewDays?: number;
// 即将到期天数
defaultWillExpireDays?: number = 15;
// 第三方OAuth配置
oauthEnabled?: boolean = false;
@@ -105,6 +107,7 @@ export class SysInstallInfo extends BaseSettings {
siteId?: string;
bindUserId?: number;
bindUrl?: string;
bindUrl2?: string;
accountServerBaseUrl?: string;
appKey?: string;
}
@@ -255,3 +258,4 @@ export class SysSafeSetting extends BaseSettings {
autoHiddenTimes: 5,
};
}

View File

@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/midway-flyway-js

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.38.2",
"version": "1.38.7",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -46,5 +46,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
### Performance Improvements
* eab从更多参数中挪到外面 ([5ea4f46](https://github.com/certd/certd/commit/5ea4f46de7ae403a7a16e9488dc1d9c7523d019a))
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/plugin-cert
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/plugin-cert
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/plugin-cert
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
**Note:** Version bump only for package @certd/plugin-cert
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
**Note:** Version bump only for package @certd/plugin-cert

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -17,10 +17,10 @@
"compile": "tsc --skipLibCheck --watch"
},
"dependencies": {
"@certd/acme-client": "^1.38.2",
"@certd/basic": "^1.38.2",
"@certd/pipeline": "^1.38.2",
"@certd/plugin-lib": "^1.38.2",
"@certd/acme-client": "^1.38.7",
"@certd/basic": "^1.38.7",
"@certd/pipeline": "^1.38.7",
"@certd/plugin-lib": "^1.38.7",
"psl": "^1.9.0",
"punycode.js": "^2.3.1"
},
@@ -38,5 +38,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -1 +1 @@
export * from "@certd/plugin-lib";
export * from "@certd/plugin-lib";

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
**Note:** Version bump only for package @certd/plugin-lib
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
**Note:** Version bump only for package @certd/plugin-lib
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
**Note:** Version bump only for package @certd/plugin-lib
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
**Note:** Version bump only for package @certd/plugin-lib
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Performance Improvements
* 多个dns 提供商支持导入域名 ([d3c0914](https://github.com/certd/certd/commit/d3c0914ac16db8ac77f9c60285bb20cfab7a3cb0))
* 首次使用提示新手教程按钮 ([e054c8f](https://github.com/certd/certd/commit/e054c8fc55063fd96548f1c19049070524a63411))
* ucloud支持部署到alb ([78004bd](https://github.com/certd/certd/commit/78004bdfb552a3b83298fa09d518ca282a529d90))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
### Performance Improvements

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.38.2",
"version": "1.38.7",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -22,10 +22,10 @@
"@alicloud/pop-core": "^1.7.10",
"@alicloud/tea-util": "^1.4.11",
"@aws-sdk/client-s3": "^3.964.0",
"@certd/acme-client": "^1.38.2",
"@certd/basic": "^1.38.2",
"@certd/pipeline": "^1.38.2",
"@certd/plus-core": "^1.38.2",
"@certd/acme-client": "^1.38.7",
"@certd/basic": "^1.38.7",
"@certd/pipeline": "^1.38.7",
"@certd/plus-core": "^1.38.7",
"@kubernetes/client-node": "0.21.0",
"ali-oss": "^6.22.0",
"basic-ftp": "^5.0.5",
@@ -57,5 +57,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "2c80c35b21b3f435e835167fca13db510bbc38a2"
"gitHead": "1368259a1e780486204e9d814c88a741a373dcca"
}

View File

@@ -250,7 +250,7 @@ export class CertReader {
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
}
static buildCertName(cert: any) {
static buildCertName(cert: CertInfo) {
return new CertReader(cert).buildCertName();
}
}

View File

@@ -1,5 +1,5 @@
import { HttpClient, ILogger, utils } from "@certd/basic";
import { IAccess, IServiceGetter, Pager, PageRes, Registrable } from "@certd/pipeline";
import { IAccess, IServiceGetter, PageRes, PageSearch, Registrable } from "@certd/pipeline";
export type DnsProviderDefine = Registrable & {
accessType: string;
@@ -57,11 +57,12 @@ export interface IDnsProvider<T = any> {
//中文域名是否需要punycode转码如果返回True则使用punycode来添加解析记录否则使用中文域名添加解析记录
usePunyCode(): boolean;
getDomainListPage(pager: Pager): Promise<PageRes<DomainRecord>>;
getDomainListPage(pager: PageSearch): Promise<PageRes<DomainRecord>>;
}
export interface ISubDomainsGetter {
getSubDomains(): Promise<string[]>;
hasSubDomain(domain: string): Promise<string>;
}
export interface IDomainParser {

View File

@@ -1,8 +1,8 @@
import { Pager, PageRes } from "@certd/pipeline";
import { HttpClient, ILogger } from "@certd/basic";
import { PageRes, PageSearch } from "@certd/pipeline";
import punycode from "punycode.js";
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, DomainRecord, IDnsProvider, RemoveRecordOptions } from "./api.js";
import { dnsProviderRegistry } from "./registry.js";
import { HttpClient, ILogger } from "@certd/basic";
import punycode from "punycode.js";
export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
ctx!: DnsProviderContext;
http!: HttpClient;
@@ -46,7 +46,7 @@ export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
abstract removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
async getDomainListPage(pager: Pager): Promise<PageRes<DomainRecord>> {
async getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>> {
throw new Error("Method not implemented.");
}
}

View File

@@ -38,20 +38,28 @@ export class DomainParser implements IDomainParser {
return value;
}
const subDomains = await this.subDomainsGetter.getSubDomains();
if (subDomains && subDomains.length > 0) {
const fullDomainDot = "." + fullDomain;
for (const subDomain of subDomains) {
if (fullDomainDot.endsWith("." + subDomain)) {
//找到子域名托管
utils.cache.set(cacheKey, subDomain, {
ttl: 60 * 1000,
});
this.logger.info(`获取到子域名托管域名:${fullDomain}->${subDomain}`);
return subDomain;
}
}
//检查是否有子域名托管
const subDomain = await this.subDomainsGetter.hasSubDomain(fullDomain);
if (subDomain) {
utils.cache.set(cacheKey, subDomain, {
ttl: 60 * 1000,
});
this.logger.info(`获取到托管域名:${fullDomain}->${subDomain}`);
return subDomain;
}
// if (subDomains && subDomains.length > 0) {
// const fullDomainDot = "." + fullDomain;
// for (const subDomain of subDomains) {
// if (fullDomainDot.endsWith("." + subDomain)) {
// //找到子域名托管
// utils.cache.set(cacheKey, subDomain, {
// ttl: 60 * 1000,
// });
// this.logger.info(`获取到子域名托管域名:${fullDomain}->${subDomain}`);
// return subDomain;
// }
// }
// }
const res = this.parseDomainByPsl(fullDomain);
this.logger.info(`从psl获取主域名:${fullDomain}->${res}`);

View File

@@ -3,6 +3,61 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.38.7](https://github.com/certd/certd/compare/v1.38.6...v1.38.7) (2026-02-05)
### Bug Fixes
* 修复有域名记录时域名输入框无法关闭的bug ([54c8217](https://github.com/certd/certd/commit/54c8217808453b121abf646b004596f28932509f))
### Performance Improvements
* eab从更多参数中挪到外面 ([5ea4f46](https://github.com/certd/certd/commit/5ea4f46de7ae403a7a16e9488dc1d9c7523d019a))
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
### Performance Improvements
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([9166a57](https://github.com/certd/certd/commit/9166a579301a60750f0b72b6a42b0c8d730695fd))
* count tip ([e19743f](https://github.com/certd/certd/commit/e19743f70553700f1f91bff76f87370f749dd247))
* oauth支持github 和google 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
### Bug Fixes
* 某些情况下登陆页面没有显示重置密码文档链接的问题 ([40801d0](https://github.com/certd/certd/commit/40801d0a0668c77adb57fae42b4b6615b198a88d))
### Performance Improvements
* 支持绑定两个url地址 ([a2e9a41](https://github.com/certd/certd/commit/a2e9a41a7e712395c0e3ee6fe55b370aa1fc1f12))
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
### Bug Fixes
* 修复1:: 形式的ipv6校验失败的bug ([8b96f21](https://github.com/certd/certd/commit/8b96f218d5284033f10c186c0ce18e4c16d8e9b2))
### Performance Improvements
* 首页证书数量支持点击跳转 ([52cbff0](https://github.com/certd/certd/commit/52cbff0e15329aecd3edcf81315fb7ceab9ec290))
* 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了 ([ca43c77](https://github.com/certd/certd/commit/ca43c775250154def63c4acd96d65dc95d1c0c2b))
* 优化证书未过期时的任务日志提示 ([ac85488](https://github.com/certd/certd/commit/ac85488245197694560aad7df9425ca215ef7ff7))
## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
### Performance Improvements
* 首次使用提示新手教程按钮 ([e054c8f](https://github.com/certd/certd/commit/e054c8fc55063fd96548f1c19049070524a63411))
* 输入证书域名时,支持点击导入域名 ([40be424](https://github.com/certd/certd/commit/40be42406c6fd5de11f594fc6913178d9e7d8943))
* 优化首页统计数据,饼图替换成证书数量统计 ([9fa1c2e](https://github.com/certd/certd/commit/9fa1c2eb3e55ef630333ae24284aa8b54e3414b6))
* 优化首页图标 ([998de0f](https://github.com/certd/certd/commit/998de0f9a031339b019aa7a09e61e994664a8047))
* 域名导入任务进度条 ([7058d5c](https://github.com/certd/certd/commit/7058d5cb935cab8c75b98493ed497a22dbe70883))
* 站点监控,检查状态挪到前面显示 ([48f1bf0](https://github.com/certd/certd/commit/48f1bf091869b87dd17feaca5efd8680ef741582))
* 证书仓库页面增加到期状态查询条件 ([58c3d70](https://github.com/certd/certd/commit/58c3d7087bb66358d896a741e12005f690b2bd5e))
* 证书流水线创建域名输入框支持获取域名数据进行选择 ([1d5b1c2](https://github.com/certd/certd/commit/1d5b1c239cf350920eb2eb9fd293af74ef412853))
* 支持导入51dns域名 ([7eb9694](https://github.com/certd/certd/commit/7eb96942214aed0dfc9c3c5a669374da67052c49))
* ucloud支持部署到ulbalb、clb统一成一个 ([c408687](https://github.com/certd/certd/commit/c408687af7669afe733b5506720ca795555acdce))
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.38.2",
"version": "1.38.7",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -106,8 +106,8 @@
"zod-defaults": "^0.1.3"
},
"devDependencies": {
"@certd/lib-iframe": "^1.38.2",
"@certd/pipeline": "^1.38.2",
"@certd/lib-iframe": "^1.38.7",
"@certd/pipeline": "^1.38.7",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",

View File

@@ -8,19 +8,23 @@
</template>
<script lang="ts" setup>
import { computed, provide, ref } from "vue";
import { computed, provide, Ref, ref } from "vue";
import { preferences, usePreferences } from "/@/vben/preferences";
import { useAntdDesignTokens } from "/@/vben/hooks";
import { Modal, theme } from "ant-design-vue";
import AConfigProvider from "ant-design-vue/es/config-provider";
import { antdvLocale } from "./locales/antdv";
import { setI18nLanguage } from "/@/locales";
import { mitter } from "./utils/util.mitt";
defineOptions({
name: "App",
});
const [modal, contextHolder] = Modal.useModal();
provide("modal", modal);
mitter.on("getModal", (event: any) => {
event.ModalRef = modal;
});
const locale = preferences.app.locale;
setI18nLanguage(locale);

View File

@@ -0,0 +1,97 @@
<template>
<div class="cf-turnstile">
<div id="turnstile-container" class="cf-turnstile-container" :data-sitekey="siteKeyRef"></div>
</div>
</template>
<script setup lang="ts">
import { nextTick, onMounted, onUnmounted, ref, watch } from "vue";
import { loadScript } from "vue-plugin-load-script";
const loaded = ref(false);
async function loadCaptchaScript() {
await loadScript("https://challenges.cloudflare.com/turnstile/v0/api.js");
loaded.value = true;
}
defineOptions({
name: "CfTurnstileCaptcha",
});
const emit = defineEmits(["update:modelValue", "change"]);
const props = defineProps<{
modelValue: any;
captchaGet: () => Promise<any>;
}>();
const captchaRef = ref(null);
const siteKeyRef = ref("");
const widgetIdRef = ref(null);
onMounted(async () => {
await loadCaptchaScript();
await nextTick();
const { siteKey } = await props.captchaGet();
siteKeyRef.value = siteKey; //这里确定是string类型
//@ts-ignore
const widgetId = turnstile.render("#turnstile-container", {
sitekey: siteKey,
size: "flexible",
callback: function (token: string) {
console.log("turnstile success:", token);
emitChange({
token: token,
});
},
});
widgetIdRef.value = widgetId;
});
onUnmounted(() => {
//@ts-ignore
if (turnstile && widgetIdRef.value) {
//@ts-ignore
turnstile.remove(widgetIdRef.value);
}
});
function checkExpired() {
//@ts-ignore
if (turnstile && widgetIdRef.value) {
//@ts-ignore
return turnstile.isExpired(widgetIdRef.value);
}
}
function emitChange(value: any) {
emit("update:modelValue", value);
emit("change", value);
}
function reset() {
// 重置验证码
//@ts-ignore
if (turnstile && widgetIdRef.value) {
//@ts-ignore
turnstile.reset(widgetIdRef.value);
}
}
watch(
() => {
return props.modelValue;
},
value => {
if (value == null) {
reset();
}
}
);
defineExpose({
reset,
});
</script>
<style lang="less">
.cf-turnstile-container {
iframe {
width: 100% !important;
}
}
</style>

View File

@@ -11,8 +11,7 @@
</div>
</template>
<script setup lang="ts">
import { defineEmits, defineExpose, defineProps, ref, watch } from "vue";
import { nanoid } from "nanoid";
import { ref, watch } from "vue";
const props = defineProps<{
modelValue: any;

View File

@@ -11,8 +11,8 @@
</div>
</template>
<script setup lang="ts">
import { onMounted, defineProps, defineEmits, ref, onUnmounted, Ref, watch } from "vue";
import { notification } from "ant-design-vue";
import { ref, Ref, watch } from "vue";
import { loadScript } from "vue-plugin-load-script";
const loaded = ref(false);

View File

@@ -39,6 +39,7 @@ import { dict } from "@fast-crud/fast-crud";
import * as api from "./api.js";
import CnameTip from "./cname-tip.vue";
import { Modal } from "ant-design-vue";
import { utils } from "/@/utils/index.js";
const statusDict = dict({
data: [
{ label: "待设置CNAME", value: "cname", color: "warning" },

View File

@@ -0,0 +1,232 @@
<template>
<div class="domain-select">
<div class="flex flex-row">
<a-select
class="domain-select-input"
:popup-class-name="popupClassName"
:dropdown-style="dropdownStyle"
show-search
:filter-option="filterOption"
:options="optionsRef"
:value="value"
v-bind="attrs"
@click="onClick"
@update:value="emit('update:value', $event)"
>
<template #dropdownRender="{ menuNode }">
<template v-if="search">
<div class="flex w-full items-center justify-between flex-wrap" style="padding: 4px 8px">
<div class="flex-1 flex flex-row items-center">
<a-input ref="inputRef" v-model:value="searchKeyRef" class="flex-1" allow-clear placeholder="这里可以搜索域名(数据来自“设置->域名管理”),您也可以直接在上面输入框输入" @keydown.enter="doSearch" />
<fs-button type="primary" class="m-1" :loading="loading" icon="mingcute:search-2-line" @click="doSearch"> 查询 </fs-button>
</div>
<div class="manager flex flex-row items-center">
<fs-button type="primary" class="m-1" icon="mingcute:vip-1-line" @click="openDomainImportDialog">导入域名</fs-button>
<fs-button class="m-1" type="primary" icon="carbon:gui-management" @click="openDomainManager">管理域名</fs-button>
</div>
</div>
<div v-if="hasError" class="helper p-2" :class="{ error: hasError }">
{{ message }}
</div>
<a-divider style="margin: 4px 0" />
</template>
<v-nodes :vnodes="menuNode" />
<div v-if="pager === true" class="pager text-center p-5" @click="paginationClick">
<a-pagination v-model:current="pagerRef.pageNo" simple :total="pagerRef.total" :page-size="pagerRef.pageSize" @change="onPageChange" />
</div>
</template>
<template #option="scope">
<div class="flex flex-row items-center">
<span class="min-w-60">{{ scope.label }}</span>
<div>
<fs-values-format :model-value="scope.challengeType" :dict="challengeTypeDict"></fs-values-format>
<fs-values-format :model-value="scope.dnsProviderType" :dict="dnsProviderTypeDict"></fs-values-format>
</div>
</div>
</template>
</a-select>
<div class="ml-5">
<fs-button :loading="loading" title="刷新我的域名列表" icon="ion:refresh-outline" @click="refreshOptions"></fs-button>
</div>
</div>
<div class="helper" :class="{ error: hasError }">
{{ message }}
</div>
</div>
</template>
<script setup lang="ts">
import { computed, defineComponent, onMounted, ref, Ref, useAttrs } from "vue";
import { useRouter } from "vue-router";
import { Dicts } from "../lib/dicts";
import { request } from "/@/api/service";
import { openRouteInNewWindow } from "/@/vben/utils";
import { useDomainImportManage } from "/@/views/certd/cert/domain/use";
defineOptions({
name: "DomainSelector",
});
const VNodes = defineComponent({
props: {
vnodes: {
type: Object,
required: true,
},
},
render() {
return this.vnodes;
},
});
const props = defineProps<{
search?: boolean;
pager?: boolean;
value?: any[];
}>();
const emit = defineEmits<{
"update:value": any;
}>();
const attrs = useAttrs();
const hasOptions: Ref = ref(null);
const popupClassName = computed(() => {
if (!hasOptions.value) {
return "hidden-important";
}
return "";
});
const searchKeyRef = ref("");
const optionsRef = ref([]);
const message = ref("");
const hasError = ref(false);
const loading = ref(false);
const pagerRef: Ref = ref({
pageNo: 1,
total: 0,
pageSize: 20,
});
const getOptions = async () => {
if (loading.value) {
return;
}
message.value = "";
hasError.value = false;
loading.value = true;
const pageNo = pagerRef.value.pageNo;
const pageSize = pagerRef.value.pageSize;
try {
const res = await request({
url: "/cert/domain/page",
method: "POST",
data: {
query: {
domain: props.search ? searchKeyRef.value : undefined,
},
page: {
offset: (pageNo - 1) * pageSize,
limit: pageSize,
},
},
});
const list = res?.records || res || [];
const options = [];
for (let item of list) {
options.push({
value: item.domain,
label: item.domain,
dnsProviderType: item.dnsProviderType,
challengeType: item.challengeType,
});
options.push({
value: `*.${item.domain}`,
label: `*.${item.domain}`,
dnsProviderType: item.dnsProviderType,
challengeType: item.challengeType,
});
}
optionsRef.value = options;
if (hasOptions.value == null) {
//初始设置一次
if (options.length > 0) {
hasOptions.value = true;
} else {
hasOptions.value = false;
}
}
pagerRef.value.total = list.length;
if (props.pager) {
if (res.total != null) {
pagerRef.value.total = res.total;
}
}
return res;
} finally {
loading.value = false;
}
};
const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().includes(input.toLowerCase()) || String(option.value).toLowerCase().includes(input.toLowerCase());
};
async function onClick() {
if (optionsRef.value?.length === 0) {
await refreshOptions();
}
}
async function refreshOptions() {
await getOptions();
}
async function doSearch() {
pagerRef.value.pageNo = 1;
await refreshOptions();
}
async function onPageChange(current: any) {
await refreshOptions();
}
async function paginationClick(e: any) {
e.stopPropagation();
e.preventDefault();
}
const dnsProviderTypeDict = Dicts.dnsProviderTypeDict;
const challengeTypeDict = Dicts.challengeTypeDict;
const router = useRouter();
function openDomainManager(e: any) {
e.preventDefault();
// router.push("/certd/cert/domain");
openRouteInNewWindow("/certd/cert/domain");
}
const openDomainImportManageDialog = useDomainImportManage();
function openDomainImportDialog() {
openDomainImportManageDialog({
afterSubmit: res => {
refreshOptions();
},
});
}
const dropdownStyle = ref({
zIndex: 2000,
});
onMounted(() => {
refreshOptions();
});
</script>
<style lang="less"></style>

View File

@@ -1,8 +1,8 @@
<template>
<div class="params-show">
<a-tag type="primary" color="green" v-for="item of params" :key="item.value" class="item">
<a-tag v-for="item of params" :key="item.value" type="primary" color="green" class="item">
<span class="label">{{ item.label }}=</span>
<fs-copyable :modelValue="`\$\{${item.value}\}`" :button="{show:false}" :inline="true"></fs-copyable>
<fs-copyable :model-value="`\$\{${item.value}\}`" :button="{ show: false }" :inline="true"></fs-copyable>
</a-tag>
</div>
</template>

View File

@@ -85,7 +85,9 @@ const message = ref("");
const hasError = ref(false);
const loading = ref(false);
const pagerRef: Ref = ref({
current: 1,
pageNo: 1,
total: 0,
pageSize: 100,
});
const getOptions = async () => {
if (loading.value) {
@@ -143,12 +145,18 @@ const getOptions = async () => {
showErrorNotify: false,
}
);
const list = res?.list || res || [];
let list = res?.list || res || [];
if (list.length > 0) {
message.value = "获取数据成功,请从下拉框中选择";
} else {
message.value = "获取数据成功,没有数据";
}
list = list.map((item: any) => {
return {
...item,
title: `${item.domain || item.value}`,
};
});
optionsRef.value = list;
pagerRef.value.total = list.length;
if (props.pager) {

View File

@@ -4,6 +4,7 @@ import RemoteSelect from "./common/remote-select.vue";
import RemoteInput from "./common/remote-input.vue";
import RemoteTreeSelect from "./common/remote-tree-select.vue";
import CertDomainsGetter from "./common/cert-domains-getter.vue";
import DomainSelector from "./common/domain-selector.vue";
import OutputSelector from "/@/components/plugins/common/output-selector/index.vue";
import DnsProviderSelector from "/@/components/plugins/cert/dns-provider-selector/index.vue";
import DomainsVerifyPlanEditor from "/@/components/plugins/cert/domains-verify-plan-editor/index.vue";
@@ -29,6 +30,7 @@ export default {
app.component("RemoteTreeSelect", RemoteTreeSelect);
app.component("RemoteInput", RemoteInput);
app.component("CertDomainsGetter", CertDomainsGetter);
app.component("DomainSelector", DomainSelector);
app.component("InputPassword", InputPassword);
app.component("ParamsShow", ParamsShow);
},

View File

@@ -10,7 +10,7 @@
</template>
<script lang="tsx" setup>
import { defineProps, inject, ref, useAttrs } from "vue";
import { inject, ref, useAttrs } from "vue";
import { Modal } from "ant-design-vue";
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";

View File

@@ -1,6 +1,8 @@
<script setup lang="ts">
import { ref } from "vue";
import { onMounted, ref } from "vue";
import TutorialSteps from "/@/components/tutorial/tutorial-steps.vue";
import { mitter } from "/@/utils/util.mitt";
import { useI18n } from "/@/locales";
defineOptions({
name: "TutorialModal",
@@ -8,6 +10,7 @@ defineOptions({
const props = defineProps<{
showIcon?: boolean;
mode?: string;
}>();
const openedRef = ref(false);
@@ -15,17 +18,26 @@ function open() {
openedRef.value = true;
}
const slots = defineSlots();
onMounted(() => {
mitter.on("openTutorialModal", () => {
if (props.mode === "nav") {
open();
}
});
});
const { t } = useI18n();
</script>
<template>
<div class="tutorial-button pointer" @click="open">
<template v-if="!slots.default">
<fs-icon v-if="showIcon === false" icon="ant-design:question-circle-outlined" class="mr-0.5"></fs-icon>
<div class="hidden md:block">{{ $t("tutorial.title") }}</div>
<div class="hidden md:block">{{ t("tutorial.title") }}</div>
</template>
<slot></slot>
<a-modal v-model:open="openedRef" class="tutorial-modal" width="90%">
<template #title>{{ $t("tutorial.title") }}</template>
<template #title>{{ t("tutorial.title") }}</template>
<tutorial-steps v-if="openedRef" />
<template #footer></template>
</a-modal>

View File

@@ -1,8 +1,8 @@
<template>
<a-steps :current="3" class="mt-10" size="small" :items="steps" @click="goPipeline"></a-steps>
<a-steps :current="3" class="mt-10 simple-steps" size="small" :items="steps" @click="goPipeline"></a-steps>
</template>
<script lang="ts" setup>
<script lang="tsx" setup>
import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
@@ -11,14 +11,26 @@ const { t } = useI18n();
type Step = {
title: string;
description?: string;
icon?: any;
};
import { ref } from "vue";
import { mitter } from "/@/utils/util.mitt";
const steps = ref<Step[]>([{ title: t("certd.steps.createPipeline") }, { title: t("certd.steps.addTask") }, { title: t("certd.steps.scheduledRun") }]);
const steps = ref<Step[]>([
{ title: t("certd.steps.createPipeline"), icon: <fs-icon icon="tabler:circle-number-1-filled"></fs-icon> },
{ title: t("certd.steps.addTask"), icon: <fs-icon icon="tabler:circle-number-2-filled"></fs-icon> },
{ title: t("certd.steps.scheduledRun"), icon: <fs-icon icon="tabler:circle-number-3-filled"></fs-icon> },
]);
const router = useRouter();
function goPipeline() {
router.push({ path: "/certd/pipeline" });
mitter.emit("openTutorialModal");
}
</script>
<style lang="less">
.simple-steps {
.fs-icon {
font-size: 18px !important;
}
}
</style>

View File

@@ -6,7 +6,7 @@
<div class="text">
<h3 class="title">{{ number }} {{ currentStepItem.title }}</h3>
<div class="description mt-5">
<div v-for="desc of currentStepItem.descriptions">{{ desc }}</div>
<div v-for="(desc, index) of currentStepItem.descriptions" :key="index">{{ desc }}</div>
</div>
<div v-if="currentStepItem.body">
<fs-render :render-func="currentStepItem.body" />
@@ -29,9 +29,12 @@
<script setup lang="tsx">
import { FsRender } from "@fast-crud/fast-crud";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
import SimpleSteps from "./simple-steps.vue";
const props = defineProps<{
mode?: string;
}>();
const { t } = useI18n();
type Step = {
title: string;
subTitle?: string;
@@ -69,10 +72,10 @@ const steps = ref<Step[]>([
title: t("guide.createCertPipeline.items.successTitle"),
descriptions: [t("guide.createCertPipeline.items.successDesc")],
},
{
title: t("guide.createCertPipeline.items.nextTitle"),
descriptions: [t("guide.createCertPipeline.items.nextDesc")],
},
// {
// title: t("guide.createCertPipeline.items.nextTitle"),
// descriptions: [t("guide.createCertPipeline.items.nextDesc")],
// },
],
},
{
@@ -252,7 +255,7 @@ function previewMask() {
flex: 1;
padding: 20px;
.text {
width: 350px;
width: 400px;
display: flex;
flex-direction: column;
align-items: center;

View File

@@ -15,3 +15,10 @@ export async function getVipTrial(vipType: string) {
data: { vipType },
});
}
export async function getTodayVipOrderCount() {
return await request({
url: "/sys/plus/getTodayVipOrderCount",
method: "post",
});
}

View File

@@ -12,18 +12,22 @@
</div>
</template>
<script lang="tsx" setup>
import { computed, onMounted, reactive, ref } from "vue";
import dayjs from "dayjs";
import { message, Modal } from "ant-design-vue";
import * as api from "./api";
import { useSettingStore } from "/@/store/settings";
import { useRouter } from "vue-router";
import { useUserStore } from "/@/store/user";
import { mitter } from "/@/utils/util.mitt";
import dayjs from "dayjs";
import { computed, onMounted, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import * as api from "./api";
import { useSettingStore } from "/src/store/settings/index";
import { useUserStore } from "/@/store/user";
import { env } from "/@/utils/util.env";
import { mitter } from "/@/utils/util.mitt";
import VipModalContent from "./vip-modal-content.vue";
const { t } = useI18n();
defineOptions({
name: "VipButton",
});
const settingStore = useSettingStore();
const props = withDefaults(
defineProps<{
@@ -39,6 +43,7 @@ type Text = {
};
const text = computed<Text>(() => {
const vipLabel = settingStore.vipLabel;
const plusMessage = settingStore.plusInfo?.message;
const map = {
isComm: {
comm: {
@@ -91,7 +96,7 @@ const text = computed<Text>(() => {
},
nav: {
name: t("vip.free.nav.name"),
title: t("vip.free.nav.title"),
title: plusMessage || t("vip.free.nav.title"),
},
},
};
@@ -113,58 +118,16 @@ const expireTime = computed(() => {
const expiredDays = computed(() => {
if (settingStore.plusInfo?.isPlus && !settingStore.isPlus) {
//已过期多少天
const days = dayjs().diff(dayjs(settingStore.plusInfo.expireTime), "day");
return `${settingStore.vipLabel}已过期${days}`;
}
return "";
});
const formState = reactive({
code: "",
inviteCode: "",
});
const router = useRouter();
async function doActive() {
if (!formState.code) {
message.error(t("vip.enterCode"));
throw new Error(t("vip.enterCode"));
}
const res = await api.doActive(formState);
if (res) {
await settingStore.init();
const vipLabel = settingStore.vipLabel;
Modal.success({
title: t("vip.successTitle"),
content: t("vip.successContent", {
vipLabel,
expireDate: dayjs(settingStore.plusInfo.expireTime).format("YYYY-MM-DD"),
}),
onOk() {
if (!(settingStore.installInfo.bindUserId > 0)) {
Modal.confirm({
title: t("vip.bindAccountTitle"),
content: t("vip.bindAccountContent"),
onOk() {
router.push("/sys/account");
},
});
}
},
});
}
}
const computedSiteId = computed(() => settingStore.installInfo?.siteId);
const [modal, contextHolder] = Modal.useModal();
const userStore = useUserStore();
function goAccount() {
Modal.destroyAll();
router.push("/sys/account");
}
async function getVipTrial(vipType = "plus") {
const res = await api.getVipTrial(vipType);
message.success(t("vip.congratulations_vip_trial", { duration: res.duration }));
@@ -253,6 +216,7 @@ function openUpgrade() {
throw new Error(t("vip.already_perpetual_plus"));
}
}
function goBuyPlusPage() {
checkPerpetualPlus();
if (settingStore.isComm) {
@@ -264,6 +228,7 @@ function openUpgrade() {
}
window.open(goBuyUrl);
}
function goBuyCommPage() {
checkPerpetualPlus();
if (settingStore.isPlus && !settingStore.isComm) {
@@ -278,75 +243,6 @@ function openUpgrade() {
}
window.open(goBuyCommUrl);
}
const vipTypeDefine = {
free: {
title: t("vip.basic_edition"),
desc: t("vip.community_free_version"),
type: "free",
icon: "lucide:package-open",
privilege: [t("vip.unlimited_certificate_application"), t("vip.unlimited_domain_count"), t("vip.unlimited_certificate_pipelines"), t("vip.common_deployment_plugins"), t("vip.email_webhook_notifications")],
},
plus: {
title: t("vip.professional_edition"),
desc: t("vip.open_source_support"),
type: "plus",
privilege: [t("vip.vip_group_priority"), t("vip.unlimited_site_certificate_monitoring"), t("vip.more_notification_methods"), t("vip.plugins_fully_open")],
trial: {
title: t("vip.click_to_get_7_day_trial"),
click: () => {
openStarModal("plus");
},
},
icon: "stash:thumb-up",
priceText: productInfo.plus.priceText || `¥${productInfo.plus.price}/${t("vip.years")}`,
discountText: productInfo.plus.discountText || `¥${productInfo.plus.price3}/3${t("vip.years")}`,
tooltip: productInfo.plus.tooltip,
get() {
return (
<a-tooltip title={t("vip.afdian_support_vip")}>
<a-button size="small" type="primary" onClick={goBuyPlusPage}>
{t("vip.get_after_support")}
</a-button>
</a-tooltip>
);
},
},
comm: {
title: t("vip.business_edition"),
desc: t("vip.commercial_license"),
type: "comm",
icon: "vaadin:handshake",
privilege: [t("vip.all_pro_privileges"), t("vip.allow_commercial_use_modify_logo_title"), t("vip.data_statistics"), t("vip.plugin_management"), t("vip.unlimited_multi_users"), t("vip.support_user_payment")],
priceText: productInfo.comm.priceText || `¥${productInfo.comm.price}/${t("vip.years")}`,
discountText: productInfo.comm.discountText || `¥${productInfo.comm.price3}/3${t("vip.years")}`,
tooltip: productInfo.comm.tooltip,
trial: {
title: t("vip.click_to_get_7_day_trial"),
click: () => {
openStarModal("comm");
},
},
get() {
return (
<a-button size="small" type="primary" onClick={goBuyCommPage}>
{t("vip.buy")}
</a-button>
);
},
},
};
const manualActiveFlag = ref();
function showManualActivation() {
manualActiveFlag.value = true;
}
function goBindAccount() {
modalRef?.destroy();
router.push({
path: "/sys/account",
});
}
const modalRef = modal.success({
title,
class: "vip-modal",
@@ -354,114 +250,7 @@ function openUpgrade() {
okText: t("vip.close"),
width: 1100,
content: () => {
let manualActiveBlock: any = "";
if (manualActiveFlag.value) {
manualActiveBlock = (
<div>
<div class="mt-10">
<a-input-search class="w-2/6" v-model:value={formState.code} placeholder={placeholder} enter-button={t("vip.activate")} onSearch={doActive}></a-input-search>
</div>
<div class="mt-10">
{t("vip.activation_code_one_use")}
<a onClick={goAccount}>{t("vip.bind_account")}</a>{t("vip.transfer_vip")}
</div>
</div>
);
}
const vipLabel = settingStore.vipLabel;
let plusInfo: any = "";
if (isPlus) {
plusInfo = (
<div class="mt-10 flex flex-col md:flex-row ">
<span class="mr-2">
{t("vip.current")} {vipLabel} {t("vip.activated_expire_time")} {settingStore.expiresText}
</span>
<a href="https://app.handfree.work/subject/#/page/detail/1" target="_blank">
{t("vip.learn_more")}
</a>
</div>
);
}
const slots = [];
for (const key in vipTypeDefine) {
// @ts-ignore
const item = vipTypeDefine[key];
const vipBlockClass = `vip-block ${key === settingStore.plusInfo.vipType ? "current" : ""}`;
slots.push(
<div class="w-full md:w-1/3 mb-4 p-5">
<div class={vipBlockClass}>
<h3 class="block-header ">
<span class="flex-o">{item.title}</span>
{item.trial && (
<span class="trial">
<a-tooltip title={item.trial.message}>
<a onClick={item.trial.click}>{item.trial.title}</a>
</a-tooltip>
</span>
)}
</h3>
<div style="color:green" class="flex-o">
<fs-icon icon={item.icon} class="fs-16 flex-o" />
{item.desc}
</div>
<ul class="flex-1 privilege">
{item.privilege.map((p: string) => (
<li class="flex-baseline">
<fs-icon class="color-green" icon="ion:checkmark-sharp" />
{p}
</li>
))}
</ul>
<div class="footer flex-between flex-vc">
<div class="price-show">
{item.priceText && (
<span class="flex">
<span class="-text">{item.priceText}</span>
<a-tooltip class="ml-5" title={item.discountText}>
<fs-icon class="pointer color-red" icon="ic:outline-discount"></fs-icon>
</a-tooltip>
</span>
)}
{!item.priceText && (
<span>
<span class="price-text">{t("vip.freee")}</span>
</span>
)}
</div>
<div class="get-show">{item.get && <div>{item.get()}</div>}</div>
</div>
</div>
</div>
);
}
return (
<div class="mt-10 mb-10 vip-active-modal">
{productInfo.notice && (
<div class="mb-10">
<a-alert type="error" message={productInfo.notice}></a-alert>
</div>
)}
<div class="vip-type-vs">
<a-row gutter={20}>{slots}</a-row>
</div>
<div class="mt-10">
<div class=" w-100 flex-col md:flex-row ">
<span>{t("vip.site_id")}</span>
<fs-copyable v-model={computedSiteId.value} class="mr-2"></fs-copyable>
<a onClick={goBindAccount}>{t("vip.not_effective")}</a>
</div>
</div>
{plusInfo}
<div class="mt-10 ">
<span class="mr-2">{t("vip.have_activation_code")}</span>
<span>
<a onClick={showManualActivation}>{t("vip.manual_activation")}</a>
</span>
</div>
<div class="mt-10">{manualActiveBlock}</div>
</div>
);
return <VipModalContent placeholder={placeholder} isPlus={isPlus} productInfo={productInfo} goBuyPlusPage={goBuyPlusPage} goBuyCommPage={goBuyCommPage} openStarModal={openStarModal} modalRef={modalRef} />;
},
});
}
@@ -497,69 +286,4 @@ onMounted(() => {
.text {
}
}
.vip-active-modal {
.vip-block {
display: flex;
flex-direction: column;
padding: 10px;
border: 1px solid #eee;
border-radius: 5px;
height: 275px;
line-height: 24px;
.privilege {
margin-top: 5px;
}
//background-color: rgba(250, 237, 167, 0.79);
&.current {
border-color: green;
}
.block-header {
padding: 0px;
display: flex;
justify-content: space-between;
.trial {
font-size: 12px;
font-wight: 400;
}
}
.footer {
padding-top: 5px;
margin-top: 0px;
border-top: 1px solid #eee;
.price-text {
font-size: 18px;
color: red;
}
}
}
ul {
list-style-type: unset;
margin-left: 0px;
padding: 0;
}
.color-green {
color: green;
}
.vip-type-vs {
.privilege {
.fs-icon {
color: green;
}
}
.fs-icon {
margin-right: 5px;
}
}
}
</style>

View File

@@ -0,0 +1,434 @@
<template>
<div class="mt-10 vip-active-modal">
<div v-if="todayOrderCount.enabled" class="order-count hidden md:flex">
<div v-for="(stage, index) in todayOrderCount.stages" :key="index" class="status-item" :class="{ 'status-show': TodayVipOrderCountRef.current === index }">
<div class="background">
<img :src="stage.bg" alt="" />
</div>
<div class="flex flex-col order-count-text weight-bold">
<div class="count-text ml-4 flex items-center">
<fs-icon icon="noto:fire" class="fs-20 mr-2"></fs-icon>
<template v-if="stage.vipTotal > 0">
<span> 已有 </span>
<span class="count-number color-red font-bold text-2xl ml-1 mr-1"> {{ stage.vipTotal }} </span> 位小伙伴赞助
<span>
{{ stage.title }}
</span>
</template>
<template v-else>
<span> 今日赞助 </span>
<span class="count-number color-red font-bold text-2xl ml-1 mr-1"> {{ stage.orderCount }} </span>
<span>
{{ stage.title }}
</span>
</template>
</div>
</div>
</div>
</div>
<div v-if="productInfo.notice" class="mt-10">
<a-alert type="error" :message="productInfo.notice"></a-alert>
</div>
<div class="vip-type-vs mt-10">
<a-row :gutter="20">
<div v-for="(item, key) in vipTypeDefine" :key="key" class="w-full md:w-1/3 mb-4 p-5">
<div :class="`vip-block ${key === settingStore.plusInfo.vipType ? 'current' : ''}`">
<h3 class="block-header">
<span class="flex-o">{{ item.title }}</span>
<span v-if="item.trial" class="trial">
<a-tooltip :title="item.trial.message">
<a @click="item.trial.click">{{ item.trial.title }}</a>
</a-tooltip>
</span>
</h3>
<div style="color: green" class="flex-o">
<fs-icon :icon="item.icon" class="fs-16 flex-o" />
{{ item.desc }}
</div>
<ul class="flex-1 privilege">
<li v-for="p in item.privilege" :key="p" class="flex-baseline">
<fs-icon class="color-green" icon="ion:checkmark-sharp" />
{{ p }}
</li>
</ul>
<div class="footer flex-between flex-vc">
<div class="price-show">
<span v-if="item.priceText" class="flex">
<span class="-text">{{ item.priceText }}</span>
<a-tooltip class="ml-5" :title="item.discountText">
<fs-icon class="pointer color-red" icon="ic:outline-discount"></fs-icon>
</a-tooltip>
</span>
<span v-else>
<span class="price-text">{{ t("vip.freee") }}</span>
</span>
</div>
<div class="get-show">
<template v-if="item.type === 'plus'">
<a-tooltip :title="t('vip.afdian_support_vip')">
<a-button size="small" type="primary" @click="goBuyPlusPage">
{{ t("vip.get_after_support") }}
</a-button>
</a-tooltip>
</template>
<template v-else-if="item.type === 'comm'">
<a-button size="small" type="primary" @click="goBuyCommPage">
{{ t("vip.buy") }}
</a-button>
</template>
</div>
</div>
</div>
</div>
</a-row>
</div>
<div>
<a href="https://certd.docmirror.cn/guide/donate/#相关问题" target="_blank">
{{ t("vip.question") }}
</a>
</div>
<div class="mt-10">
<div class="w-100 flex-col md:flex-row">
<span>{{ t("vip.site_id") }}</span>
<fs-copyable v-model="computedSiteId" class="mr-2"></fs-copyable>
<a @click="goBindAccount">{{ t("vip.not_effective") }}</a>
</div>
</div>
<div v-if="isPlus" class="mt-10 flex flex-col md:flex-row">
<span class="mr-2"> {{ t("vip.current") }} {{ vipLabel }} {{ t("vip.activated_expire_time") }} {{ settingStore.expiresText }} </span>
<a href="https://app.handfree.work/subject/#/page/detail/1" target="_blank">
{{ t("vip.learn_more") }}
</a>
</div>
<div class="mt-10">
<span class="mr-2">{{ t("vip.have_activation_code") }}</span>
<span>
<a @click="showManualActivation">{{ t("vip.manual_activation") }}</a>
</span>
</div>
<div v-if="manualActiveFlag" class="mt-10">
<div class="mt-10">
<a-input-search v-model:value="formState.code" class="w-2/6" :placeholder="placeholder" :enter-button="t('vip.activate')" @search="doActive"></a-input-search>
</div>
<div class="mt-10">
{{ t("vip.activation_code_one_use") }}
<a @click="goAccount">{{ t("vip.bind_account") }}</a
>{{ t("vip.transfer_vip") }}
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { message, Modal } from "ant-design-vue";
import dayjs from "dayjs";
import { computed, nextTick, onMounted, onUnmounted, reactive, Ref, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import * as api from "./api";
import { useSettingStore } from "/@/store/settings";
const { t } = useI18n();
const router = useRouter();
const settingStore = useSettingStore();
const props = defineProps<{
placeholder: string;
isPlus: boolean;
productInfo: any;
goBuyPlusPage: () => void;
goBuyCommPage: () => void;
openStarModal: (vipType: string) => void;
modalRef: any;
}>();
const formState = reactive({
code: "",
inviteCode: "",
});
async function doActive() {
if (!formState.code) {
message.error(t("vip.enterCode"));
throw new Error(t("vip.enterCode"));
}
const res = await api.doActive(formState);
if (res) {
await settingStore.init();
const vipLabel = settingStore.vipLabel;
Modal.success({
title: t("vip.successTitle"),
content: t("vip.successContent", {
vipLabel,
expireDate: dayjs(settingStore.plusInfo.expireTime).format("YYYY-MM-DD"),
}),
onOk() {
if (!(settingStore.installInfo.bindUserId > 0)) {
Modal.confirm({
title: t("vip.bindAccountTitle"),
content: t("vip.bindAccountContent"),
onOk() {
router.push("/sys/account");
},
});
}
},
});
}
}
const vipLabel = computed(() => settingStore.vipLabel);
const computedSiteId = computed(() => settingStore.installInfo?.siteId);
const manualActiveFlag = ref(false);
function showManualActivation() {
manualActiveFlag.value = true;
}
function goAccount() {
props.modalRef?.destroy();
router.push("/sys/account");
}
function goBindAccount() {
props.modalRef?.destroy();
router.push({
path: "/sys/account",
});
}
const vipTypeDefine: any = {
free: {
title: t("vip.basic_edition"),
desc: t("vip.community_free_version"),
type: "free",
icon: "lucide:package-open",
privilege: [t("vip.unlimited_certificate_application"), t("vip.unlimited_domain_count"), t("vip.unlimited_certificate_pipelines"), t("vip.common_deployment_plugins"), t("vip.email_webhook_notifications")],
},
plus: {
title: t("vip.professional_edition"),
desc: t("vip.open_source_support"),
type: "plus",
privilege: [t("vip.vip_group_priority"), t("vip.unlimited_site_certificate_monitoring"), t("vip.more_notification_methods"), t("vip.plugins_fully_open")],
trial: {
title: t("vip.click_to_get_7_day_trial"),
click: () => {
props.openStarModal("plus");
},
},
icon: "stash:thumb-up",
priceText: props.productInfo.plus.priceText || `¥${props.productInfo.plus.price}/${t("vip.years")}`,
discountText: props.productInfo.plus.discountText || `¥${props.productInfo.plus.price3}/3${t("vip.years")}`,
tooltip: props.productInfo.plus.tooltip,
},
comm: {
title: t("vip.business_edition"),
desc: t("vip.commercial_license"),
type: "comm",
icon: "vaadin:handshake",
privilege: [t("vip.all_pro_privileges"), t("vip.allow_commercial_use_modify_logo_title"), t("vip.data_statistics"), t("vip.plugin_management"), t("vip.unlimited_multi_users"), t("vip.support_user_payment")],
priceText: props.productInfo.comm.priceText || `¥${props.productInfo.comm.price}/${t("vip.years")}`,
discountText: props.productInfo.comm.discountText || `¥${props.productInfo.comm.price3}/3${t("vip.years")}`,
tooltip: props.productInfo.comm.tooltip,
trial: {
title: t("vip.click_to_get_7_day_trial"),
click: () => {
props.openStarModal("comm");
},
},
},
};
const TodayVipOrderCountRef: Ref = ref({ enabled: false, current: 0, stages: [] });
async function getTodayVipOrderCount() {
const res = await api.getTodayVipOrderCount();
if (res) {
TodayVipOrderCountRef.value = res;
TodayVipOrderCountRef.value.current = 0;
}
}
const todayOrderCount = computed(() => {
const countInfo = TodayVipOrderCountRef.value;
const enabled = countInfo?.enabled || false;
const orderCount = countInfo?.orderCount || 0;
for (const stage of countInfo?.stages) {
stage.orderCount = stage.countGe || 0;
}
const lastStage = countInfo?.stages?.[countInfo?.stages?.length - 1] || {};
lastStage.orderCount = orderCount;
const stages: any = [];
stages.push({
title: countInfo.title,
vipTotal: countInfo?.vipTotal || 0,
orderCount: orderCount,
bg: lastStage.bg,
});
if (lastStage.orderCount > 0) {
stages.push(lastStage);
}
return {
enabled: enabled,
stages: stages,
};
});
async function scrollOrderCount() {
const stages = todayOrderCount.value.stages;
if (stages.length === 0) {
return;
}
let index = 0;
const doScroll = () => {
TodayVipOrderCountRef.value.current = index;
index++;
if (index >= stages.length) {
index = 0;
}
};
doScroll();
scrollOrderCountIntervalRef.value = setInterval(doScroll, 7000);
}
const scrollOrderCountIntervalRef: Ref = ref(null);
onMounted(async () => {
await getTodayVipOrderCount();
await nextTick();
await scrollOrderCount();
});
onUnmounted(() => {
clearInterval(scrollOrderCountIntervalRef.value);
});
</script>
<style lang="less">
.vip-active-modal {
.order-count {
height: 80px;
position: relative;
border: 1px solid #fee2c5;
border-radius: 5px;
.background {
border: 0px;
border-radius: 5px;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
display: flex;
justify-content: flex-end;
overflow: hidden;
img {
height: 100%;
object-fit: cover;
}
}
.order-count-text {
position: absolute;
width: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-evenly;
/* 左至右渐变*/
background: linear-gradient(to right, rgba(255, 217, 167, 0.5), rgba(255, 255, 255, 0));
.count-text {
font-size: 16px;
font-weight: 600;
color: #ff6600;
display: flex;
.count-number {
margin-bottom: 5px;
}
}
}
.status-item {
opacity: 0;
transition: all 0.7s ease-in-out;
}
.status-show {
opacity: 1;
}
}
.vip-block {
display: flex;
flex-direction: column;
padding: 10px;
border: 1px solid #eee;
border-radius: 5px;
height: 275px;
line-height: 24px;
.privilege {
margin-top: 5px;
}
&.current {
border-color: green;
}
.block-header {
padding: 0px;
display: flex;
justify-content: space-between;
.trial {
font-size: 12px;
font-wight: 400;
}
}
.footer {
padding-top: 5px;
margin-top: 0px;
border-top: 1px solid #eee;
.price-text {
font-size: 18px;
color: red;
}
}
}
ul {
list-style-type: unset;
margin-left: 0px;
padding: 0;
}
.color-green {
color: green;
}
.vip-type-vs {
.privilege {
.fs-icon {
color: green;
}
}
.fs-icon {
margin-right: 5px;
}
}
}
</style>

View File

@@ -3,7 +3,7 @@
</template>
<script lang="tsx" setup>
import { ref, watch, defineOptions } from "vue";
import { ref, watch } from "vue";
import { routerUtils } from "/@/utils/util.router";
import { useRoute } from "vue-router";
import { utils } from "@fast-crud/fast-crud";

View File

@@ -35,7 +35,13 @@ const menus = computed(() => [
const avatar = computed(() => {
const avt = userStore.getUserInfo?.avatar;
return avt ? `/api/basic/file/download?key=${avt}` : "";
if (!avt) {
return "";
}
if (avt.startsWith("http")) {
return avt;
}
return `/api/basic/file/download?key=${avt}`;
});
async function handleLogout() {
@@ -83,7 +89,7 @@ provide("fn:ai.open", openChat);
</template>
<template #header-right-0>
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full hidden md:block">
<tutorial-button class="flex-center header-btn" />
<tutorial-button class="flex-center header-btn" mode="nav" />
</div>
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full">
<vip-button class="flex-center header-btn" mode="nav" />

View File

@@ -19,6 +19,7 @@ export default {
legoCertPipeline: "Lego Certificate Pipeline",
customPipeline: "Custom Pipeline",
batchAddPipeline: "Add Pipeline Use Template",
myPipelinesDesc: "Pipeline Mode: Apply -> Deploy -> Schedule",
},
order: {
confirmTitle: "Order Confirmation",
@@ -88,6 +89,14 @@ export default {
helpDoc: "Help Docs",
pipelineCount: "Number of Certificate Pipelines",
noPipeline: "You have no certificate pipelines yet",
enabledCount: "Enabled",
disabledCount: "Disabled",
certCount: "Number of Certificates",
noCert: "You have no certificates yet",
manageCert: "View Certificates",
certExpiringCount: "Soon-to-Expire",
certExpiredCount: "Expired",
certNoExpireCount: "Not Expired",
createNow: "Create Now",
managePipeline: "Manage Pipelines",
pipelineStatus: "Pipeline Status",
@@ -321,6 +330,11 @@ export default {
certValidDays: "Certificate Valid Days",
certValidDaysHelper: "Number of days before expiration to send a notification",
},
cert: {
expired: "Expired",
expiring: "Expiring",
noExpired: "Not Expired",
},
},
checkStatus: {
success: "Success",

View File

@@ -3,9 +3,9 @@ export default {
title: "Create Certificate Application Pipeline",
description: "Demonstrate how to configure a certificate application task",
items: {
tutorialTitle: "Tutorial Demo Content",
tutorialDesc1: "This tutorial demonstrates how to automatically apply for a certificate and deploy it to Nginx",
tutorialDesc2: "Only 3 steps, fully automatic application and deployment",
tutorialTitle: "This tutorial demonstrates how to automatically apply for a certificate and deploy it to Nginx",
tutorialDesc1: "Only 3 steps, fully automatic application and deployment",
tutorialDesc2: "",
createTitle: "Create Certificate Pipeline",
createDesc: "Click to add a certificate pipeline and fill in the certificate application information",
successTitle: "Pipeline Created Successfully",

View File

@@ -100,4 +100,5 @@ export default {
confirm: "Confirm",
not_effective: "Not effective or duration not sync?",
learn_more: "More privileges",
question: "More VIP related questions",
};

View File

@@ -23,6 +23,7 @@ export default {
legoCertPipeline: "Lego证书流水线",
customPipeline: "自定义流水线",
batchAddPipeline: "模版批量创建流水线",
myPipelinesDesc: "流水线模式:申请证书->部署证书->定时运行",
},
order: {
confirmTitle: "订单确认",
@@ -93,7 +94,16 @@ export default {
alertMessage: "证书和授权为敏感信息不要使用来历不明的在线Certd服务和镜像以免泄露请务必私有化部署使用认准官方版本发布渠道",
helpDoc: "帮助文档",
pipelineCount: "证书流水线数量",
enabledCount: "已启用",
disabledCount: "已禁用",
noPipeline: "您还没有证书流水线",
certCount: "证书数量",
certExpiringCount: "即将过期",
certExpiredCount: "已过期",
certNoExpireCount: "未过期",
noCert: "还没有证书",
manageCert: "查看证书",
createNow: "立即创建",
managePipeline: "管理流水线",
pipelineStatus: "流水线状态",
@@ -110,7 +120,7 @@ export default {
},
customPipeline: "自定义流水线",
createCertdPipeline: "创建证书流水线",
commercialCertHosting: "商用证书托管",
commercialCertHosting: "已有证书托管",
tooltip: {
manualUploadOwnCert: "手动上传自有证书,执行自动部署",
noAutoApplyCommercialCert: "并不能自动申请商业证书",
@@ -327,6 +337,12 @@ export default {
certValidDays: "证书到期前天数",
certValidDaysHelper: "证书到期前多少天发送通知",
},
cert: {
expired: "已过期",
expiring: "即将过期",
noExpired: "未过期",
},
},
checkStatus: {
success: "成功",

View File

@@ -3,9 +3,9 @@ export default {
title: "创建证书申请流水线",
description: "演示证书申请任务如何配置",
items: {
tutorialTitle: "教程演示内容",
tutorialDesc1: "本教程演示如何自动申请证书并部署到Nginx上",
tutorialDesc2: "仅需3步全自动申请部署证书",
tutorialTitle: "教程演示如何自动申请证书并部署到Nginx上",
tutorialDesc1: "仅需3步全自动申请部署证书",
tutorialDesc2: "",
createTitle: "创建证书流水线",
createDesc: "点击添加证书流水线,填写证书申请信息",
successTitle: "流水线创建成功",

View File

@@ -99,4 +99,5 @@ export default {
confirm: "确认",
not_effective: "VIP没有生效/时长未同步?",
learn_more: "更多特权(加VIP群等)",
question: "更多VIP相关问题",
};

View File

@@ -4,8 +4,16 @@ function isIpv6(d: string) {
if (!d) {
return false;
}
const isIPv6Regex = /^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4})$/gm;
return isIPv6Regex.test(d);
// const isIPv6Regex = /^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4})$/gm;
// return isIPv6Regex.test(d);
try {
// 尝试构造URL用IPv6作为hostname
new URL(`http://[${d}]`);
return true;
} catch {
return false;
}
}
function isIpv4(d: string) {
if (!d) {

View File

@@ -27,6 +27,7 @@ export type PlusInfo = {
expireTime?: number;
isPlus: boolean;
isComm?: boolean;
message?: string;
};
export type SysPublicSetting = {
registerEnabled?: boolean;
@@ -57,6 +58,8 @@ export type SysPublicSetting = {
// 默认到期前更新天数
defaultCertRenewDays?: number;
// 默认即将到期天数
defaultWillExpireDays?: number;
//证书域名添加到监控
certDomainAddToMonitorEnabled?: boolean;
@@ -105,6 +108,8 @@ export type SysPrivateSetting = {
};
export type SysInstallInfo = {
siteId: string;
bindUrl?: string;
bindUrl2?: string;
};
export type MenuItem = {
id: string;

View File

@@ -1,5 +1,5 @@
import { defineStore } from "pinia";
import { Modal, notification } from "ant-design-vue";
import { notification } from "ant-design-vue";
import * as basicApi from "./api.basic";
import { AppInfo, HeaderMenus, PlusInfo, SiteEnv, SiteInfo, SuiteSetting, SysInstallInfo, SysPublicSetting } from "./api.basic";
import { useUserStore } from "../user";
@@ -20,6 +20,7 @@ export interface SettingState {
installTime?: number;
bindUserId?: number;
bindUrl?: string;
bindUrl2?: string;
accountServerBaseUrl?: string;
appKey?: string;
};
@@ -153,9 +154,11 @@ export const useSettingStore = defineStore({
if (this.plusInfo?.expireTime === -1) {
return "永久";
}
//@ts-ignore
return dayjs(this.plusInfo?.expireTime).format("YYYY-MM-DD");
},
isForever() {
//@ts-ignore
return this.isPlus && this.plusInfo?.expireTime === -1;
},
vipLabel(): string {
@@ -251,9 +254,17 @@ export const useSettingStore = defineStore({
url = url.split("#")[0];
return url;
},
async doBindUrl() {
const url = this.getBaseUrl();
await basicApi.bindUrl({ url });
async doBindUrl(key: string = "url") {
const url = this.installInfo.bindUrl;
const url2 = this.installInfo.bindUrl2;
const thisUrl = this.getBaseUrl();
const form = {
url,
url2,
[key]: thisUrl,
};
await basicApi.bindUrl(form);
await this.loadSysSettings();
},
async checkUrlBound() {
@@ -262,24 +273,64 @@ export const useSettingStore = defineStore({
if (!userStore.isAdmin) {
return;
}
const event: any = { ModalRef: null };
mitter.emit("getModal", event);
const Modal = event.ModalRef;
let modalRef: any = null;
const bindUrl = this.installInfo.bindUrl;
const bindUrl2 = this.installInfo.bindUrl2;
const doBindRequest = async (key: string) => {
await this.doBindUrl(key);
if (modalRef) {
modalRef.destroy();
}
};
if (!bindUrl) {
//绑定url
await this.doBindUrl();
await this.doBindUrl("url");
} else {
//检查当前url 是否与绑定的url一致
const url = window.location.href;
if (!url.startsWith(bindUrl)) {
Modal.confirm({
title: "URL地址有变化",
content: "以后都用这个新地址访问本系统吗?",
onOk: async () => {
await this.doBindUrl();
if (!url.startsWith(bindUrl) && !url.startsWith(bindUrl2)) {
modalRef = Modal.warning({
title: "URL地址未绑定,是否绑定此地址?",
width: 500,
keyboard: false,
content: () => {
return (
<div class="p-4">
<div class="flex items-center justify-between">
<span>
1
<a-tag color="green">{bindUrl || "未占用"}</a-tag>
</span>
<a-button type="primary" onClick={() => doBindRequest("url")}>
1
</a-button>
</div>
<div class="flex items-center justify-between mt-3">
<span>
2
<a-tag color="green">{bindUrl2 || "未占用"}</a-tag>
</span>
<a-button type="primary" onClick={() => doBindRequest("url2")}>
2
</a-button>
</div>
</div>
);
},
okText: "是的,继续",
cancelText: "不是,回到原来的地址",
onOk: async () => {
// await this.doBindUrl();
window.location.href = bindUrl;
},
okButtonProps: {
danger: true,
},
okText: "不,回到原来的地址",
cancelText: "不,回到原来的地址",
onCancel: () => {
window.location.href = bindUrl;
},

View File

@@ -19,8 +19,8 @@ div#app {
height: 100%;
}
pre.pre{
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
pre.pre {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
h1,
@@ -61,16 +61,20 @@ h6 {
justify-content: center;
align-items: center;
}
.flex-vc {
align-items: center;
}
.flex-vb {
align-items: baseline;
}
.flex-o {
display: flex !important;
align-items: center;
}
.flex-baseline {
display: flex !important;
align-items: baseline;
@@ -82,9 +86,15 @@ h6 {
align-items: baseline;
}
.flex-evenly {
display: flex;
justify-content: space-evenly;
}
.flex {
display: flex;
}
.flex-inline {
display: inline-flex;
align-items: center;
@@ -93,6 +103,7 @@ h6 {
.flex-1 {
flex: 1;
}
.flex-0 {
flex: 0;
}
@@ -101,9 +112,11 @@ h6 {
display: flex;
flex-direction: column;
}
.align-left {
text-align: left;
}
.align-right {
text-align: right;
}
@@ -111,18 +124,23 @@ h6 {
.scroll-y {
overflow-y: auto;
}
.m-0 {
margin: 0 !important;
}
.m-2 {
margin: 2px !important;
}
.m-3 {
margin: 3px !important;
}
.m-5 {
margin: 5px !important;
}
.m-10 {
margin: 10px !important;
}
@@ -130,6 +148,7 @@ h6 {
.m-20 {
margin: 20px !important;
}
.mb-2 {
margin-bottom: 2px !important;
}
@@ -137,6 +156,7 @@ h6 {
.mb-5 {
margin-bottom: 5px !important;
}
.ml-5 {
margin-left: 5px !important;
}
@@ -192,6 +212,7 @@ h6 {
.p-20 {
padding: 20px !important;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
@@ -220,6 +241,7 @@ h6 {
.color-plus {
color: #c5913f;
}
.color-blue {
color: #1890ff;
}
@@ -231,6 +253,7 @@ h6 {
.color-green {
color: green;
}
.color-gray {
color: gray;
}
@@ -274,6 +297,7 @@ h6 {
font-size: 12px;
margin-top: 3px;
margin-bottom: 3px;
&.error {
color: #ff4d4f;
}
@@ -281,6 +305,7 @@ h6 {
.fs-copyable {
display: inline-flex;
.text {
flex: 1;
}
@@ -292,9 +317,28 @@ h6 {
}
.fs-16 {
font-size: 16px;
font-size: 16px !important;
}
.fs-18 {
font-size: 18px !important;
}
.fs-20 {
font-size: 20px !important;
}
.fs-24 {
font-size: 24px !important;
}
.fs-26 {
font-size: 26px !important;
}
.fs-28 {
font-size: 28px !important;
}
.fs-32 {
font-size: 32px !important;
}
.w-50\% {
width: 50%;
}
@@ -309,14 +353,133 @@ h6 {
color: #6e6e6e;
}
.ant-modal-body{
.fs-form-body{
.ant-modal-body {
.fs-form-body {
max-height: 66vh;
overflow-y: auto;
}
}
.ant-input-number{
.ant-input-number {
min-width: 100px;
}
.cd-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
overflow: auto;
.fs-loading {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.05);
z-index: 10000
}
table {
width: 1000px;
min-width: 100%;
table-layout: fixed;
font-size: 16px;
}
thead {
position: sticky;
top: 0;
z-index: 100;
}
.position-sticky-right {
position: sticky;
right: 0;
z-index: 100;
border-left: 0px;
&::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 1px;
/* 边框宽度 */
background: #eee;
/* 边框颜色 */
}
}
th,
td {
text-align: left;
border-bottom: 1px solid #eee;
border-left: 1px solid #eee;
}
th {
padding: 10px 5px;
background: #fbfbfb;
font-weight: 600;
color: #000000;
font-size: 14px;
border-top: 1px solid #eee;
&:last-child {
border-right: 1px solid #eee;
}
}
td {
padding: 10px;
font-size: 14px;
&:last-child {
border-right: 1px solid #eee;
}
}
td.position-sticky-right {
background-color: #fff;
}
tr.hover-color:hover td {
background: #f9f9ff;
}
.status {
padding: 5px 10px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
}
.status-active {
background: #e7f6e9;
color: #2e7d32;
}
.status-pending {
background: #ffecb3;
color: #f57c00;
}
}
.ant-tag{
.fs-icon{
margin-right: 5px;
}
}
.hidden-important {
display: none !important;
visibility: hidden !important;
}

View File

@@ -2,8 +2,11 @@ import { useFormWrapper } from "@fast-crud/fast-crud";
export type FormOptionReq = {
title: string;
columns: any;
columns?: any;
onSubmit?: any;
body?: any;
initialForm?: any;
zIndex?: number;
};
export function useFormDialog() {
@@ -15,9 +18,14 @@ export function useFormDialog() {
crudOptions: {
columns: req.columns,
form: {
initialForm: req.initialForm,
wrapper: {
zIndex: req.zIndex,
title: req.title,
saveRemind: false,
slots: {
"form-body-top": req.body,
},
},
async afterSubmit() {},
async doSubmit({ form }: any) {

View File

@@ -1,11 +1,12 @@
import type { RouteRecordNormalized } from "vue-router";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { isHttpUrl, openRouteInNewWindow, openWindow } from "../../../utils";
function useNavigation() {
const router = useRouter();
const route1 = useRoute();
const routes = router.getRoutes();
const routeMetaMap = new Map<string, RouteRecordNormalized>();
@@ -15,6 +16,9 @@ function useNavigation() {
});
const navigation = async (path: string) => {
if (route1.path === path) {
return;
}
const route = routeMetaMap.get(path);
const { openInNewWindow = false, query = {} as any } = route?.meta ?? {};
if (isHttpUrl(path)) {

View File

@@ -27,8 +27,12 @@ function openWindow(url: string, options: OpenWindowOptions = {}): void {
*/
function openRouteInNewWindow(path: string) {
const { hash, origin } = location;
let pathname = location.pathname;
if (pathname.endsWith("/")) {
pathname = pathname.slice(0, -1);
}
const fullPath = path.startsWith("/") ? path : `/${path}`;
const url = `${origin}${hash ? "/#" : ""}${fullPath}`;
const url = `${origin}${pathname}${hash ? "/#" : ""}${fullPath}`;
openWindow(url, { target: "_blank" });
}

View File

@@ -58,17 +58,44 @@ export async function DeleteBatch(ids: any[]) {
});
}
export async function SyncSubmit(body: any) {
export async function ImportTaskSave(body: any) {
return await request({
url: apiPrefix + "/sync/import",
url: apiPrefix + "/import/save",
method: "post",
data: body,
});
}
export async function SyncDomainsExpiration() {
export async function ImportTaskStatus() {
return await request({
url: apiPrefix + "/sync/expiration",
url: apiPrefix + "/import/status",
method: "post",
});
}
export async function ImportTaskDelete(key: string) {
return await request({
url: apiPrefix + "/import/delete",
method: "post",
data: { key },
});
}
export async function ImportTaskStart(key: string) {
return await request({
url: apiPrefix + "/import/start",
method: "post",
data: { key },
});
}
export async function SyncExpirationStart() {
return await request({
url: apiPrefix + "/sync/expiration/start",
method: "post",
});
}
export async function SyncExpirationStatus() {
return await request({
url: apiPrefix + "/sync/expiration/status",
method: "post",
});
}

View File

@@ -1,15 +1,14 @@
import * as api from "./api";
import { useI18n } from "/src/locales";
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { Modal, notification } from "ant-design-vue";
import { Ref, ref } from "vue";
import { useRouter } from "vue-router";
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { useUserStore } from "/@/store/user";
import { useSettingStore } from "/@/store/settings";
import * as api from "./api";
import { useDomainImportManage } from "./use";
import { Dicts } from "/@/components/plugins/lib/dicts";
import { useSettingStore } from "/@/store/settings";
import { useUserStore } from "/@/store/user";
import { createAccessApi } from "/@/views/certd/access/api";
import { Modal, notification } from "ant-design-vue";
import { useDomainImport } from "./use";
import { useI18n } from "/src/locales";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const router = useRouter();
const { t } = useI18n();
@@ -51,7 +50,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
url: "pi/dnsProvider/dnsProviderTypeDict",
});
const openDomainImportDialog = useDomainImport();
const openDomainImportManageDialog = useDomainImportManage();
return {
crudOptions: {
settings: {
@@ -103,13 +102,10 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
needPlus: true,
color: "gold",
icon: "mingcute:vip-1-line",
click: () => {
settingStore.checkPlus();
openDomainImportDialog({
afterSubmit: () => {
setTimeout(() => {
crudExpose.doRefresh();
}, 2000);
click: async () => {
await openDomainImportManageDialog({
afterSubmit: res => {
crudExpose.doRefresh();
},
});
},
@@ -120,7 +116,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
icon: "ion:refresh-outline",
text: "同步域名过期时间",
click: async () => {
await api.SyncDomainsExpiration();
await api.SyncExpirationStart();
notification.success({
message: "同步任务已提交",
});
@@ -339,10 +335,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
title: t("certd.domain.fromType"),
type: "dict-select",
dict: Dicts.domainFromTypeDict,
form: {
show: false,
},
column: {
component: {
color: "auto",
},
show: false,
},
},
disabled: {

View File

@@ -0,0 +1,137 @@
<template>
<div class="domain-import-task-status min-h-[300px]">
<div class="action mb-5">
<fs-button type="primary" icon="mingcute:vip-1-line" @click="addTask">添加导入任务</fs-button>
<fs-button type="primary" icon="ion:refresh-outline" class="ml-2" @click="loadImportTaskStatus">刷新</fs-button>
</div>
<div class="table-container overflow-auto mb-10">
<table class="cd-table border-gray-300 w-full">
<thead>
<tr>
<th class="w-[220px]">来源</th>
<th class="">进度</th>
<th class="w-[220px]">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in list" :key="item.key">
<td class="ellipsis">
<span class="flex items-center pointer" @click="editTask(item)">
<span class="flex-1 ellipsis flex items-center">
<fs-icon :icon="item.icon" class="mr-2"></fs-icon>
{{ item.title }}
</span>
<fs-icon icon="ant-design:edit-outlined" class="ml-2" />
</span>
</td>
<td>
<div v-if="item.task">
<div>
<a-tag color="blue">总数{{ item.task?.total }}</a-tag>
<a-tag color="success" class="ml-2">成功{{ item.task?.successCount }}</a-tag>
<a-tag type="info" class="ml-2">跳过{{ item.task?.skipCount }}</a-tag>
<a-tooltip v-if="item.task?.errors.length > 0">
<template #title>
<div v-for="error in item.task?.errors" :key="error">{{ error }}</div>
</template>
<a-tag color="red" class="ml-2">失败{{ item.task?.errors.length }}</a-tag>
</a-tooltip>
</div>
<a-progress :percent="item.task?.progress" size="small" status="active" />
</div>
<div v-else>未执行</div>
</td>
<td>
<fs-button type="primary" icon="ion:play-outline" :disabled="item.task?.status === 'running'" @click="startTask(item)">执行</fs-button>
<fs-button type="primary" class="ml-2" danger icon="ion:trash-outline" @click="deleteTask(item)">删除</fs-button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script setup lang="ts">
import { Modal } from "ant-design-vue";
import { onMounted, onUnmounted, ref } from "vue";
import * as api from "./api";
import { useDomainImport } from "./use";
import { useSettingStore } from "/@/store/settings";
defineOptions({
name: "DomainImportTaskStatus",
});
const list = ref([]);
async function loadImportTaskStatus() {
const res = await api.ImportTaskStatus();
list.value = res || [];
}
async function startTask(item: any) {
settingStore.checkPlus();
await api.ImportTaskStart(item.key);
await loadImportTaskStatus();
}
async function deleteTask(item: any) {
Modal.confirm({
title: "确认删除吗?",
okText: "确认",
okType: "danger",
onOk: async () => {
await api.ImportTaskDelete(item.key);
await loadImportTaskStatus();
},
});
}
const openDomainImportDialog = useDomainImport();
const settingStore = useSettingStore();
async function addTask() {
settingStore.checkPlus();
await openDomainImportDialog({
afterSubmit: async (res?: any) => {
if (res) {
await api.ImportTaskStart(res.key);
}
await loadImportTaskStatus();
},
});
}
async function editTask(item: any) {
settingStore.checkPlus();
await openDomainImportDialog({
afterSubmit: async () => {
await loadImportTaskStatus();
},
form: item,
});
}
const checkIntervalRef = ref();
onMounted(async () => {
await loadImportTaskStatus();
checkIntervalRef.value = setInterval(async () => {
await loadImportTaskStatus();
}, 3000);
});
onUnmounted(() => {
clearInterval(checkIntervalRef.value);
});
</script>
<style lang="less">
.domain-import-task-status {
.table-container {
height: 50vh;
}
.ant-progress {
margin-bottom: 0px;
}
}
</style>

View File

@@ -2,7 +2,9 @@ import { message } from "ant-design-vue";
import * as api from "./api";
import { useFormDialog } from "/@/use/use-dialog";
import { compute } from "@fast-crud/fast-crud";
import { Dicts } from "/@/components/plugins/lib/dicts";
import { useSettingStore } from "/@/store/settings";
import DomainImportTaskStatus from "./import.vue";
export function useDomainImport() {
const { openFormDialog } = useFormDialog();
@@ -13,11 +15,11 @@ export function useDomainImport() {
form: {
component: {
name: "dns-provider-selector",
},
on: {
//@ts-ignore
onSelectedChange: ({ form, $event }) => {
form.dnsProviderAccessType = $event.accessType;
on: {
//@ts-ignore
selectedChange: ({ form, $event }) => {
form.dnsProviderAccessType = $event.accessType;
},
},
},
//@ts-ignore
@@ -48,18 +50,40 @@ export function useDomainImport() {
},
};
return function openDomainImportDialog(req: { afterSubmit?: () => void }) {
return function openDomainImportDialog(req: { afterSubmit?: (res?: any) => void; form?: any }) {
openFormDialog({
title: "从域名提供商导入域名",
columns: columns,
initialForm: {
...req.form,
},
onSubmit: async (form: any) => {
await api.SyncSubmit({
const res = await api.ImportTaskSave({
key: form.key,
dnsProviderType: form.dnsProviderType,
dnsProviderAccessId: form.dnsProviderAccessId,
});
message.success("导入任务已提交");
if (req.afterSubmit) {
req.afterSubmit();
req.afterSubmit(res);
}
},
});
};
}
export function useDomainImportManage() {
const { openFormDialog } = useFormDialog();
const settingStore = useSettingStore();
return async function openDomainImportManageDialog(req: { afterSubmit?: (res?: any) => void; form?: any; zIndex?: number }) {
await openFormDialog({
title: "从域名提供商导入域名",
body: () => {
return <DomainImportTaskStatus />;
},
zIndex: req.zIndex,
onSubmit: async (form: any) => {
if (req.afterSubmit) {
req.afterSubmit(form);
}
},
});

View File

@@ -8,7 +8,7 @@
<a-descriptions-item :label="t('authentication.username')">{{ userInfo.username }}</a-descriptions-item>
<a-descriptions-item :label="t('authentication.nickName')">{{ userInfo.nickName }}</a-descriptions-item>
<a-descriptions-item :label="t('authentication.avatar')">
<a-avatar v-if="userInfo.avatar" size="large" :src="'api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-if="userInfo.avatar" size="large" :src="userAvatar" style="background-color: #eee"> </a-avatar>
<a-avatar v-else size="large" style="background-color: #00b4f5">
{{ userInfo.username }}
</a-avatar>
@@ -108,6 +108,17 @@ async function bind(type: string) {
window.location.href = loginUrl;
}
const userAvatar = computed(() => {
if (isEmpty(userInfo.value.avatar)) {
return "";
}
if (userInfo.value.avatar.startsWith("http")) {
return userInfo.value.avatar;
}
return "api/basic/file/download?&key=" + userInfo.value.avatar;
});
onMounted(async () => {
await getUserInfo();
await loadOauthBounds();

View File

@@ -4,7 +4,7 @@ import { useI18n } from "/src/locales";
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, useFormWrapper, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { certInfoApi } from "./api";
import dayjs from "dayjs";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { useModal } from "/@/use/use-modal";
import { notification } from "ant-design-vue";
import CertView from "/@/views/certd/pipeline/cert-view.vue";
@@ -33,7 +33,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const res = await api.AddObj(form);
return res;
};
const { openCrudFormDialog } = useFormWrapper();
const router = useRouter();
const settingStore = useSettingStore();
@@ -57,7 +56,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
});
};
const { openUploadCreateDialog, openUpdateCertDialog } = useCertUpload();
const { openUploadCreateDialog } = useCertUpload();
const DEFAULT_WILL_EXPIRE_DAYS = settingStore.sysPublic.defaultWillExpireDays || settingStore.sysPublic.defaultCertRenewDays || 15;
const route = useRoute();
const expireStatus = route?.query?.expireStatus as string;
const searchInitForm = {
expiresLeft: expireStatus,
};
return {
crudOptions: {
request: {
@@ -66,6 +72,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
editRequest,
delRequest,
},
search: {
initialForm: searchInitForm,
},
form: {
labelCol: {
//固定label宽度
@@ -213,7 +222,17 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
expiresLeft: {
title: t("certd.validDays"),
search: {
show: false,
show: true,
component: {
name: "fs-dict-select",
dict: dict({
data: [
{ label: t("certd.monitor.cert.expired"), value: "expired" },
{ label: t("certd.monitor.cert.expiring"), value: "expiring" },
{ label: t("certd.monitor.cert.noExpired"), value: "noExpired" },
],
}),
},
},
type: "date",
form: {
@@ -242,9 +261,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
// 距离失效时间剩余天数
const leftDays = dayjs(expiresTime).diff(dayjs(), "day");
const color = leftDays < 20 ? "red" : "#389e0d";
const color = leftDays < DEFAULT_WILL_EXPIRE_DAYS ? "red" : "#389e0d";
const percent = (leftDays / effectiveDays) * 100;
const textColor = leftDays < 20 ? "red" : leftDays > 60 ? "#389e0d" : "";
const textColor = leftDays < DEFAULT_WILL_EXPIRE_DAYS ? "red" : leftDays > 60 ? "#389e0d" : "";
const format = () => {
return <span style={{ color: textColor }}>{`${leftDays}${t("certd.days")}`}</span>;
};

View File

@@ -457,6 +457,29 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
align: "center",
},
},
checkStatus: {
title: t("certd.monitor.checkStatus"),
search: {
show: false,
},
type: "dict-select",
dict: checkStatusDict,
form: {
show: false,
},
column: {
width: 100,
align: "center",
sorter: true,
cellRender({ value, row }) {
return (
<a-tooltip title={row.error}>
<fs-values-format v-model={value} dict={checkStatusDict}></fs-values-format>
</a-tooltip>
);
},
},
},
certEffectiveTime: {
title: t("certd.monitor.certEffectiveTime"),
search: {
@@ -610,29 +633,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
},
},
checkStatus: {
title: t("certd.monitor.checkStatus"),
search: {
show: false,
},
type: "dict-select",
dict: checkStatusDict,
form: {
show: false,
},
column: {
width: 100,
align: "center",
sorter: true,
cellRender({ value, row }) {
return (
<a-tooltip title={row.error}>
<fs-values-format v-model={value} dict={checkStatusDict}></fs-values-format>
</a-tooltip>
);
},
},
},
// error: {
// title: "错误信息",
// search: {

View File

@@ -167,8 +167,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
show: true,
},
type: "text",
helper: t("certd.helperIpCname"),
form: {
helper: t("certd.helperIpCname"),
rules: [{ required: true, message: t("certd.ruleIpRequired") }],
},
column: {

View File

@@ -115,6 +115,15 @@ export function useCertPipelineCreator() {
label: "name",
});
const DEFAULT_RENEW_DAYS = settingStore.sysPublic.defaultCertRenewDays || settingStore.sysPublic.defaultWillExpireDays || 15;
merge(inputs, {
renewDays: {
form: {
value: DEFAULT_RENEW_DAYS,
},
},
});
return {
crudOptions: {
form: {
@@ -338,7 +347,7 @@ export function useCertPipelineCreator() {
title: "申请证书",
runnableType: "step",
input: {
renewDays: 35,
renewDays: 15,
...pluginInput,
},
strategy: {

View File

@@ -66,6 +66,8 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
const userStore = useUserStore();
const settingStore = useSettingStore();
const DEFAULT_WILL_EXPIRE_DAYS = settingStore.sysPublic.defaultWillExpireDays || settingStore.sysPublic.defaultCertRenewDays || 15;
function onDialogOpen(opt: any) {
const searchForm = crudExpose.getSearchValidatedFormData();
opt.initialForm = {
@@ -389,9 +391,9 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
}
// 距离失效时间剩余天数
const leftDays = dayjs(expiresTime).diff(dayjs(), "day");
const color = leftDays < 20 ? "red" : "#389e0d";
const color = leftDays < DEFAULT_WILL_EXPIRE_DAYS ? "red" : "#389e0d";
const percent = (leftDays / effectiveDays) * 100;
const textColor = leftDays < 20 ? "red" : leftDays > 60 ? "#389e0d" : "";
const textColor = leftDays < DEFAULT_WILL_EXPIRE_DAYS ? "red" : leftDays > 60 ? "#389e0d" : "";
const format = () => {
return <span style={{ color: textColor }}>{`${leftDays}${t("certd.days")}`}</span>;
};

View File

@@ -1,7 +1,10 @@
<template>
<fs-page class="page-cert">
<template #header>
<div class="title">{{ t("certd.myPipelines") }}</div>
<div class="title">
{{ t("certd.myPipelines") }}
<span class="sub">{{ t("certd.pipelinePage.myPipelinesDesc") }}</span>
</div>
</template>
<!-- <a-alert v-if="settingStore.sysPublic.notice" type="warning" show-icon>
<template #message>

View File

@@ -5,12 +5,12 @@
</template>
<p class="flex items-center">
<TriggerIcon class="mr-2" :trigger-type="runnable.triggerType"></TriggerIcon>
<fs-date-format :model-value="runnable.createTime"></fs-date-format>
<a-tag class="ml-5" :color="status.color" :closable="status.value === 'start'" @close="cancelTask">
<fs-date-format class="mr-1" :model-value="runnable.createTime"></fs-date-format>
<a-tag class="ml-0 mr-1" :color="status.color" :closable="status.value === 'start'" @close="cancelTask">
{{ status.label }}
</a-tag>
<a-tag v-if="isCurrent" class="pointer" color="green" :closable="true" @close="cancel">当前</a-tag>
<a-tag v-else-if="!editMode" class="pointer" color="blue" @click="view">查看</a-tag>
<a-tag v-if="isCurrent" class="pointer ml-0 mr-1" color="green" :closable="true" @close="cancel">当前</a-tag>
<a-tag v-else-if="!editMode" class="pointer ml-0 mr-1" color="blue" @click="view">查看</a-tag>
</p>
</a-timeline-item>
</template>
@@ -89,5 +89,9 @@ export default defineComponent({
.ant-tag.pointer {
cursor: pointer;
}
.ant-timeline .ant-timeline-item-content {
margin-inline-start: 22px !important;
}
}
</style>

View File

@@ -76,7 +76,7 @@
<a-button type="primary" size="large" html-type="submit" class="submit-button"> 找回密码</a-button>
<div class="mt-2 flex-between">
<a v-comm="false" href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank"> 管理员无绑定通信方式或MFA丢失找回 </a>
<a v-comm="false" href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank"> 管理员忘记密码 </a>
<router-link :to="{ name: 'login' }"> 返回登录 </router-link>
</div>

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="data.length !== 0" class="expiring-pipeline-list">
<div v-for="item of data" class="pipeline-row">
<div v-for="item of data" :key="item.id" class="pipeline-row">
<div class="title" :title="item.title">
<pi-status-show :status="item.status"></pi-status-show> <a @click="goDetail(item)">{{ item.title }}</a>
</div>

Some files were not shown because too many files have changed in this diff Show More