mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 22:45:41 +00:00
feat(eq): remember EQ profile per audio output device (#1146)
* feat(eq): add per-device EQ snapshot state to eqStore * feat(eq): wire per-device EQ sync into audio listener setup * feat(settings): add 'remember EQ per device' toggle to audio output section * i18n(settings): add 'remember EQ per device' strings (10 locales) * test(eq): cover per-device EQ snapshot store + device sync orchestration * docs(changelog): per-device EQ entry, credit and what's new (#1146) * i18n(settings): note per-device EQ scope (system default + explicit switch) in toggle description * test(eq): cover system-default bucket and device-reset (null) path
This commit is contained in:
@@ -5,7 +5,9 @@ import type { TFunction } from 'i18next';
|
||||
import CustomSelect from '../../CustomSelect';
|
||||
import SettingsSubSection from '../../SettingsSubSection';
|
||||
import { SettingsGroup } from '../SettingsGroup';
|
||||
import { SettingsToggle } from '../SettingsToggle';
|
||||
import { useAuthStore } from '../../../store/authStore';
|
||||
import { useEqStore } from '../../../store/eqStore';
|
||||
import { buildAudioDeviceSelectOptions } from '../../../utils/audio/audioDeviceLabels';
|
||||
|
||||
interface Props {
|
||||
@@ -37,6 +39,8 @@ export function AudioOutputDeviceSection({
|
||||
}: Props) {
|
||||
const audioOutputDevice = useAuthStore(s => s.audioOutputDevice);
|
||||
const setAudioOutputDevice = useAuthStore(s => s.setAudioOutputDevice);
|
||||
const rememberEqPerDevice = useEqStore(s => s.rememberPerDevice);
|
||||
const setRememberEqPerDevice = useEqStore(s => s.setRememberPerDevice);
|
||||
|
||||
return (
|
||||
<SettingsSubSection
|
||||
@@ -81,6 +85,15 @@ export function AudioOutputDeviceSection({
|
||||
</button>
|
||||
</div>
|
||||
</SettingsGroup>
|
||||
<SettingsGroup>
|
||||
<SettingsToggle
|
||||
label={t('settings.audioOutputDeviceRememberEq')}
|
||||
desc={t('settings.audioOutputDeviceRememberEqDesc')}
|
||||
checked={rememberEqPerDevice}
|
||||
onChange={setRememberEqPerDevice}
|
||||
searchText={t('settings.audioOutputDeviceRememberEq')}
|
||||
/>
|
||||
</SettingsGroup>
|
||||
</div>
|
||||
</SettingsSubSection>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user