forked from External/greenlight
notice when trying to upload to Youtube with Twitter auth
This commit is contained in:
parent
042622cb01
commit
29ca709c85
|
@ -170,6 +170,10 @@ class @Recordings
|
||||||
options.title = I18n.youtube_disabled
|
options.title = I18n.youtube_disabled
|
||||||
$('#recordings').tooltip(options)
|
$('#recordings').tooltip(options)
|
||||||
|
|
||||||
|
options.selector = '.invalid-tooltip'
|
||||||
|
options.title = I18n.invalid_provider
|
||||||
|
$('#recordings').tooltip(options)
|
||||||
|
|
||||||
$(document).one "turbolinks:before-cache", =>
|
$(document).one "turbolinks:before-cache", =>
|
||||||
@getTable().api().clear().draw().destroy()
|
@getTable().api().clear().draw().destroy()
|
||||||
|
|
||||||
|
@ -371,8 +375,10 @@ class @Recordings
|
||||||
canUpload = res_data['uploadable']
|
canUpload = res_data['uploadable']
|
||||||
)
|
)
|
||||||
|
|
||||||
if canUpload
|
if canUpload == 'true'
|
||||||
$(this).attr('data-popover-body', '.mail_youtube_popover')
|
$(this).attr('data-popover-body', '.mail_youtube_popover')
|
||||||
|
else if canUpload == 'invalid_provider'
|
||||||
|
$(this).attr('data-popover-body', '.no_youtube_popover')
|
||||||
else
|
else
|
||||||
$(this).attr('data-popover-body', '.mail_popover')
|
$(this).attr('data-popover-body', '.mail_popover')
|
||||||
|
|
||||||
|
|
|
@ -201,10 +201,12 @@ class BbbController < ApplicationController
|
||||||
|
|
||||||
# POST /rooms/:room_id/recordings/can_upload
|
# POST /rooms/:room_id/recordings/can_upload
|
||||||
def can_upload
|
def can_upload
|
||||||
# The recording is uploadable if it contains webcam data and they are logged in thorugh Google.
|
# The recording is uploadable if it contains webcam data and they are logged in through Google.
|
||||||
uploadable = Faraday.head(get_webcams_url(params[:rec_id])).status == 200 &&
|
if current_user.provider != 'google'
|
||||||
Rails.application.config.omniauth_google &&
|
uploadable = 'invalid_provider'
|
||||||
current_user.provider == 'google'
|
else
|
||||||
|
uploadable = (Faraday.head(get_webcams_url(params[:rec_id])).status == 200 && current_user.provider == 'google').to_s
|
||||||
|
end
|
||||||
render json: {:uploadable => uploadable}
|
render json: {:uploadable => uploadable}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,16 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='no_youtube_popover'>
|
||||||
|
<button type="button" class="btn btn-default mail-recording mail-tooltip fa-2x">
|
||||||
|
<%= icon('envelope-o') %>
|
||||||
|
</button>
|
||||||
|
<div class="tooltip-wrapper disabled invalid-tooltip">
|
||||||
|
<button type="button" class="btn btn-default" disabled>
|
||||||
|
<%= icon('youtube-play') %>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="recording-visibility-popover">
|
<div class="recording-visibility-popover">
|
||||||
<button type="button" class="btn btn-default btn-success recording-update" data-visibility="published">
|
<button type="button" class="btn btn-default btn-success recording-update" data-visibility="published">
|
||||||
<%= t('client.published') %>
|
<%= t('client.published') %>
|
||||||
|
|
|
@ -51,6 +51,7 @@ en-US:
|
||||||
email_footer_1: This e-mail is auto-generated by your friendly neighbourhood BigBlueButton server. Do no reply to this e-mail.
|
email_footer_1: This e-mail is auto-generated by your friendly neighbourhood BigBlueButton server. Do no reply to this e-mail.
|
||||||
email_footer_2: BigBlueButton is an open source web conferencing system. For more information on BigBlueButton and it's amazing capabilities, see https://bigbluebutton.org/ .
|
email_footer_2: BigBlueButton is an open source web conferencing system. For more information on BigBlueButton and it's amazing capabilities, see https://bigbluebutton.org/ .
|
||||||
enter_name: Enter a name to join
|
enter_name: Enter a name to join
|
||||||
|
invalid_provider: You must authenticate with Google to upload.
|
||||||
mail_recording: Mail
|
mail_recording: Mail
|
||||||
meeting_ended: Meeting was ended
|
meeting_ended: Meeting was ended
|
||||||
meeting_started: Meeting was started
|
meeting_started: Meeting was started
|
||||||
|
|
Loading…
Reference in New Issue