mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 12:55:20 -07:00
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:
@@ -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',
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user