Skip to content

Commit

Permalink
refactor: Moved shared constants into 'constants' folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
KvelaGorrrrnio committed Feb 25, 2022
1 parent 110ecfb commit 2b807a8
Show file tree
Hide file tree
Showing 61 changed files with 1,954 additions and 48 deletions.
4 changes: 2 additions & 2 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import {
SOCKET_SET_AUX_LEVEL,
SOCKET_SET_INPUT_GAIN,
SOCKET_SET_INPUT_SELECTOR,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import ReductionMeter from './ReductionMeter'
import ClassNames from 'classnames'
import { fxParamsList } from '../../shared/MixerProtocolInterface'
import { fxParamsList } from '../../shared/constants/MixerProtocolInterface'
import { getFaderLabel } from '../utils/labels'

interface IChanStripInjectProps {
Expand Down
4 changes: 2 additions & 2 deletions client/components/ChanStripEq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Store } from 'redux'
import { connect } from 'react-redux'
import { IFader } from '../../shared/faders-types'
import { IChannel } from '../../shared/channel-types'
import { SOCKET_SET_FX } from '../../shared/SOCKET_IO_DISPATCHERS'
import { fxParamsList } from '../../shared/MixerProtocolInterface'
import { SOCKET_SET_FX } from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { fxParamsList } from '../../shared/constants/MixerProtocolInterface'
import { getFaderLabel } from '../utils/labels'

interface IChanStripFullInjectProps {
Expand Down
4 changes: 2 additions & 2 deletions client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import {
SOCKET_SET_AUX_LEVEL,
SOCKET_SET_INPUT_GAIN,
SOCKET_SET_INPUT_SELECTOR,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import ReductionMeter from './ReductionMeter'
import ClassNames from 'classnames'
import { fxParamsList } from '../../shared/MixerProtocolInterface'
import { fxParamsList } from '../../shared/constants/MixerProtocolInterface'
import { IChannel } from '../../shared/channel-types'
import { getFaderLabel } from '../utils/labels'
import ChanStripEq from './ChanStripEq'
Expand Down
4 changes: 2 additions & 2 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import '../assets/css/NoUiSlider.css'

//assets:
import '../assets/css/Channel.css'
import * as IO from '../../shared/SOCKET_IO_DISPATCHERS'
import * as IO from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { IChannelReference, IFader } from '../../shared/faders-types'
import { ISettings } from '../../shared/settings-types'
import { storeShowChanStrip } from '../../shared/actions/settingsActions'
import { withTranslation } from 'react-i18next'
import { VuLabelConversionType } from '../../shared/MixerProtocolInterface'
import { VuLabelConversionType } from '../../shared/constants/MixerProtocolInterface'
import { Conversions } from '../../shared/actions/utils/dbConversion'
import { getFaderLabel } from '../utils/labels'

Expand Down
2 changes: 1 addition & 1 deletion client/components/ChannelMonitorOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
SOCKET_SET_AUX_LEVEL,
SOCKET_SET_FADER_MONITOR,
SOCKET_SHOW_IN_MINI_MONITOR,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { getFaderLabel } from '../utils/labels'

interface IMonitorSettingsInjectProps {
Expand Down
2 changes: 1 addition & 1 deletion client/components/ChannelRouteSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../assets/css/ChannelRouteSettings.css'
import { Store } from 'redux'
import { connect } from 'react-redux'
import { storeShowOptions } from '../../shared/actions/settingsActions'
import { SOCKET_SET_ASSIGNED_FADER } from '../../shared/SOCKET_IO_DISPATCHERS'
import { SOCKET_SET_ASSIGNED_FADER } from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { IchMixerConnection } from '../../shared/channel-types'
import { IFader } from '../../shared/faders-types'
import { getFaderLabel } from '../utils/labels'
Expand Down
2 changes: 1 addition & 1 deletion client/components/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
SOCKET_CLEAR_PST,
SOCKET_RESTART_SERVER,
SOCKET_TOGGLE_ALL_MANUAL,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import ChanStripFull from './ChanStripFull'

interface IChannelsInjectProps {
Expand Down
2 changes: 1 addition & 1 deletion client/components/Labels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IFader } from '../../shared/faders-types'
import {
SOCKET_FLUSH_LABELS,
SOCKET_SET_LABELS,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { ICustomPages } from '../../shared/settings-types'
import { getChannelLabel } from '../utils/labels'
import { flushExtLabels, updateLabels } from '../../shared/actions/faderActions'
Expand Down
2 changes: 1 addition & 1 deletion client/components/MicTally.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getFaderLabel } from '../utils/labels'
import {
SOCKET_TOGGLE_PGM,
SOCKET_TOGGLE_VO,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'


interface IMicTallyInjectProps {
Expand Down
2 changes: 1 addition & 1 deletion client/components/MiniChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../assets/css/MiniChanStrip.css'
import { Store } from 'redux'
import { connect } from 'react-redux'
import { IFader } from '../../shared/faders-types'
import { SOCKET_SET_AUX_LEVEL } from '../../shared/SOCKET_IO_DISPATCHERS'
import { SOCKET_SET_AUX_LEVEL } from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { getFaderLabel } from '../utils/labels'

interface IChanStripInjectProps {
Expand Down
2 changes: 1 addition & 1 deletion client/components/PagesSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Select from 'react-select'
import {
SOCKET_GET_PAGES_LIST,
SOCKET_SET_PAGES_LIST,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { ICustomPages } from '../../shared/settings-types'
import { getFaderLabel } from '../utils/labels'

Expand Down
2 changes: 1 addition & 1 deletion client/components/RoutingStorage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
SOCKET_SAVE_CCG_FILE,
SOCKET_GET_MIXER_PRESET_LIST,
SOCKET_LOAD_MIXER_PRESET,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'

interface IStorageProps {
load: any
Expand Down
2 changes: 1 addition & 1 deletion client/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../assets/css/Settings.css'
import { ISettings } from '../../shared/settings-types'
import { Store } from 'redux'
import { ChangeEvent } from 'react'
import { SOCKET_SAVE_SETTINGS } from '../../shared/SOCKET_IO_DISPATCHERS'
import { SOCKET_SAVE_SETTINGS } from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import { storeShowSettings } from '../../shared/actions/settingsActions'

//Set style for Select dropdown component:
Expand Down
4 changes: 2 additions & 2 deletions client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {
SOCKET_GET_CCG_LIST,
SOCKET_GET_MIXER_PRESET_LIST,
SOCKET_GET_PAGES_LIST,
} from '../shared/SOCKET_IO_DISPATCHERS'
} from '../shared/constants/SOCKET_IO_DISPATCHERS'

import { I18nextProvider } from 'react-i18next'
import i18n from './i18n'
import { IMixerProtocol } from '../shared/MixerProtocolInterface'
import { IMixerProtocol } from '../shared/constants/MixerProtocolInterface'

declare global {
interface Window {
Expand Down
2 changes: 1 addition & 1 deletion client/utils/SocketClientHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
SOCKET_SET_MIXER_ONLINE,
SOCKET_RETURN_MIXER_PRESET_LIST,
SOCKET_RETURN_PAGES_LIST,
} from '../../shared/SOCKET_IO_DISPATCHERS'
} from '../../shared/constants/SOCKET_IO_DISPATCHERS'
import {
IchMixerConnection,
InumberOfChannels,
Expand Down
3 changes: 3 additions & 0 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ module.exports = {
extensions: [ '.tsx', '.ts', '.js' ]
},
target: 'web',
output: {
path: path.resolve(__dirname, '../dist'),
},
plugins: [
new HtmlWebpackPlugin({
template: './index.ejs',
Expand Down
13 changes: 13 additions & 0 deletions electron/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "electron",
"version": "0.0.0",
"main": "electron.js",
"license": "MIT",
"scripts": {
"build": "electron-build -mw"
},
"devDependencies": {
"electron": "^16.0.4",
"electron-builder": "^22.14.5"
}
}
Loading

0 comments on commit 2b807a8

Please sign in to comment.