refactor: 完善版 P-2 前端分包与 P-3 揭示 userKey 加固

- admin vite 配置 manualChunks 拆分 naive/echarts/vendor,index chunk 从 1652KB 降到 69KB
- 揭示 userKey 改为 POST 接口(写操作日志、防缓存)+ 前端二次确认,GET 仅返回掩码
- 更新问题清单待完善项状态与项目记忆
This commit is contained in:
Nixevol
2026-07-09 20:21:05 +08:00
parent ad193d1777
commit ec8789ccd9
9 changed files with 79 additions and 17 deletions
@@ -127,6 +127,11 @@ export class SettingsService {
return `${value.slice(0, 3)}******${value.slice(-3)}`;
}
// 对外暴露的掩码工具(供控制器展示 userKey 掩码,不返回明文)
maskSecretPublic(value: string): string {
return this.maskSecret(value);
}
isMaskedSecret(value?: string | null): boolean {
return typeof value === 'string' && /^\*+$|^.{1,8}\*{3,}.{1,8}$/.test(value);
}