mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 12:55:20 -07:00
2b13c82d69
- 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
16 lines
385 B
TypeScript
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',
|
|
},
|
|
];
|
|
}
|