feat: statuses and ticket types take any colour from a colour picker
Settings shows a native colour picker (the palette as suggestions) instead of the list of eleven names. The API takes a palette name, as before, or any #rrggbb; picking a palette colour still saves its name, so it keeps its hand-made dark version. A free colour gets one variant per theme, computed with the `color` library (moved towards white or black until it contrasts 3:1 with the surface) and applied with light-dark(): a pale yellow darkens on white, a navy lightens on dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
ProjectRole,
|
||||
ReleaseStatus,
|
||||
SprintStatus,
|
||||
SETTING_COLORS,
|
||||
StatusCategory,
|
||||
TYPE_ICONS,
|
||||
} from '@task-stream/api/tracker/domain';
|
||||
@@ -34,7 +33,10 @@ export class WorkflowStatusDto {
|
||||
@ApiProperty({ example: 'En revisión' }) name!: string;
|
||||
@ApiProperty({ enum: StatusCategory, enumName: 'StatusCategory' })
|
||||
category!: StatusCategory;
|
||||
@ApiProperty({ enum: SETTING_COLORS, enumName: 'SettingColor' })
|
||||
@ApiProperty({
|
||||
description: 'A palette colour (follows the theme) or #rrggbb',
|
||||
example: 'violet',
|
||||
})
|
||||
color!: string;
|
||||
@ApiProperty({ description: 'Entering it needs a reason' })
|
||||
requiresReason!: boolean;
|
||||
@@ -63,7 +65,10 @@ export class IssueTypeOptionDto {
|
||||
@ApiProperty({ example: 'BUG' }) id!: string;
|
||||
@ApiProperty({ example: 'Bug' }) name!: string;
|
||||
@ApiProperty({ enum: TYPE_ICONS, enumName: 'TypeIcon' }) icon!: string;
|
||||
@ApiProperty({ enum: SETTING_COLORS, enumName: 'SettingColor' })
|
||||
@ApiProperty({
|
||||
description: 'A palette colour (follows the theme) or #rrggbb',
|
||||
example: 'violet',
|
||||
})
|
||||
color!: string;
|
||||
@ApiProperty() archived!: boolean;
|
||||
@ApiPropertyOptional({
|
||||
|
||||
Reference in New Issue
Block a user