* Legacy fallback that mimics SettingGroup API for Obsidian < 1.11.0 * Uses the old pattern of section headers and individual settings
| 79 | * Uses the old pattern of section headers and individual settings |
| 80 | */ |
| 81 | class LegacySettingGroup { |
| 82 | private containerEl: HTMLElement; |
| 83 | |
| 84 | constructor(containerEl: HTMLElement) { |
| 85 | this.containerEl = containerEl; |
| 86 | } |
| 87 | |
| 88 | setHeading(text: string | DocumentFragment): this { |
| 89 | new Setting(this.containerEl).setName(text).setHeading(); |
| 90 | return this; |
| 91 | } |
| 92 | |
| 93 | addClass(_cls: string): this { |
| 94 | // No-op for legacy - classes were not applied to groups |
| 95 | return this; |
| 96 | } |
| 97 | |
| 98 | addSetting(cb: (setting: Setting) => void): this { |
| 99 | const setting = new Setting(this.containerEl); |
| 100 | cb(setting); |
| 101 | return this; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | interface SettingGroupLike { |
| 106 | setHeading(text: string | DocumentFragment): this; |
nothing calls this directly
no outgoing calls
no test coverage detected