Files
SubMiner/src/settings/settings-field-layout.ts
T
sudacode 2b13c82d69 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
2026-05-20 01:43:20 -07:00

16 lines
385 B
TypeScript

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',
},
];
}