MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / setTerminalTheme

Function setTerminalTheme

src/pages/themeSetting/themeSetting.js:206–230  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

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");

Callers

nothing calls this directly

Calls 3

updateActiveTerminalsFunction · 0.90
alertFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected