Skip to content

Commit

Permalink
Custom meeting css
Browse files Browse the repository at this point in the history
  • Loading branch information
mehtank committed Jan 10, 2022
1 parent a40a3f7 commit 833be16
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions client/Meeting.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,23 @@ export Meeting = React.memo ->
parts.push room.title if room?.title
document.title = parts.reverse().join ' - '
, []
## Add custom CSS stylesheet
useTracker ->
meeting = Meetings.findOne meetingId
stylePath = meeting?.css
if stylePath and /^https:\/\/[^ "]+$/.exec stylePath
link = document.getElementById "customCss"
if link
link.href = stylePath
else
head = document.head
link = document.createElement "link"
link.type = "text/css"
link.rel = "stylesheet"
link.href = stylePath
link.id = "customCss"
head.appendChild link
, []

factory = (node) ->
updateTab = -> FlexLayout.updateNode model, node.getId()
Expand Down
1 change: 1 addition & 0 deletions client/Settings.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export Settings = React.memo ->
</Card>
<div className="sidebar">
<MeetingSetting setting="welcome" alt="Welcome URL (https only)" placeholder="(default)"/>
<MeetingSetting setting="css" alt="Custom CSS (https only)" placeholder="(none)"/>
</div>
</>
}
Expand Down
1 change: 1 addition & 0 deletions lib/meetings.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Meteor.methods
id: String
title: Match.Optional String
welcome: Match.Optional String
css: Match.Optional String
updator: updatorPattern
secret: Match.Optional String
unless @isSimulation
Expand Down

0 comments on commit 833be16

Please sign in to comment.