Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Public
Playground
Discourse Bbb
Commits
0960fa0e
Unverified
Commit
0960fa0e
authored
Jun 10, 2020
by
Penar Musaraj
Browse files
UX: Randomize passwords, remove password inputs, disallow adding entry without a meeting ID
parent
04d29231
Changes
4
Hide whitespace changes
Inline
Side-by-side
assets/javascripts/discourse-bbb/controllers/insert-bbb.js.es6
View file @
0960fa0e
import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality";
import discourseComputed from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils";
export default Controller.extend(ModalFunctionality, {
keyDown(e) {
...
...
@@ -21,11 +23,26 @@ export default Controller.extend(ModalFunctionality, {
});
},
randomID() {
return Math.random()
.toString(36)
.slice(-8);
},
@discourseComputed("meetingID")
insertDisabled(meetingID) {
return isEmpty(meetingID);
},
actions: {
insert() {
const btnTxt = this.buttonText ? ` label="${this.buttonText}"` : "";
this.toolbarEvent.addText(
`[wrap=discourse-bbb meetingID="${this.meetingID}"${btnTxt} attendeePW="${this.attendeePW}" moderatorPW="${this.moderatorPW}" mobileIframe="${this.mobileIframe}" desktopIframe="${this.desktopIframe}"][/wrap]`
`[wrap=discourse-bbb meetingID="${
this.meetingID
}"${btnTxt} attendeePW="${this.randomID()}" moderatorPW="${this.randomID()}" mobileIframe="${
this.mobileIframe
}" desktopIframe="${this.desktopIframe}"][/wrap]`
);
this.send("closeModal");
},
...
...
assets/javascripts/discourse/templates/modal/insert-bbb.hbs
View file @
0960fa0e
...
...
@@ -5,21 +5,11 @@
{{
text-field
value
=
meetingID
}}
</div>
<div
class=
"insert-bbb-input"
>
<div
class=
"insert-bbb-input
bbb-button-text
"
>
<label>
{{
i18n
"bbb.button_text"
}}
</label>
{{
text-field
value
=
buttonText
placeholderKey
=
"bbb.launch"
}}
</div>
<div
class=
"insert-bbb-input"
>
<label>
{{
i18n
"bbb.attendeePW"
}}
</label>
{{
text-field
value
=
attendeePW
}}
</div>
<div
class=
"insert-bbb-input"
>
<label>
{{
i18n
"bbb.moderatorPW"
}}
</label>
{{
text-field
value
=
moderatorPW
}}
</div>
<div
class=
"insert-bbb-input"
>
<label
class=
'checkbox-label'
>
{{
input
type
=
"checkbox"
checked
=
mobileIframe
}}
...
...
assets/stylesheets/common/bbb.scss
View file @
0960fa0e
...
...
@@ -6,3 +6,7 @@
.bbb-status
img
{
margin-left
:
0
.5em
;
}
.bbb-button-text
{
margin-bottom
:
1em
;
}
config/locales/client.en.yml
View file @
0960fa0e
...
...
@@ -4,8 +4,6 @@ en:
composer_title
:
Add BigBlueButton
meetingID
:
Meeting ID
button_text
:
Button label (optional)
attendeePW
:
Attendee password
moderatorPW
:
Moderator password
launch
:
Start Video Conference
modal
:
insert
:
Insert
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment