Skip to content

Commit

Permalink
fix: 适配web修改配置 (#37)
Browse files Browse the repository at this point in the history
* 1

* 先这样吧

* 1

* fix: 以前造的什么孽

* feat: 前端保存数据转换

* perf: 缓存对比

* fix: 忘了数字和布尔值

* fix: 修复一些bug

* fix: 增加漏掉的

* fix: 遇到属性是数组则使用新配置直接覆盖

* 1

* 1

* fix: 保存时重新读取旧的配置

* 添加数组操作组件
  • Loading branch information
ikenxuan authored Feb 19, 2025
1 parent 643272e commit e8b3df8
Show file tree
Hide file tree
Showing 12 changed files with 881 additions and 343 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
comments=$(gh pr view ${{ env.PR_NUMBER }} --json comments)
# 过滤目标评论并按时间排序
target_comments=$(echo "$comments" | jq -r '.comments[] | select(.body | test("🎉 构建完成!|❌ 构建失败!")) | {url: .url, created_at: .createdAt}' | jq -s '. | sort_by(.created_at) | reverse')
target_comments=$(echo "$comments" | jq -r '.comments[] | select(.body | test("🎉 🎉 🎉构建完成!|❌ 构建失败!|构建过程中出现错误")) | {url: .url, created_at: .createdAt}' | jq -s '. | sort_by(.created_at) | reverse')
# 获取需要删除的评论ID (保留最新的3条)
comment_ids_to_delete=$(echo "$target_comments" | jq -r 'if length > 3 then .[3:][] | .url | capture("#issuecomment-(?<id>\\d+)$").id else empty end')
Expand Down
271 changes: 0 additions & 271 deletions config/PluginConfigView.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions config/default_config/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ defaulttool: true
# 自定义优先级,「默认解析」关闭后才会生效。修改后重启生效
priority: 800

# 发送合并转发消息,可能多用于抖音解析
sendforwardmsg: true

# 缓存删除,非必要不修改!
rmmp4: true

Expand Down
3 changes: 3 additions & 0 deletions config/default_config/kuaishou.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ switch: true
# 快手解析提示,发送提示信息:“检测到快手链接,开始解析”
tip: true

# 快手评论解析,发送快手作品评论图
comment: true

# 快手评论数量,范围1~30条
numcomment: 5
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.14.0",
"neostandard": "^0.11.9",
"node-karin": "^1.3.11",
"node-karin": "^1.3.14",
"sort-package-json": "^2.14.0",
"tsc-alias": "^1.8.10",
"tsx": "^4.19.2",
Expand Down
2 changes: 1 addition & 1 deletion resources/template/admin/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
<span class="cfg-hint">#kkk设置上传压缩后的值 + 0 ~ x</span>
{{@data.upload.compressvalue}}
</div>
<div class="cfg-desc">若视频文件大小大于「压缩触发阈值」的值,则会进行压缩至该值(±5%),「压缩视频」开启后才会生效</div>
<div class="cfg-desc">单位:MB,若视频文件大小大于「压缩触发阈值」的值,则会进行压缩至该值(±5%),「压缩视频」开启后才会生效</div>
</li>
<li class="cfg-li">
<div class="cfg-line">
Expand Down
1 change: 0 additions & 1 deletion src/apps/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ const PlatformTypeConfig: Record<string, PlatformType> = {
缓存删除: 'rmmp4',
视频解析: 'videotool',
默认解析: 'defaulttool',
转发: 'sendforwardmsg',
上传限制: 'usefilelimit',
API服务: 'APIServer',
base64: 'sendbase64'
Expand Down
Loading

0 comments on commit e8b3df8

Please sign in to comment.