feat(版本): 优化概览与只读状态
关键改动: - 增加需求排序和版本只读状态规则及测试 - 完善版本概览阶段耗时、项目页和工作台展示 - 优化小宝预警请求节流、建议状态和风险过滤 Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
export type VersionStatus = 'developing' | 'planned' | 'released' | 'paused' | 'closed';
|
||||
|
||||
const READONLY_VERSION_STATUSES = new Set<VersionStatus>(['released', 'closed', 'paused']);
|
||||
|
||||
export function isVersionReadonly(status: VersionStatus): boolean {
|
||||
return READONLY_VERSION_STATUSES.has(status);
|
||||
}
|
||||
|
||||
export const VERSION_STATUS_LABEL: Record<VersionStatus, string> = {
|
||||
developing: '进行中',
|
||||
planned: '规划中',
|
||||
@@ -8,6 +14,11 @@ export const VERSION_STATUS_LABEL: Record<VersionStatus, string> = {
|
||||
closed: '已关闭',
|
||||
};
|
||||
|
||||
export function getVersionReadonlyNotice(status: VersionStatus): string | null {
|
||||
if (!isVersionReadonly(status)) return null;
|
||||
return `${VERSION_STATUS_LABEL[status]}版本不可编辑或删除任务`;
|
||||
}
|
||||
|
||||
export const VERSION_STATUS_DOT: Record<VersionStatus, string> = {
|
||||
developing: 'bg-blue-500',
|
||||
planned: 'bg-orange-500',
|
||||
|
||||
Reference in New Issue
Block a user