Commit Graph

162 Commits

Author SHA1 Message Date
mediabot-pt
36e05896e5 refactor: remove redundant template import dialog, keep only quick-add dropdown
Quick-add dropdown already serves the same purpose with fewer clicks
2026-07-06 22:45:16 +08:00
mediabot-pt
110af4a79c feat: prevent duplicate rules by type+applicable key
- Uniqueness key: type + applicable condition combination

- '添加规则' button warns if KILL(null) already exists

- Dropdown and template dialog disabled+greyed for already-added presets

- Import skips duplicates with warning message

- Applicable dropdown change guarded against duplicates
2026-07-06 22:44:15 +08:00
mediabot-pt
accb38986a style: add color to action labels in rule summary text
\u4fdd\u53f7=green(#67c23a), \u5c01\u53f7/\u5220\u9664\u8d26\u53f7=red(#f56c6c), \u5c01\u53f7(\u7f13\u52117\u5929)=orange(#e6a23c)
2026-07-06 22:41:55 +08:00
mediabot-pt
7ec4e16eb6 feat: add fixed-order rule summary text at bottom of visual editor
Sort order: EXEMPT \u2192 TASK \u2192 HD \u2192 KILL \u2192 RATIO \u2192 DRATIO \u2192 TRAFFIC

Each rule shown as natural language sentence with applicable condition

TASK shows only enabled requirements

Regardless of card drag order, summary always displays in fixed sequence
2026-07-06 22:35:38 +08:00
mediabot-pt
15dcccb405 feat: add enable/disable switch for each TASK requirement
Each requirement has an el-switch; disabled items grey out and input is locked

Sites can pick only the conditions they need (e.g. upload+download only)
2026-07-06 22:31:52 +08:00
mediabot-pt
a956d38365 fix: rename ratio penalty label to \u5c01\u53f7\uff08\u7f13\u52117\u5929\uff09
More accurate than '\u964d\u7ea7\u81f3Peasant': user is demoted regardless of rank, then killed after 7 days

Template dialog: '\u7f13\u52117\u5929' instead of '\u964d\u7ea7'
2026-07-06 22:29:23 +08:00
mediabot-pt
86d1089114 fix: RATIO/DRATIO actions change to demote-to-Peasant first
- Low ratio \u2192 demote to Peasant \u2192 kill after 7 days, not immediate kill

- Orange arrow + '\u964d\u7ea7\u81f3Peasant' label instead of red '\u5c01\u53f7/\u5220\u9664\u8d26\u53f7'

- Card body shows full explanation: \u4f4e\u4e8e\u6b64\u5206\u4eab\u7387\u5219\u964d\u7ea7\u81f3Peasant\uff0c7\u5929\u540e\u5c01\u53f7/\u5220\u9664\u8d26\u53f7

- Template dialog also shows '\u964d\u7ea7' label for RATIO/DRATIO presets
2026-07-06 22:28:24 +08:00
mediabot-pt
03f6fd265f style: remove colored left border and hover shadow from rule cards
Simpler, cleaner look without the AI-style decorative borders
2026-07-06 22:24:22 +08:00
mediabot-pt
30edbf9d32 feat: convert rank inputs to dropdown with level numbers
- 10 standard PT ranks: Peasant(0) \u2192 Nexus Master(9)

- Dropdown shows \u201c3. Elite User\u201d format with level and name

- Card header and template dialog also show level numbers

- Default preset: Elite User for perm, Power User for seal
2026-07-06 22:23:10 +08:00
mediabot-pt
d8a23f1e40 feat: add EXEMPT type for rank-based immunity rules
- Opposite of kill rules: protects users instead of deleting them

- permRank: users at/above this rank permanently immune from all cleanups

- sealExemptRank: users at/above this rank won't be killed when sealed

- Green left border + green '\u4fdd\u53f7' label to visually distinguish from kill rules

- Template: Elite User for perm, Power User for seal exemption
2026-07-06 22:14:55 +08:00
mediabot-pt
d1570fb80b feat: add DRATIO type for dynamic ratio rules
- When download reaches threshold (GB), ratio must meet minRatio

- Card header: \u4e0b\u8f7d\u91cf \u2265 XGB \u65f6\u5206\u4eab\u7387 \u2265 Y \u2192 \u5c01\u53f7/\u5220\u9664\u8d26\u53f7

- Card body: download threshold input + required ratio input

- Preset: 100GB download, 1.0 ratio
2026-07-06 22:13:52 +08:00
mediabot-pt
b5a8dfa3b8 feat: add TASK type for new user assessment rules
- New TASK type with requirements array: upload_gb, download_gb, bonus, seeding_score, avg_seed_time

- Card header shows: \u8003\u6838\u5468\u671f N\u5929 \u2192 \u5c01\u53f7/\u5220\u9664\u8d26\u53f7

- Card body: editable period + 5 requirement rows (each with editable threshold)

- Type switch to TASK auto-initializes requirements from defaults

- Preset import auto-fills requirements for TASK rules

- Add seeding_score metric option
2026-07-06 22:13:04 +08:00
mediabot-pt
51bf25912b fix: add explicit '\u65e0\u6761\u4ef6' option to applicable dropdown
Easier to switch back than relying on clearable X button
2026-07-06 22:07:41 +08:00
mediabot-pt
66e1ec32c6 chore: hide description field in rule card body
Card header already shows full rule summary, description is redundant
2026-07-06 22:06:16 +08:00
mediabot-pt
5f57453af9 fix: remove redundant LOGIN type, rename KILL label to \u6d3b\u8dc3\u5ea6
- LOGIN type duplicated with KILL (both use days_since_last_login)

- KILL label: \u5c01\u53f7\u89c4\u5219 \u2192 \u6d3b\u8dc3\u5ea6 (action is always \u5c01\u53f7/\u5220\u9664\u8d26\u53f7, type now describes monitoring category)
2026-07-06 22:00:10 +08:00
mediabot-pt
3209ff16d6 chore: change \u5c01\u53f7 label to \u5c01\u53f7/\u5220\u9664\u8d26\u53f7 2026-07-06 21:58:13 +08:00
mediabot-pt
c9889a4aab refactor: simplify rule card UI - hide metric/condition/unit
- Replace editable name/metric/condition/unit with plain text in card header

- Card header shows: [type] [metric label] [condition label] [threshold][unit] \u2192 \u5c01\u53f7

- Type change auto-updates metric/condition/unit via typeDefaults mapping

- Card body only shows: threshold, applicable, description

- Fix edit title to show site name instead of raw siteType

- Remove unused styles and functions
2026-07-06 21:52:48 +08:00
mediabot-pt
842c01d79a refactor: remove action field, rules define kill conditions only
- WARN is auto-detected by RiskCheckEngine (riskPct > 80), not configured in rules

- Each rule simply defines: type + metric + condition + threshold + unit -> 封号

- Card always shows red left border and red '封号' arrow, no action selector

- Presets reduced to 7 kill-only templates, no WARN presets
2026-07-06 21:12:47 +08:00
mediabot-pt
040b97914e refactor: simplify risk rules to KILL/WARN actions only
- Replace complex type system (DEMOTE/TASK) with simple KILL/WARN action model

- Each rule now has: type (monitoring category) + action (KILL=封号 / WARN=告警)

- Type options: KILL/TRAFFIC/LOGIN/HD/RATIO (no DEMOTE/TASK)

- Card left border color by action: red=KILL, orange=WARN

- 12 preset templates with alert-based rules (60-day no-traffic warn, 140-day login warn, HnR warn, ratio warn)

- Remove requirements sub-table and downloadThreshold fields
2026-07-06 21:11:21 +08:00
mediabot-pt
9b5cee6439 feat: full PT site management rules system in risk rules editor
Type coverage: KILL/DEMOTE/TASK/TRAFFIC/LOGIN/HD/RATIO matching all 6 rule categories

Advanced fields: applicable conditions (!sealed/sealed/zero_traffic/new_account_30d), requirements for TASK type, downloadThreshold for DEMOTE type

12 preset templates covering: dynamic ratio, survival policy, zero-activity cleanup, novice exam, HnR penalty, traffic anomaly

Card fold/expand via double-click or arrow button, metric suggestions with filterable select, cleaner field layout
2026-07-06 21:06:20 +08:00
mediabot-pt
6a41938671 fix: restore left JSON editor + right card layout for risk rules editor
- Left pane: fixed 400px CodeEditor for JSON editing

- Right pane: card-based visual editor with natural language, drag-and-drop, presets

- Remove JSON toggle button, always show both panes
2026-07-06 17:51:46 +08:00
mediabot-pt
2cdf502831 feat: redesign risk rules editor with card-based visual UI
- Replace table-based editor with intuitive card layout showing rules as readable sentences

- Add drag-and-drop reordering for risk rules

- Add 8 preset rule templates with one-click import (traffic, ratio, kill, HnR, login)

- Collapse JSON editor by default, toggle via button for power users

- Show condition as natural language (GT=greater than, LT=less than, etc.)

- Color-coded left border by severity (red=CRITICAL, orange=WARN, blue=INFO)

- Add optional rule description field
2026-07-06 17:19:57 +08:00
mediabot-pt
773ad8fdb7 feat: page config upload button for normal sites, add cloud upload endpoint
- SitePagesController: add PUT /admin/site-pages/{siteId}/upload for uploading normal site pages to cloud storage

- SitePages.vue: show upload button for both default templates and normal sites
2026-07-06 15:13:09 +08:00
mediabot-pt
8724774850 feat: 页面配置入口地址添加验证按钮,解析失败自动提交错误日志
- 后端新增 POST /api/v1/admin/site-pages/verify 端点
  - 接收 siteId/url/pageKey,用对应 Groovy 脚本访问URL并解析
  - 解析失败(matched=false)时自动提交 error-log 到 PAR
  - 支持 HTTP_ERROR/EMPTY_RESPONSE/PARSE_FAILED/SCRIPT_ERROR 多种错误类型
- 前端 SitePages.vue 每条页面入口 URL 后添加验证按钮
  - 成功显示绿色 ✓,失败显示红色 ✗,并展示解析结果消息
  - 显示响应耗时
- api/index.js 新增 adapter.verifyPage 方法
2026-07-06 13:39:32 +08:00
mediabot-pt
02b7278c8c remove-authvalue-from-page-config 2026-07-06 12:15:40 +08:00
mediabot-pt
7042149a13 fix-page-config-reload-empty 2026-07-06 12:14:38 +08:00
mediabot-pt
004aa16e2b ui: header改为多行textarea+URL限宽 2026-07-06 01:34:14 +08:00
mediabot-pt
c042410c7b refactor: authType固定COOKIE/X-API-Key/自定义三种 2026-07-06 01:32:37 +08:00
mediabot-pt
6ce987b2f5 fix: 去掉重复syncToJson声明 2026-07-06 01:30:11 +08:00
mediabot-pt
8d4a3cc42f refactor: authType简化NONE/COOKIE/HEADER三种 2026-07-06 01:27:12 +08:00
mediabot-pt
821f0b909d feat: 页面配置增加authType认证方式(NONE/COOKIE/TOKEN/BASIC/API_KEY) 2026-07-06 01:26:09 +08:00
mediabot-pt
817d1e09e0 feat: 页面配置编辑器改为卡片布局+POSTbody字段 2026-07-06 01:21:13 +08:00
mediabot-pt
a5a5f68365 refactor: 去掉label字段key即名称 2026-07-06 01:17:56 +08:00
mediabot-pt
04b7f789b5 feat: 页面配置增加headers字段 2026-07-06 01:11:08 +08:00
mediabot-pt
18b045b4ba feat: 页面配置key改为枚举下拉框+自动填method 2026-07-06 01:00:30 +08:00
mediabot-pt
5345b506e2 feat: 风险规则增加上传按钮+对应后端接口(七牛云) 2026-07-06 00:36:46 +08:00
mediabot-pt
cf4c97daf5 feat: 默认页面模板增加上传按钮+对应后端接口 2026-07-06 00:35:30 +08:00
mediabot-pt
c635d6459e feat: 页面配置页增加按站点类型默认模板编辑入口 2026-07-06 00:29:02 +08:00
mediabot-pt
c140105cdc feat: 页面配置默认模板回退+删除功能 2026-07-06 00:18:27 +08:00
mediabot-pt
d04dcdec4f feat: 删除站点自定义脚本回退默认模板 2026-07-06 00:11:40 +08:00
mediabot-pt
b7adbfd18a feat: 站点编辑加发布按钮生成manifest上传七牛云 2026-07-05 23:54:25 +08:00
mediabot-pt
25df4203d7 feat: 默认脚本分保存本地和上传七牛云两个按钮 2026-07-05 23:46:17 +08:00
mediabot-pt
b286f733dc feat: 页面配置+风险规则右侧改为可编辑表格双向同步JSON编辑器 2026-07-05 22:50:23 +08:00
mediabot-pt
eafdf7278a fix: el-card及其body/header全设overflow:visible 2026-07-05 22:48:02 +08:00
mediabot-pt
88776997dd feat: 站点列表显示标签+简介列 2026-07-05 22:28:25 +08:00
mediabot-pt
3c62c7d0c1 fix: 站点保存后检查response.code避免假成功 2026-07-05 22:24:49 +08:00
mediabot-pt
47df057ded fix: 站点编辑PUT路径/admin/sites→/sites 2026-07-05 22:20:24 +08:00
mediabot-pt
41dfd04203 fix: api.raw加put+delete方法 2026-07-05 22:01:08 +08:00
mediabot-pt
e64623fbc3 fix: el-card__body overflow visible 2026-07-05 21:33:28 +08:00
mediabot-pt
42f4e5a3f8 fix: 去掉重复const refresh声明 2026-07-05 21:29:43 +08:00