feat(settings): move restart badge inline with option title

- Remove field-meta row (config path, advanced chip) from option rows
- Inline live/restart status badge beside each option label
- Extract getFieldTitleBadges into settings-field-layout module with tests
This commit is contained in:
2026-05-17 19:38:20 -07:00
parent db60365b0e
commit 2b13c82d69
6 changed files with 72 additions and 37 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { ConfigSettingsField } from '../types/settings';
export interface FieldTitleBadge {
className: string;
text: string;
}
export function getFieldTitleBadges(field: ConfigSettingsField): FieldTitleBadge[] {
return [
{
className: `restart-chip ${field.restartBehavior}`,
text: field.restartBehavior === 'hot-reload' ? 'Live' : 'Restart',
},
];
}