feat(providers): add multi-select batch delete for provider models

Let admins select one or more models in a provider's model list and
delete them together, using the existing single-model delete API and
the same confirm-danger pattern as global model batch delete.
This commit is contained in:
Kayphoon
2026-09-14 08:03:59 +00:00
parent 60b89cc840
commit dfe88e34e7
5 changed files with 437 additions and 19 deletions
+3
View File
@@ -2978,6 +2978,9 @@ const legacyDynamicPatterns: Array<[RegExp, (match: RegExpMatchArray) => string]
[/^(.+) 个用户$/u, match => `${match[1]} users`],
[/^有 (.+) 条格式错误$/u, match => `${match[1]} format errors`],
[/^还有 (.+) 条错误未显示$/u, match => `${match[1]} more errors hidden`],
[/^确定删除选中的 (\d+) 个模型吗?\n\n此操作不可撤销。$/u, match => `Delete the selected ${match[1]} ${match[1] === '1' ? 'model' : 'models'}?\n\nThis cannot be undone.`],
[/^成功删除 (\d+) 个模型$/u, match => `Deleted ${match[1]} ${match[1] === '1' ? 'model' : 'models'}`],
[/^(\d+) 个模型删除失败$/u, match => `Failed to delete ${match[1]} ${match[1] === '1' ? 'model' : 'models'}`],
[/^确定删除套餐「(.+)」吗?\n\n已有订单或权益的套餐不能删除,请改为停用。删除后无法恢复。$/u, match => `Delete plan "${match[1]}"?\n\nPlans with existing orders or entitlements cannot be deleted. Disable it instead. This cannot be undone.`],
[/^确定要删除映射 "(.+)" 吗?\n\n注意:这只会删除映射记录,不会删除 Google 上的实际文件。$/u, match => `Delete mapping "${match[1]}"?\n\nThis only deletes the mapping record and will not delete the actual file on Google.`],
[/^确认删除批次「(.+)」吗?删除后无法恢复。$/u, match => `Delete batch "${match[1]}"? This cannot be undone.`],