From 4ccaa97ac3d0d194ef72e09705bded1ea532c843 Mon Sep 17 00:00:00 2001 From: Mats Date: Thu, 22 Aug 2024 18:48:01 +0200 Subject: [PATCH] fix lint post million --- client/public/metadata.json | 2 +- client/src/components/voice/VoiceSettings.jsx | 227 ------------------ client/src/metadata.json | 2 +- client/vite.config.js | 24 +- 4 files changed, 14 insertions(+), 241 deletions(-) delete mode 100644 client/src/components/voice/VoiceSettings.jsx diff --git a/client/public/metadata.json b/client/public/metadata.json index 2acf557c7..d5674ca3d 100644 --- a/client/public/metadata.json +++ b/client/public/metadata.json @@ -1 +1 @@ -{"buildMajor":1,"buildMinor":125,"buildRevision":266,"buildTag":"dev","buildDate":"Fri Aug 02 2024","build":"1.125.266 dev"} \ No newline at end of file +{"buildMajor":1,"buildMinor":125,"buildRevision":267,"buildTag":"dev","buildDate":"Thu Aug 22 2024","build":"1.125.267 dev"} \ No newline at end of file diff --git a/client/src/components/voice/VoiceSettings.jsx b/client/src/components/voice/VoiceSettings.jsx deleted file mode 100644 index 266ef7175..000000000 --- a/client/src/components/voice/VoiceSettings.jsx +++ /dev/null @@ -1,227 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import AdvancedVoiceSettings from './AdvancedVoiceSettings'; -import { setGlobalState } from '../../state/store'; -import { reRenderAllGainNodes } from '../../client/services/voice/VoiceModule'; -import { Tooltip } from '../tooltip/tooltip'; -import ExtraVoiceSettings from './ExtraVoiceSettings'; -import { msg } from '../../client/OpenAudioAppContainer'; -import { PipVector } from '../dpip/PipVector'; -import { VoiceMicButtonContent } from '../icons/VoiceMic'; -import { VoiceDeafenButtonContent } from '../icons/VoicechatDeafenButton'; - -class VoiceSettings extends React.Component { - constructor(props) { - super(props); - - this.state = { - advancedSettings: false, - }; - - this.onVolumeChange = this.onVolumeChange.bind(this); - this.toggleAdvancedSettings = this.toggleAdvancedSettings.bind(this); - this.toggleMicMute = this.toggleMicMute.bind(this); - this.togglePiP = this.togglePiP.bind(this); - this.toggleDeafen = this.toggleDeafen.bind(this); - } - - onVolumeChange(e) { - setGlobalState({ settings: { voicechatVolume: e.target.value } }); - reRenderAllGainNodes(); - - // were we deafened? then we need to unmute - if (this.props.voicechatDeafened) { - this.toggleDeafen(); - } - } - - togglePiP() { - setGlobalState({ settings: { voicePiPEnabled: !this.props.voicePiPEnabled } }); - } - - toggleAdvancedSettings() { - this.setState({ advancedSettings: !this.state.advancedSettings }); - } - - toggleMicMute() { - const muted = !this.props.voicechatMuted; - setGlobalState({ settings: { voicechatMuted: muted } }); - } - - toggleDeafen() { - const deafened = !this.props.voicechatDeafened; - setGlobalState({ settings: { voicechatDeafened: deafened }, voiceState: { deafenedBefore: true } }); - } - - render() { - // are we moderating? then only show that banner - if (this.props.voiceState.isModerating) { - return ( -
-
-
-
-
-

- {msg('vc.youAreModerating')} -

-
-
-
-
-
- ); - } - - let micButton = ; - if (this.props.voicechatMuted) { - micButton = ; - } - - let deafenButton = ; - if (this.props.voicechatDeafened) { - deafenButton = ; - } - - // check if documentPictureInPicture is supported - const isPipSupported = document.pictureInPictureEnabled; - - const pipEnabled = this.props.voicePiPEnabled; - const togglePipButton = ( - - ); - - let uuid; - if (this.props.currentUser && this.props.currentUser.uuid) { - uuid = this.props.currentUser.uuid; - } else { - // setup placeholder - uuid = '00000000-0000-0000-0000-000000000000'; - } - - return ( -
-
-
-
- - Speaking indictor - {msg('vc.myStatus')} - -
-
- {isPipSupported ? togglePipButton : null} - - {/* show the mic as disabled if we are server muted */} -
- {micButton} -
- - {deafenButton} - - - - -
-
- - {this.props.voicechatDeafened ? ( -
-
- - - - {msg('vc.deafened')} -
-
- ) : null} - -
-
-
- - - - - - - -
-
-
-
- -
- - - -
-
- {this.state.advancedSettings ?
: null} -
-
- ); - } -} - -export default connect(mapStateToProps)(VoiceSettings); - -function mapStateToProps(state) { - return { - voicechatMuted: state.settings.voicechatMuted, - voicechatDeafened: state.settings.voicechatDeafened, - voicechatVolume: state.settings.voicechatVolume, - voicePiPEnabled: state.settings.voicePiPEnabled, - voiceState: state.voiceState, - currentUser: state.currentUser, - }; -} diff --git a/client/src/metadata.json b/client/src/metadata.json index 2acf557c7..d5674ca3d 100644 --- a/client/src/metadata.json +++ b/client/src/metadata.json @@ -1 +1 @@ -{"buildMajor":1,"buildMinor":125,"buildRevision":266,"buildTag":"dev","buildDate":"Fri Aug 02 2024","build":"1.125.266 dev"} \ No newline at end of file +{"buildMajor":1,"buildMinor":125,"buildRevision":267,"buildTag":"dev","buildDate":"Thu Aug 22 2024","build":"1.125.267 dev"} \ No newline at end of file diff --git a/client/vite.config.js b/client/vite.config.js index 500af5f9b..0d7b6869a 100644 --- a/client/vite.config.js +++ b/client/vite.config.js @@ -17,28 +17,28 @@ Array.prototype.some = function someMatchUtil(fun) { } return false; }; -const _plugins = [svgr({ +const millionPlugins = [svgr({ svgrOptions: { - ref: true - } + ref: true, + }, }), { name: 'singleHMR', handleHotUpdate({ - modules + modules, }) { return modules; - } + }, }, react({ - include: '**/*.jsx' + include: '**/*.jsx', }), eslint()]; -_plugins.unshift(MillionLint.vite()) +millionPlugins.unshift(MillionLint.vite()); export default defineConfig({ - plugins: _plugins, + plugins: millionPlugins, server: { port: 3000, - host: true + host: true, }, build: { - outDir: './build' - } -}); \ No newline at end of file + outDir: './build', + }, +});