mirror of
https://github.com/withastro/astro.git
synced 2025-04-07 23:41:43 -05:00
Clarify language for Verbose Logging setting (#9237)
This commit is contained in:
parent
4f344b8bc7
commit
5ab008da8f
2 changed files with 11 additions and 1 deletions
|
@ -25,17 +25,21 @@ const settingsRows = [
|
|||
}
|
||||
|
||||
settings.updateSetting('disablePluginNotification', evt.currentTarget.checked);
|
||||
const action = evt.currentTarget.checked ? 'enabled' : 'disabled';
|
||||
settings.log(`Plugin notification badges ${action}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Verbose logging',
|
||||
description: 'Log additional information to the console.',
|
||||
description: 'Logs dev overlay events in the browser console.',
|
||||
input: 'checkbox',
|
||||
settingKey: 'verbose',
|
||||
changeEvent: (evt: Event) => {
|
||||
if (evt.currentTarget instanceof HTMLInputElement) {
|
||||
settings.updateSetting('verbose', evt.currentTarget.checked);
|
||||
const action = evt.currentTarget.checked ? 'enabled' : 'disabled';
|
||||
settings.log(`Verbose logging ${action}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -23,10 +23,16 @@ function getSettings() {
|
|||
localStorage.setItem('astro:dev-overlay:settings', JSON.stringify(_settings));
|
||||
}
|
||||
|
||||
function log(message: string) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`%cAstro`, 'background: linear-gradient(66.77deg, #D83333 0%, #F041FF 100%); color: white; padding-inline: 4px; border-radius: 2px; font-family: monospace;', message);
|
||||
}
|
||||
|
||||
return {
|
||||
get config() {
|
||||
return _settings;
|
||||
},
|
||||
updateSetting,
|
||||
log
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue