()
| 184 | } |
| 185 | |
| 186 | display(): void { |
| 187 | const { containerEl } = this; |
| 188 | containerEl.empty(); |
| 189 | |
| 190 | new Setting(containerEl) |
| 191 | .setHeading() |
| 192 | .setName(t('SETTINGS_HEADING')); |
| 193 | |
| 194 | new Setting(containerEl) |
| 195 | .setName(t('SETTINGS_EXTENSIONS_NAME')) |
| 196 | .setDesc(t('SETTINGS_EXTENSIONS_DESC')) |
| 197 | .addTextArea((text) => { |
| 198 | text |
| 199 | .setPlaceholder(t('SETTINGS_EXTENSIONS_PLACEHOLDER')) |
| 200 | .setValue(this.plugin.settings.extensions) |
| 201 | .onChange(async (value) => { |
| 202 | this.plugin.settings.extensions = value; |
| 203 | await this.plugin.saveSettings(); |
| 204 | }); |
| 205 | // Make the textarea larger by default |
| 206 | text.inputEl.rows = 6; |
| 207 | }); |
| 208 | |
| 209 | new Setting(containerEl) |
| 210 | .setName(t('SETTINGS_LINE_NUMBERS_NAME')) |
| 211 | .setDesc(t('SETTINGS_LINE_NUMBERS_DESC')) |
| 212 | .addToggle((toggle) => |
| 213 | toggle |
| 214 | .setValue(this.plugin.settings.showLineNumbers) |
| 215 | .onChange(async (value) => { |
| 216 | this.plugin.settings.showLineNumbers = value; |
| 217 | await this.plugin.saveSettings(); |
| 218 | }) |
| 219 | ); |
| 220 | |
| 221 | new Setting(containerEl) |
| 222 | .setName(t('SETTINGS_EDITOR_FONT_SIZE_NAME')) |
| 223 | .setDesc(t('SETTINGS_EDITOR_FONT_SIZE_DESC')) |
| 224 | .addText((text) => |
| 225 | text |
| 226 | .setPlaceholder("16") |
| 227 | .setValue(String(this.plugin.settings.editorFontSize)) |
| 228 | .onChange(async (value) => { |
| 229 | const num = parseInt(value); |
| 230 | if (!isNaN(num) && num >= 9 && num <= 36) { |
| 231 | this.plugin.settings.editorFontSize = num; |
| 232 | await this.plugin.saveSettings(); |
| 233 | } |
| 234 | }) |
| 235 | ); |
| 236 | |
| 237 | new Setting(containerEl) |
| 238 | .setName(t('SETTINGS_EMBED_FONT_SIZE_NAME')) |
| 239 | .setDesc(t('SETTINGS_EMBED_FONT_SIZE_DESC')) |
| 240 | .addText((text) => |
| 241 | text |
| 242 | .setPlaceholder("13") |
| 243 | .setValue(String(this.plugin.settings.embedFontSize)) |
nothing calls this directly
no test coverage detected