refactor(admin): remove download config settings page and chain

- Drop the download config menu entry, route and schema from the settings SPA
- Remove the PHP schema section, the server-side alias validation and the
  reserved-alias list that only served that section
- Unregister aksrt_download_config from standalone import/export keys
- Drop the contract tests that locked the removed page; the Download.php
  runtime contracts stay untouched
This commit is contained in:
2026-09-24 18:29:38 +08:00
parent 66f8bb933d
commit 1c1d3f17b7
6 changed files with 0 additions and 143 deletions
@@ -47,15 +47,5 @@ export const permissionsSection = {
canonicalDomain: 'permissions',
section: 'attachment',
}),
schemaPage({
key: 'permissions-download',
name: 'PermissionsDownload',
label: '下载配置',
route: '/permissions/download',
title: '下载配置',
desc: '下载链接别名、默认使用次数与有效期限规则。',
canonicalDomain: 'permissions',
section: 'download',
}),
],
}
@@ -338,41 +338,4 @@ export const permissionsSchemas = {
],
},
/**
* Download link configuration
*/
download: {
key: 'permissions.download',
title: '下载配置',
icon: 'fa fas fa-download',
description: '下载总开关与链接别名、默认使用次数、有效期限规则。',
defaults: {
enabled: true,
url_alias: 'download',
default_max_uses: 1,
ttl_minutes: 10,
},
groups: [
{
key: 'basic',
title: '下载总开关',
icon: 'fa fas fa-power-off',
fields: [
{ key: 'enabled', label: '启用本站下载链接', type: 'switch', help: '总开关:开启后下载通过本站中转链接;关闭后下载按钮直接使用原始下载地址(直连),下方链接规则全部不生效,旧的中转链接同步失效。' },
],
},
{
key: 'rules',
title: '链接规则',
icon: 'fa fas fa-link',
description: '文件完整送达才计次(HEAD 探测、传输中断不计次);到期或耗尽后访问旧地址返回 410,需重新获取,不会自动续签。',
fields: [
{ key: 'url_alias', label: '下载链接 URL 别名', type: 'input', placeholder: 'download', required: true, dependsOn: { key: 'enabled', value: true }, help: '仅允许英文字母、数字、连字符和下划线;禁止中文、空格和 / \\ ? # & 等特殊符号。修改后旧别名路由立即失效。' },
{ key: 'default_max_uses', label: '下载链接默认使用次数', type: 'number', min: 1, max: 100, dependsOn: { key: 'enabled', value: true }, help: '单个链接可完成下载的次数;耗尽后链接返回 410,需重新获取。' },
{ key: 'ttl_minutes', label: '下载链接默认有效期限(分钟)', type: 'number', min: 1, max: 1440, dependsOn: { key: 'enabled', value: true }, help: '链接签发后超过该时长即失效并返回 410,不自动续期。' },
],
},
],
},
};