Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setDarkMode(): void {
if (is.macos && config.get('followSystemAppearance')) {
api.nativeTheme.themeSource = 'system';
} else {
api.nativeTheme.themeSource = config.get('darkMode') ? 'dark' : 'light';
}
document.documentElement.classList.toggle('dark-mode', api.nativeTheme.shouldUseDarkColors);
updateVibrancy();
}
function setDarkMode(): void {
if (is.macos && config.get('followSystemAppearance')) {
api.nativeTheme.themeSource = 'system';
} else {
api.nativeTheme.themeSource = config.get('darkMode') ? 'dark' : 'light';
}
document.documentElement.classList.toggle('dark-mode', api.nativeTheme.shouldUseDarkColors);
updateVibrancy();
}