change display while signing in
This commit is contained in:
parent
3fa52d627f
commit
3b6dc64fd4
|
@ -15,6 +15,7 @@ $.extend Travis.Auth,
|
||||||
|
|
||||||
$.extend Travis.Auth.prototype,
|
$.extend Travis.Auth.prototype,
|
||||||
iframe: $('<iframe id="auth-frame" />').hide()
|
iframe: $('<iframe id="auth-frame" />').hide()
|
||||||
|
timeout: 10000
|
||||||
|
|
||||||
expectedOrigin: ->
|
expectedOrigin: ->
|
||||||
if Travis.config.api_endpoint[0] == '/'
|
if Travis.config.api_endpoint[0] == '/'
|
||||||
|
@ -33,6 +34,12 @@ $.extend Travis.Auth.prototype,
|
||||||
trySignIn: ->
|
trySignIn: ->
|
||||||
@iframe.attr('src', "#{Travis.config.api_endpoint}/auth/post_message")
|
@iframe.attr('src', "#{Travis.config.api_endpoint}/auth/post_message")
|
||||||
|
|
||||||
|
# TODO: use views
|
||||||
|
link = $("#navigation .profile")
|
||||||
|
html = link.html()
|
||||||
|
link.html("Signing in with GitHub...")
|
||||||
|
window.setTimeout((-> link.html(html)), @timeout)
|
||||||
|
|
||||||
newUser: ->
|
newUser: ->
|
||||||
localStorage?.setItem("travisTrySignIn", "true")
|
localStorage?.setItem("travisTrySignIn", "true")
|
||||||
url = "#{Travis.config.api_endpoint}/auth/handshake?redirect_uri=#{window.location}"
|
url = "#{Travis.config.api_endpoint}/auth/handshake?redirect_uri=#{window.location}"
|
||||||
|
@ -43,4 +50,4 @@ $.extend Travis.Auth.prototype,
|
||||||
|
|
||||||
signIn: ->
|
signIn: ->
|
||||||
@trySignIn()
|
@trySignIn()
|
||||||
window.setTimeout((=> @checkUser()), 10000)
|
window.setTimeout((=> @checkUser()), @timeout)
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user