Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
848fdc3e
Commit
848fdc3e
authored
3 years ago
by
Maxim Khlobystov
Browse files
Options
Downloads
Patches
Plain Diff
Make the random user picking countdown optional
parent
32738fba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx
+26
-17
26 additions, 17 deletions
...ml5/imports/ui/components/modal/random-user/component.jsx
bigbluebutton-html5/private/config/settings.yml
+1
-0
1 addition, 0 deletions
bigbluebutton-html5/private/config/settings.yml
with
27 additions
and
17 deletions
bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx
+
26
−
17
View file @
848fdc3e
...
...
@@ -6,6 +6,8 @@ import Button from '/imports/ui/components/button/component';
import
AudioService
from
'
/imports/ui/components/audio/service
'
;
import
{
styles
}
from
'
./styles
'
;
const
SELECT_RANDOM_USER_COUNTDOWN
=
Meteor
.
settings
.
public
.
selectRandomUser
.
countdown
;
const
messages
=
defineMessages
({
noViewers
:
{
id
:
'
app.modal.randomUser.noViewers.description
'
,
...
...
@@ -54,11 +56,12 @@ class RandomUserSelect extends Component {
props
.
randomUserReq
();
}
this
.
state
=
{
count
:
0
,
};
this
.
play
=
this
.
play
.
bind
(
this
);
if
(
SELECT_RANDOM_USER_COUNTDOWN
)
{
this
.
state
=
{
count
:
0
,
};
this
.
play
=
this
.
play
.
bind
(
this
);
}
}
iterateSelection
()
{
...
...
@@ -77,18 +80,20 @@ class RandomUserSelect extends Component {
}
componentDidMount
()
{
if
(
!
this
.
props
.
currentUser
.
presenter
)
{
if
(
SELECT_RANDOM_USER_COUNTDOWN
&&
!
this
.
props
.
currentUser
.
presenter
)
{
this
.
iterateSelection
();
}
}
componentDidUpdate
(
prevProps
,
prevState
)
{
if
(
this
.
props
.
currentUser
.
presenter
&&
this
.
state
.
count
==
0
)
{
this
.
iterateSelection
();
}
if
(
SELECT_RANDOM_USER_COUNTDOWN
)
{
if
(
this
.
props
.
currentUser
.
presenter
&&
this
.
state
.
count
==
0
)
{
this
.
iterateSelection
();
}
if
(
prevState
.
count
!==
this
.
state
.
count
)
{
this
.
play
();
if
(
prevState
.
count
!==
this
.
state
.
count
)
{
this
.
play
();
}
}
}
...
...
@@ -100,9 +105,11 @@ class RandomUserSelect extends Component {
}
reselect
()
{
this
.
setState
({
count
:
0
,
});
if
(
SELECT_RANDOM_USER_COUNTDOWN
)
{
this
.
setState
({
count
:
0
,
});
}
this
.
props
.
randomUserReq
();
}
...
...
@@ -116,10 +123,12 @@ class RandomUserSelect extends Component {
mappedRandomlySelectedUsers
,
}
=
this
.
props
;
if
(
mappedRandomlySelectedUsers
.
length
<
this
.
state
.
count
+
1
)
return
null
;
const
counter
=
SELECT_RANDOM_USER_COUNTDOWN
?
this
.
state
.
count
:
0
;
if
(
mappedRandomlySelectedUsers
.
length
<
counter
+
1
)
return
null
;
const
selectedUser
=
mappedRandomlySelectedUsers
[
this
.
state
.
count
][
0
];
const
countDown
=
mappedRandomlySelectedUsers
.
length
-
this
.
state
.
count
-
1
;
const
selectedUser
=
mappedRandomlySelectedUsers
[
counter
][
0
];
const
countDown
=
SELECT_RANDOM_USER_COUNTDOWN
?
mappedRandomlySelectedUsers
.
length
-
this
.
state
.
count
-
1
:
0
;
let
viewElement
;
...
...
This diff is collapsed.
Click to expand it.
bigbluebutton-html5/private/config/settings.yml
+
1
−
0
View file @
848fdc3e
...
...
@@ -504,6 +504,7 @@ public:
mime
:
image/png
selectRandomUser
:
enabled
:
true
countdown
:
false
user
:
role_moderator
:
MODERATOR
role_viewer
:
VIEWER
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment