From 829d62ddbb39bb40e53e55230c533363b6a413a5 Mon Sep 17 00:00:00 2001 From: Ramon Souza Date: Fri, 3 Sep 2021 08:52:42 -0300 Subject: [PATCH 1/3] add different labels for when the user does not have breakout url --- .../ui/components/breakout-room/component.jsx | 30 +++++++++++++++---- bigbluebutton-html5/public/locales/en.json | 1 + 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx b/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx index 4d0b2cf42a..9e50263ce7 100644 --- a/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx @@ -43,13 +43,17 @@ const intlMessages = defineMessages({ id: 'app.createBreakoutRoom.returnAudio', description: 'label for option to return audio', }, + generateURL: { + id: 'app.createBreakoutRoom.generateURL', + description: 'label for generate breakout room url', + }, generatingURL: { id: 'app.createBreakoutRoom.generatingURL', description: 'label for generating breakout room url', }, generatedURL: { id: 'app.createBreakoutRoom.generatedURL', - description: 'label for generate breakout room url', + description: 'label for generated breakout room url', }, endAllBreakouts: { id: 'app.createBreakoutRoom.endAllBreakouts', @@ -94,6 +98,7 @@ class BreakoutRoom extends PureComponent { super(props); this.renderBreakoutRooms = this.renderBreakoutRooms.bind(this); this.getBreakoutURL = this.getBreakoutURL.bind(this); + this.getBreakoutLabel = this.getBreakoutLabel.bind(this); this.renderDuration = this.renderDuration.bind(this); this.transferUserToBreakoutRoom = this.transferUserToBreakoutRoom.bind(this); this.changeExtendTime = this.changeExtendTime.bind(this); @@ -175,6 +180,23 @@ class BreakoutRoom extends PureComponent { return null; } + getBreakoutLabel(breakoutId) { + const { intl, breakoutRoomUser } = this.props; + const { requestedBreakoutId, generated } = this.state; + + const hasUser = breakoutRoomUser(breakoutId); + + if (generated && requestedBreakoutId === breakoutId) { + return intl.formatMessage(intlMessages.generatedURL); + } + + if (hasUser) { + return intl.formatMessage(intlMessages.breakoutJoin); + } + + return intl.formatMessage(intlMessages.generateURL); + } + clearJoinedAudioOnly() { this.setState({ joinedAudioOnly: false }); } @@ -285,11 +307,7 @@ class BreakoutRoom extends PureComponent { ) : (