mirror of https://github.com/jitsi/jitsi-meet
parent
141acea194
commit
241dc3b147
@ -1,23 +1,55 @@ |
||||
import { |
||||
ColorPalette, |
||||
createStyleSheet |
||||
} from '../../base/styles'; |
||||
import { BoxModel, createStyleSheet } from '../../base/styles'; |
||||
|
||||
/** |
||||
* The style common to <tt>LoginDialog</tt> and <tt>WaitForOwnerDialog</tt>. |
||||
*/ |
||||
const dialog = { |
||||
marginBottom: BoxModel.margin, |
||||
marginTop: BoxModel.margin |
||||
}; |
||||
|
||||
/** |
||||
* The style common to <tt>Text</tt> rendered by <tt>LoginDialog</tt> and |
||||
* <tt>WaitForOwnerDialog</tt>. |
||||
*/ |
||||
const text = { |
||||
}; |
||||
|
||||
/** |
||||
* The styles of the authentication feature. |
||||
*/ |
||||
export default createStyleSheet({ |
||||
outerArea: { |
||||
flex: 1 |
||||
/** |
||||
* The style of <tt>LoginDialog</tt>. |
||||
*/ |
||||
loginDialog: { |
||||
...dialog, |
||||
flex: 0, |
||||
flexDirection: 'column' |
||||
}, |
||||
dialogBox: { |
||||
marginLeft: '10%', |
||||
marginRight: '10%', |
||||
marginTop: '10%', |
||||
backgroundColor: ColorPalette.white |
||||
|
||||
/** |
||||
* The style of <tt>Text</tt> rendered by <tt>LoginDialog</tt>. |
||||
*/ |
||||
loginDialogText: { |
||||
...text |
||||
}, |
||||
textInput: { |
||||
height: 25, |
||||
fontSize: 16 |
||||
|
||||
/** |
||||
* The style of <tt>TextInput</tt> rendered by <tt>LoginDialog</tt>. |
||||
*/ |
||||
loginDialogTextInput: { |
||||
// XXX Matches react-native-prompt's dialogInput because base/dialog's
|
||||
// Dialog is implemented using react-native-prompt.
|
||||
fontSize: 18, |
||||
height: 50 |
||||
}, |
||||
|
||||
/** |
||||
* The style of <tt>WaitForOwnerDialog</tt>. |
||||
*/ |
||||
waitForOwnerDialog: { |
||||
...dialog, |
||||
...text |
||||
} |
||||
}); |
||||
|
@ -1,74 +0,0 @@ |
||||
import { |
||||
LoginDialog, |
||||
WaitForOwnerDialog |
||||
} from './components/index'; |
||||
import { hideDialog } from '../base/dialog/actions'; |
||||
|
||||
/** |
||||
* Will clear the wait for conference owner timeout handler if any is currently |
||||
* set. |
||||
* |
||||
* @param {Object} store - The Redux store instance. |
||||
* @returns {void} |
||||
*/ |
||||
export function clearExistingWaitForOwnerTimeout(store) { |
||||
const { waitForOwnerTimeoutID } |
||||
= store.getState()['features/authentication']; |
||||
|
||||
if (waitForOwnerTimeoutID) { |
||||
clearTimeout(waitForOwnerTimeoutID); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Checks if {@link LoginDialog} is currently open. |
||||
* |
||||
* @param {Object|Function} getStateOrState - The Redux store instance or |
||||
* store's get state method. |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isLoginDialogOpened(getStateOrState) { |
||||
const state |
||||
= typeof getStateOrState === 'function' |
||||
? getStateOrState() : getStateOrState; |
||||
const dialogState = state['features/base/dialog']; |
||||
|
||||
return dialogState.component && dialogState.component === LoginDialog; |
||||
} |
||||
|
||||
/** |
||||
* Hides {@link LoginDialog} if it's currently displayed. |
||||
* |
||||
* @param {Object} store - The Redux store instance. |
||||
* @returns {void} |
||||
*/ |
||||
export function hideLoginDialog({ dispatch, getState }) { |
||||
if (isLoginDialogOpened(getState)) { |
||||
dispatch(hideDialog()); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Checks if {@link WaitForOwnerDialog} is currently open. |
||||
* |
||||
* @param {Object} store - The Redux store instance. |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isWaitForOwnerDialogOpened({ getState }) { |
||||
const dialogState = getState()['features/base/dialog']; |
||||
|
||||
return dialogState.component |
||||
&& dialogState.component === WaitForOwnerDialog; |
||||
} |
||||
|
||||
/** |
||||
* Checks if the cyclic "wait for conference owner" task is currently scheduled. |
||||
* |
||||
* @param {Object} store - The Redux store instance. |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isWaitingForOwner({ getState }) { |
||||
const { waitForOwnerTimeoutID } = getState()['features/authentication']; |
||||
|
||||
return Boolean(waitForOwnerTimeoutID); |
||||
} |
@ -1,7 +1,6 @@ |
||||
export * from './actions'; |
||||
export * from './actionTypes'; |
||||
export * from './functions'; |
||||
export * from './components'; |
||||
|
||||
import './middleware'; |
||||
|
||||
import './reducer'; |
||||
|
Loading…
Reference in new issue