(name)
| 204 | } |
| 205 | |
| 206 | function setTerminalTheme(name) { |
| 207 | if (appSettings.value.appTheme?.toLowerCase() === "system") { |
| 208 | alert( |
| 209 | strings.info, |
| 210 | "Terminal theme cannot be changed while the app theme is set to 'System'.", |
| 211 | ); |
| 212 | return; |
| 213 | } |
| 214 | |
| 215 | const currentSettings = appSettings.value.terminalSettings || {}; |
| 216 | appSettings.update({ |
| 217 | terminalSettings: { |
| 218 | ...currentSettings, |
| 219 | theme: name, |
| 220 | }, |
| 221 | }); |
| 222 | if (editorManager != null) { |
| 223 | updateActiveTerminals("theme", name); |
| 224 | } |
| 225 | if ($themePreview.parentElement) { |
| 226 | createTerminalPreview(name); |
| 227 | } |
| 228 | const label = name.charAt(0).toUpperCase() + name.slice(1); |
| 229 | updateCheckedItem(label); |
| 230 | } |
| 231 | |
| 232 | function createTerminalPreview(themeName) { |
| 233 | destroyPreview("create"); |
nothing calls this directly
no test coverage detected