699e525cb9
- Extract milestoneColor to utils/palette.ts; remove duplicate in HomeView + ProjectListView - Create useBackgroundRefresh composable; wire into HomeView + BriefingView (removes manual setInterval/clearInterval boilerplate) - Extract _loadTabContent() in SettingsView so watch and onMounted share one tab→loader mapping - Move raw fetch() api-key calls to typed helpers in api/client.ts (listApiKeys, createApiKey, revokeApiKey) - Drop unused onUnmounted import from BriefingView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
348 B
TypeScript
14 lines
348 B
TypeScript
/** Cyclic color palette for milestone progress bars. */
|
|
export const MILESTONE_PALETTE = [
|
|
'var(--color-primary)',
|
|
'var(--color-success, #22c55e)',
|
|
'#c98a00',
|
|
'#8b5cf6',
|
|
'var(--color-danger, #ef4444)',
|
|
'#06b6d4',
|
|
]
|
|
|
|
export function milestoneColor(index: number): string {
|
|
return MILESTONE_PALETTE[index % MILESTONE_PALETTE.length]
|
|
}
|