From eaed9db1e7dbef0b285eadffbf5a5d75aa7a92e0 Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Tue, 17 Jan 2017 08:44:50 -0600 Subject: [PATCH] Name folders consistently --- .../base/{fontIcons => font-icons}/Icon.js | 0 .../base/{fontIcons => font-icons}/index.js | 0 .../base/{fontIcons => font-icons}/jitsi.json | 0 react/features/base/media/reducer.js | 30 +++++++++---------- .../components/Conference.native.js | 4 +-- .../components/FilmStrip.js | 0 .../components/Thumbnail.js | 14 +++------ .../components/_.native.js | 0 .../components/index.js | 0 .../components/native/AudioMutedIndicator.js | 0 .../native/DominantSpeakerIndicator.js | 0 .../components/native/ModeratorIndicator.js | 0 .../components/native/VideoMutedIndicator.js | 0 .../components/native/index.js | 0 .../components/native/styles.js | 0 .../components/styles.js | 0 .../{filmStrip => film-strip}/index.js | 0 .../actionTypes.js | 0 .../{largeVideo => large-video}/actions.js | 4 +-- .../components/LargeVideo.js | 2 +- .../components/index.js | 0 .../components/styles.js | 0 .../{largeVideo => large-video}/index.js | 0 .../{largeVideo => large-video}/middleware.js | 2 +- .../{largeVideo => large-video}/reducer.js | 2 +- .../components/ToolbarButton.native.js | 2 +- 26 files changed, 27 insertions(+), 33 deletions(-) rename react/features/base/{fontIcons => font-icons}/Icon.js (100%) rename react/features/base/{fontIcons => font-icons}/index.js (100%) rename react/features/base/{fontIcons => font-icons}/jitsi.json (100%) rename react/features/{filmStrip => film-strip}/components/FilmStrip.js (100%) rename react/features/{filmStrip => film-strip}/components/Thumbnail.js (94%) rename react/features/{filmStrip => film-strip}/components/_.native.js (100%) rename react/features/{filmStrip => film-strip}/components/index.js (100%) rename react/features/{filmStrip => film-strip}/components/native/AudioMutedIndicator.js (100%) rename react/features/{filmStrip => film-strip}/components/native/DominantSpeakerIndicator.js (100%) rename react/features/{filmStrip => film-strip}/components/native/ModeratorIndicator.js (100%) rename react/features/{filmStrip => film-strip}/components/native/VideoMutedIndicator.js (100%) rename react/features/{filmStrip => film-strip}/components/native/index.js (100%) rename react/features/{filmStrip => film-strip}/components/native/styles.js (100%) rename react/features/{filmStrip => film-strip}/components/styles.js (100%) rename react/features/{filmStrip => film-strip}/index.js (100%) rename react/features/{largeVideo => large-video}/actionTypes.js (100%) rename react/features/{largeVideo => large-video}/actions.js (97%) rename react/features/{largeVideo => large-video}/components/LargeVideo.js (94%) rename react/features/{largeVideo => large-video}/components/index.js (100%) rename react/features/{largeVideo => large-video}/components/styles.js (100%) rename react/features/{largeVideo => large-video}/index.js (100%) rename react/features/{largeVideo => large-video}/middleware.js (95%) rename react/features/{largeVideo => large-video}/reducer.js (92%) diff --git a/react/features/base/fontIcons/Icon.js b/react/features/base/font-icons/Icon.js similarity index 100% rename from react/features/base/fontIcons/Icon.js rename to react/features/base/font-icons/Icon.js diff --git a/react/features/base/fontIcons/index.js b/react/features/base/font-icons/index.js similarity index 100% rename from react/features/base/fontIcons/index.js rename to react/features/base/font-icons/index.js diff --git a/react/features/base/fontIcons/jitsi.json b/react/features/base/font-icons/jitsi.json similarity index 100% rename from react/features/base/fontIcons/jitsi.json rename to react/features/base/font-icons/jitsi.json diff --git a/react/features/base/media/reducer.js b/react/features/base/media/reducer.js index 4b381ff06..5d0f8dd12 100644 --- a/react/features/base/media/reducer.js +++ b/react/features/base/media/reducer.js @@ -9,21 +9,6 @@ import { } from './actionTypes'; import { CAMERA_FACING_MODE } from './constants'; -/** - * Listen for various actions related to media devices. - * - * @param {Object} state - State of media devices. - * @param {Object} action - Action object. - * @param {string} action.type - Type of action. - * @param {Object} action.media - Information about media devices to be - * modified. - * @returns {Object} - */ -ReducerRegistry.register('features/base/media', combineReducers({ - audio, - video -})); - /** * Media state object for local audio. * @@ -105,3 +90,18 @@ function video(state = VIDEO_INITIAL_MEDIA_STATE, action) { return state; } } + +/** + * Listen for various actions related to media devices. + * + * @param {Object} state - State of media devices. + * @param {Object} action - Action object. + * @param {string} action.type - Type of action. + * @param {Object} action.media - Information about media devices to be + * modified. + * @returns {Object} + */ +ReducerRegistry.register('features/base/media', combineReducers({ + audio, + video +})); diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.js index ddf5401a8..b8cf519a2 100644 --- a/react/features/conference/components/Conference.native.js +++ b/react/features/conference/components/Conference.native.js @@ -3,8 +3,8 @@ import { connect as reactReduxConnect } from 'react-redux'; import { connect, disconnect } from '../../base/connection'; import { Container } from '../../base/react'; -import { FilmStrip } from '../../filmStrip'; -import { LargeVideo } from '../../largeVideo'; +import { FilmStrip } from '../../film-strip'; +import { LargeVideo } from '../../large-video'; import { RoomLockPrompt } from '../../room-lock'; import { Toolbar } from '../../toolbar'; diff --git a/react/features/filmStrip/components/FilmStrip.js b/react/features/film-strip/components/FilmStrip.js similarity index 100% rename from react/features/filmStrip/components/FilmStrip.js rename to react/features/film-strip/components/FilmStrip.js diff --git a/react/features/filmStrip/components/Thumbnail.js b/react/features/film-strip/components/Thumbnail.js similarity index 94% rename from react/features/filmStrip/components/Thumbnail.js rename to react/features/film-strip/components/Thumbnail.js index 76880d7dc..641ae4396 100644 --- a/react/features/filmStrip/components/Thumbnail.js +++ b/react/features/film-strip/components/Thumbnail.js @@ -1,14 +1,8 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { - Audio, - MEDIA_TYPE -} from '../../base/media'; -import { - PARTICIPANT_ROLE, - pinParticipant -} from '../../base/participants'; +import { Audio, MEDIA_TYPE } from '../../base/media'; +import { PARTICIPANT_ROLE, pinParticipant } from '../../base/participants'; import { Container } from '../../base/react'; import { getTrackByMediaTypeAndParticipant } from '../../base/tracks'; import { ParticipantView } from '../../conference'; @@ -148,10 +142,10 @@ class Thumbnail extends Component { * }} */ function mapStateToProps(state, ownProps) { - // We need read-only access to the state of features/largeVideo so that the + // We need read-only access to the state of features/large-video so that the // film strip doesn't render the video of the participant who is rendered on // the stage i.e. as a large video. - const largeVideo = state['features/largeVideo']; + const largeVideo = state['features/large-video']; const tracks = state['features/base/tracks']; const id = ownProps.participant.id; const audioTrack diff --git a/react/features/filmStrip/components/_.native.js b/react/features/film-strip/components/_.native.js similarity index 100% rename from react/features/filmStrip/components/_.native.js rename to react/features/film-strip/components/_.native.js diff --git a/react/features/filmStrip/components/index.js b/react/features/film-strip/components/index.js similarity index 100% rename from react/features/filmStrip/components/index.js rename to react/features/film-strip/components/index.js diff --git a/react/features/filmStrip/components/native/AudioMutedIndicator.js b/react/features/film-strip/components/native/AudioMutedIndicator.js similarity index 100% rename from react/features/filmStrip/components/native/AudioMutedIndicator.js rename to react/features/film-strip/components/native/AudioMutedIndicator.js diff --git a/react/features/filmStrip/components/native/DominantSpeakerIndicator.js b/react/features/film-strip/components/native/DominantSpeakerIndicator.js similarity index 100% rename from react/features/filmStrip/components/native/DominantSpeakerIndicator.js rename to react/features/film-strip/components/native/DominantSpeakerIndicator.js diff --git a/react/features/filmStrip/components/native/ModeratorIndicator.js b/react/features/film-strip/components/native/ModeratorIndicator.js similarity index 100% rename from react/features/filmStrip/components/native/ModeratorIndicator.js rename to react/features/film-strip/components/native/ModeratorIndicator.js diff --git a/react/features/filmStrip/components/native/VideoMutedIndicator.js b/react/features/film-strip/components/native/VideoMutedIndicator.js similarity index 100% rename from react/features/filmStrip/components/native/VideoMutedIndicator.js rename to react/features/film-strip/components/native/VideoMutedIndicator.js diff --git a/react/features/filmStrip/components/native/index.js b/react/features/film-strip/components/native/index.js similarity index 100% rename from react/features/filmStrip/components/native/index.js rename to react/features/film-strip/components/native/index.js diff --git a/react/features/filmStrip/components/native/styles.js b/react/features/film-strip/components/native/styles.js similarity index 100% rename from react/features/filmStrip/components/native/styles.js rename to react/features/film-strip/components/native/styles.js diff --git a/react/features/filmStrip/components/styles.js b/react/features/film-strip/components/styles.js similarity index 100% rename from react/features/filmStrip/components/styles.js rename to react/features/film-strip/components/styles.js diff --git a/react/features/filmStrip/index.js b/react/features/film-strip/index.js similarity index 100% rename from react/features/filmStrip/index.js rename to react/features/film-strip/index.js diff --git a/react/features/largeVideo/actionTypes.js b/react/features/large-video/actionTypes.js similarity index 100% rename from react/features/largeVideo/actionTypes.js rename to react/features/large-video/actionTypes.js diff --git a/react/features/largeVideo/actions.js b/react/features/large-video/actions.js similarity index 97% rename from react/features/largeVideo/actions.js rename to react/features/large-video/actions.js index d262c5e27..5d3d233c5 100644 --- a/react/features/largeVideo/actions.js +++ b/react/features/large-video/actions.js @@ -20,7 +20,7 @@ export function selectParticipant() { const conference = state['features/base/conference'].conference; if (conference) { - const largeVideo = state['features/largeVideo']; + const largeVideo = state['features/large-video']; const tracks = state['features/base/tracks']; const id = largeVideo.participantId; @@ -53,7 +53,7 @@ export function selectParticipantInLargeVideo() { return (dispatch, getState) => { const state = getState(); const participantId = _electParticipantInLargeVideo(state); - const largeVideo = state['features/largeVideo']; + const largeVideo = state['features/large-video']; if (participantId !== largeVideo.participantId) { dispatch({ diff --git a/react/features/largeVideo/components/LargeVideo.js b/react/features/large-video/components/LargeVideo.js similarity index 94% rename from react/features/largeVideo/components/LargeVideo.js rename to react/features/large-video/components/LargeVideo.js index 2a3e57c1c..a3eda7ec3 100644 --- a/react/features/largeVideo/components/LargeVideo.js +++ b/react/features/large-video/components/LargeVideo.js @@ -52,7 +52,7 @@ class LargeVideo extends Component { */ function mapStateToProps(state) { return { - _participantId: state['features/largeVideo'].participantId + _participantId: state['features/large-video'].participantId }; } diff --git a/react/features/largeVideo/components/index.js b/react/features/large-video/components/index.js similarity index 100% rename from react/features/largeVideo/components/index.js rename to react/features/large-video/components/index.js diff --git a/react/features/largeVideo/components/styles.js b/react/features/large-video/components/styles.js similarity index 100% rename from react/features/largeVideo/components/styles.js rename to react/features/large-video/components/styles.js diff --git a/react/features/largeVideo/index.js b/react/features/large-video/index.js similarity index 100% rename from react/features/largeVideo/index.js rename to react/features/large-video/index.js diff --git a/react/features/largeVideo/middleware.js b/react/features/large-video/middleware.js similarity index 95% rename from react/features/largeVideo/middleware.js rename to react/features/large-video/middleware.js index 374428096..b30d64639 100644 --- a/react/features/largeVideo/middleware.js +++ b/react/features/large-video/middleware.js @@ -47,7 +47,7 @@ MiddlewareRegistry.register(store => next => action => { = getTrackByJitsiTrack( state['features/base/tracks'], action.track.jitsiTrack); - const participantId = state['features/largeVideo'].participantId; + const participantId = state['features/large-video'].participantId; (track.participantId === participantId) && store.dispatch(selectParticipant()); diff --git a/react/features/largeVideo/reducer.js b/react/features/large-video/reducer.js similarity index 92% rename from react/features/largeVideo/reducer.js rename to react/features/large-video/reducer.js index cad07be39..bf81619d3 100644 --- a/react/features/largeVideo/reducer.js +++ b/react/features/large-video/reducer.js @@ -3,7 +3,7 @@ import { ReducerRegistry } from '../base/redux'; import { SELECT_LARGE_VIDEO_PARTICIPANT } from './actionTypes'; -ReducerRegistry.register('features/largeVideo', (state = {}, action) => { +ReducerRegistry.register('features/large-video', (state = {}, action) => { switch (action.type) { // When conference is joined, we update ID of local participant from default diff --git a/react/features/toolbar/components/ToolbarButton.native.js b/react/features/toolbar/components/ToolbarButton.native.js index 370e32b54..8e51cc1bb 100644 --- a/react/features/toolbar/components/ToolbarButton.native.js +++ b/react/features/toolbar/components/ToolbarButton.native.js @@ -1,7 +1,7 @@ import React from 'react'; import { TouchableHighlight } from 'react-native'; -import { Icon } from '../../base/fontIcons'; +import { Icon } from '../../base/font-icons'; import AbstractToolbarButton from './AbstractToolbarButton';