fix insanity

This commit is contained in:
nin0dev 2024-12-25 16:36:12 -05:00
parent 567b0b000b
commit 2c232ba04d
Signed by: nin0
SSH key fingerprint: SHA256:Is2DvJdw1OkSopR4wKJfdWV0fZhMLxpnCs1P1nPhIgA

View file

@ -21,8 +21,8 @@ function OutputVolumeComponent() {
return ( return (
<> <>
{Settings.plugins.VCSettings.showOutputVolumeHeader && <Forms.FormTitle>Output volume - {Math.floor(outputVolume)}%</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showOutputVolumeHeader && <Forms.FormTitle>Output volume - {Math.floor(outputVolume)}%</Forms.FormTitle>}
<Slider maxValue={200} minValue={0} initialValue={outputVolume} hideBubble={Settings.plugins.VCSettings.showOutputVolumeHeader} onValueChange={(volume) => { <Slider maxValue={200} minValue={0} initialValue={outputVolume} hideBubble={Settings.plugins.VCPanelSettings.showOutputVolumeHeader} onValueChange={(volume) => {
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({
type: "AUDIO_SET_OUTPUT_VOLUME", type: "AUDIO_SET_OUTPUT_VOLUME",
volume volume
@ -42,7 +42,7 @@ function InputVolumeComponent() {
return ( return (
<> <>
{Settings.plugins.VCSettings.showInputVolumeHeader && <Forms.FormTitle>Input volume - {Math.floor(inputVolume)}%</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showInputVolumeHeader && <Forms.FormTitle>Input volume - {Math.floor(inputVolume)}%</Forms.FormTitle>}
<Slider maxValue={100} minValue={0} initialValue={inputVolume} onValueChange={(volume) => { <Slider maxValue={100} minValue={0} initialValue={inputVolume} onValueChange={(volume) => {
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({
type: "AUDIO_SET_INPUT_VOLUME", type: "AUDIO_SET_INPUT_VOLUME",
@ -63,9 +63,9 @@ function OutputDeviceComponent() {
return ( return (
<> <>
{Settings.plugins.VCSettings.showOutputDeviceHeader && <Forms.FormTitle>Output device</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showOutputDeviceHeader && <Forms.FormTitle>Output device</Forms.FormTitle>}
<Select options={Object.values(audioConfigModule.getOutputDevices()).map((device: any /*i am NOT typing this*/) => { <Select options={Object.values(audioConfigModule.getOutputDevices()).map((device: any /*i am NOT typing this*/) => {
return { value: device.id, label: Settings.plugins.VCSettings.showOutputDeviceHeader ? device.name : `🔊 ${device.name}` }; return { value: device.id, label: Settings.plugins.VCPanelSettings.showOutputDeviceHeader ? device.name : `🔊 ${device.name}` };
})} })}
serialize={identity} serialize={identity}
isSelected={(value) => value === outputDevice} isSelected={(value) => value === outputDevice}
@ -91,9 +91,9 @@ function InputDeviceComponent() {
return ( return (
<div style={{ marginTop: "10px" }}> <div style={{ marginTop: "10px" }}>
{Settings.plugins.VCSettings.showInputDeviceHeader && <Forms.FormTitle>Input device</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showInputDeviceHeader && <Forms.FormTitle>Input device</Forms.FormTitle>}
<Select options={Object.values(audioConfigModule.getInputDevices()).map((device: any /*i am NOT typing this*/) => { <Select options={Object.values(audioConfigModule.getInputDevices()).map((device: any /*i am NOT typing this*/) => {
return { value: device.id, label: Settings.plugins.VCSettings.showInputDeviceHeader ? device.name : `🎤 ${device.name}` }; return { value: device.id, label: Settings.plugins.VCPanelSettings.showInputDeviceHeader ? device.name : `🎤 ${device.name}` };
})} })}
serialize={identity} serialize={identity}
isSelected={(value) => value === inputDevice} isSelected={(value) => value === inputDevice}
@ -110,11 +110,11 @@ function InputDeviceComponent() {
} }
function VoiceSettings() { function VoiceSettings() {
return <div style={{ marginTop: "10px" }}> return <div style={{ marginTop: "20px" }}>
{Settings.plugins.VCSettings.outputVolume && <OutputVolumeComponent />} {Settings.plugins.VCPanelSettings.outputVolume && <OutputVolumeComponent />}
{Settings.plugins.VCSettings.inputVolume && <InputVolumeComponent />} {Settings.plugins.VCPanelSettings.inputVolume && <InputVolumeComponent />}
{Settings.plugins.VCSettings.outputDevice && <OutputDeviceComponent />} {Settings.plugins.VCPanelSettings.outputDevice && <OutputDeviceComponent />}
{Settings.plugins.VCSettings.inputDevice && <InputDeviceComponent />} {Settings.plugins.VCPanelSettings.inputDevice && <InputDeviceComponent />}
</div>; </div>;
} }