Lint all files

This commit is contained in:
jeffvli 2023-07-01 19:10:05 -07:00
parent 22af76b4d6
commit 30e52ebb54
334 changed files with 76519 additions and 75932 deletions

View file

@ -6,39 +6,39 @@ import { useHotkeySettings, useSettingsStoreActions } from '/@/renderer/store';
const localSettings = isElectron() ? window.electron.localSettings : null;
export const WindowHotkeySettings = () => {
const settings = useHotkeySettings();
const { setSettings } = useSettingsStoreActions();
const settings = useHotkeySettings();
const { setSettings } = useSettingsStoreActions();
const options: SettingOption[] = [
{
control: (
<Switch
aria-label="Toggle global media hotkeys"
defaultChecked={settings.globalMediaHotkeys}
disabled={!isElectron()}
onChange={(e) => {
setSettings({
hotkeys: {
...settings,
globalMediaHotkeys: e.currentTarget.checked,
},
});
localSettings.set('global_media_hotkeys', e.currentTarget.checked);
const options: SettingOption[] = [
{
control: (
<Switch
aria-label="Toggle global media hotkeys"
defaultChecked={settings.globalMediaHotkeys}
disabled={!isElectron()}
onChange={(e) => {
setSettings({
hotkeys: {
...settings,
globalMediaHotkeys: e.currentTarget.checked,
},
});
localSettings.set('global_media_hotkeys', e.currentTarget.checked);
if (e.currentTarget.checked) {
localSettings.enableMediaKeys();
} else {
localSettings.disableMediaKeys();
}
}}
/>
),
description:
'Enable or disable the usage of your system media hotkeys to control the audio player',
isHidden: !isElectron(),
title: 'Global media hotkeys',
},
];
if (e.currentTarget.checked) {
localSettings.enableMediaKeys();
} else {
localSettings.disableMediaKeys();
}
}}
/>
),
description:
'Enable or disable the usage of your system media hotkeys to control the audio player',
isHidden: !isElectron(),
title: 'Global media hotkeys',
},
];
return <SettingsSection options={options} />;
return <SettingsSection options={options} />;
};