|
@@ -172,9 +172,8 @@ export function showDesktopSharingButton(): Function {
|
172
|
172
|
export function showDialPadButton(show: boolean): Function {
|
173
|
173
|
return (dispatch: Dispatch<*>) => {
|
174
|
174
|
const buttonName = 'dialpad';
|
175
|
|
- const shouldShow = UIUtil.isButtonEnabled(buttonName) && show;
|
176
|
175
|
|
177
|
|
- if (shouldShow) {
|
|
176
|
+ if (show && UIUtil.isButtonEnabled(buttonName)) {
|
178
|
177
|
dispatch(setToolbarButton(buttonName, {
|
179
|
178
|
hidden: false
|
180
|
179
|
}));
|
|
@@ -205,11 +204,9 @@ export function showRecordingButton(): Function {
|
205
|
204
|
export function showSharedVideoButton(): Function {
|
206
|
205
|
return (dispatch: Dispatch<*>) => {
|
207
|
206
|
const buttonName = 'sharedvideo';
|
208
|
|
- const shouldShow
|
209
|
|
- = UIUtil.isButtonEnabled(buttonName)
|
210
|
|
- && !config.disableThirdPartyRequests;
|
211
|
207
|
|
212
|
|
- if (shouldShow) {
|
|
208
|
+ if (UIUtil.isButtonEnabled(buttonName)
|
|
209
|
+ && !config.disableThirdPartyRequests) {
|
213
|
210
|
dispatch(setToolbarButton(buttonName, {
|
214
|
211
|
hidden: false
|
215
|
212
|
}));
|
|
@@ -218,28 +215,22 @@ export function showSharedVideoButton(): Function {
|
218
|
215
|
}
|
219
|
216
|
|
220
|
217
|
/**
|
221
|
|
- * Shows SIP call button if it's required and appropriate
|
222
|
|
- * flag is passed.
|
|
218
|
+ * Shows SIP call button if it's required and appropriate flag is passed.
|
223
|
219
|
*
|
224
|
220
|
* @param {boolean} show - Flag showing whether to show button or not.
|
225
|
221
|
* @returns {Function}
|
226
|
222
|
*/
|
227
|
223
|
export function showSIPCallButton(show: boolean): Function {
|
228
|
|
- return (dispatch: Dispatch<*>) => {
|
|
224
|
+ return (dispatch: Dispatch<*>, getState: Function) => {
|
229
|
225
|
const buttonName = 'sip';
|
230
|
226
|
|
231
|
|
- // hide the button if there is a config to check for user roles,
|
232
|
|
- // based on the token and the the user is guest
|
233
|
|
- const shouldShow
|
234
|
|
- = APP.conference.sipGatewayEnabled()
|
|
227
|
+ if (show
|
|
228
|
+ && APP.conference.sipGatewayEnabled()
|
235
|
229
|
&& UIUtil.isButtonEnabled(buttonName)
|
236
|
|
- && show
|
237
|
230
|
&& (!config.enableUserRolesBasedOnToken
|
238
|
|
- || !APP.tokenData.isGuest);
|
239
|
|
-
|
240
|
|
- if (shouldShow) {
|
|
231
|
+ || !getState()['features/jwt'].isGuest)) {
|
241
|
232
|
dispatch(setToolbarButton(buttonName, {
|
242
|
|
- hidden: !shouldShow
|
|
233
|
+ hidden: false
|
243
|
234
|
}));
|
244
|
235
|
}
|
245
|
236
|
};
|