feat: Drop buttons tooltips specific to guests.

This commit is contained in:
damencho 2020-11-05 12:00:16 -06:00 committed by Дамян Минков
parent 4fdd4b66f7
commit c2539bf615
4 changed files with 3 additions and 26 deletions

View File

@ -220,7 +220,6 @@
"kickTitle": "Ouch! {{participantDisplayName}} kicked you out of the meeting", "kickTitle": "Ouch! {{participantDisplayName}} kicked you out of the meeting",
"liveStreaming": "Live Streaming", "liveStreaming": "Live Streaming",
"liveStreamingDisabledBecauseOfActiveRecordingTooltip": "Not possible while recording is active", "liveStreamingDisabledBecauseOfActiveRecordingTooltip": "Not possible while recording is active",
"liveStreamingDisabledForGuestTooltip": "Guests can't start live streaming.",
"liveStreamingDisabledTooltip": "Start live stream disabled.", "liveStreamingDisabledTooltip": "Start live stream disabled.",
"lockMessage": "Failed to lock the conference.", "lockMessage": "Failed to lock the conference.",
"lockRoom": "Add meeting $t(lockRoomPasswordUppercase)", "lockRoom": "Add meeting $t(lockRoomPasswordUppercase)",
@ -255,7 +254,6 @@
"readMore": "more", "readMore": "more",
"recording": "Recording", "recording": "Recording",
"recordingDisabledBecauseOfActiveLiveStreamingTooltip": "Not possible while a live stream is active", "recordingDisabledBecauseOfActiveLiveStreamingTooltip": "Not possible while a live stream is active",
"recordingDisabledForGuestTooltip": "Guests can't start recordings.",
"recordingDisabledTooltip": "Start recording disabled.", "recordingDisabledTooltip": "Start recording disabled.",
"rejoinNow": "Rejoin now", "rejoinNow": "Rejoin now",
"remoteControlAllowedMessage": "{{user}} accepted your remote control request!", "remoteControlAllowedMessage": "{{user}} accepted your remote control request!",
@ -287,7 +285,6 @@
"shareVideoTitle": "Share a video", "shareVideoTitle": "Share a video",
"shareYourScreen": "Share your screen", "shareYourScreen": "Share your screen",
"shareYourScreenDisabled": "Screen sharing disabled.", "shareYourScreenDisabled": "Screen sharing disabled.",
"shareYourScreenDisabledForGuest": "Guests can't screen share.",
"startLiveStreaming": "Start live stream", "startLiveStreaming": "Start live stream",
"startRecording": "Start recording", "startRecording": "Start recording",
"startRemoteControlErrorMessage": "An error occurred while trying to start the remote control session!", "startRemoteControlErrorMessage": "An error occurred while trying to start the remote control session!",

View File

@ -144,16 +144,10 @@ export function _mapStateToProps(state: Object, ownProps: Props) {
if (!visible && !_disabled) { if (!visible && !_disabled) {
_disabled = true; _disabled = true;
visible = true; visible = true;
// button and tooltip
if (state['features/base/jwt'].isGuest) {
_tooltip = 'dialog.liveStreamingDisabledForGuestTooltip';
} else {
_tooltip = 'dialog.liveStreamingDisabledTooltip'; _tooltip = 'dialog.liveStreamingDisabledTooltip';
} }
} }
} }
}
// disable the button if the recording is running. // disable the button if the recording is running.
if (getActiveSession(state, JitsiRecordingConstants.mode.FILE)) { if (getActiveSession(state, JitsiRecordingConstants.mode.FILE)) {

View File

@ -153,16 +153,10 @@ export function _mapStateToProps(state: Object, ownProps: Props): Object {
if (!visible && !_disabled) { if (!visible && !_disabled) {
_disabled = true; _disabled = true;
visible = true; visible = true;
// button and tooltip
if (state['features/base/jwt'].isGuest) {
_tooltip = 'dialog.recordingDisabledForGuestTooltip';
} else {
_tooltip = 'dialog.recordingDisabledTooltip'; _tooltip = 'dialog.recordingDisabledTooltip';
} }
} }
} }
}
// disable the button if the livestreaming is running. // disable the button if the livestreaming is running.
if (getActiveSession(state, JitsiRecordingConstants.mode.STREAM)) { if (getActiveSession(state, JitsiRecordingConstants.mode.STREAM)) {

View File

@ -1426,15 +1426,7 @@ function _mapStateToProps(state) {
desktopSharingEnabled = getParticipants(state) desktopSharingEnabled = getParticipants(state)
.find(({ features = {} }) => .find(({ features = {} }) =>
String(features['screen-sharing']) === 'true') !== undefined; String(features['screen-sharing']) === 'true') !== undefined;
desktopSharingDisabledTooltipKey = 'dialog.shareYourScreenDisabled';
// we want to show button and tooltip
if (state['features/base/jwt'].isGuest) {
desktopSharingDisabledTooltipKey
= 'dialog.shareYourScreenDisabledForGuest';
} else {
desktopSharingDisabledTooltipKey
= 'dialog.shareYourScreenDisabled';
}
} }
// NB: We compute the buttons again here because if URL parameters were used to // NB: We compute the buttons again here because if URL parameters were used to