reload after login, if login was required.
This commit is contained in:
parent
ec05842d31
commit
3305674597
|
@ -31,10 +31,13 @@ claim_wiki = () ->
|
||||||
.then (response) ->
|
.then (response) ->
|
||||||
if response.ok
|
if response.ok
|
||||||
response.json().then (json) ->
|
response.json().then (json) ->
|
||||||
ownerName = json.ownerName
|
if wiki.lineup.bestTitle() is 'Login Required'
|
||||||
window.isClaimed = true
|
location.reload()
|
||||||
window.isOwner = true
|
else
|
||||||
update_footer ownerName, true
|
ownerName = json.ownerName
|
||||||
|
window.isClaimed = true
|
||||||
|
window.isOwner = true
|
||||||
|
update_footer ownerName, true
|
||||||
else
|
else
|
||||||
console.log 'Attempt to claim site failed', response
|
console.log 'Attempt to claim site failed', response
|
||||||
|
|
||||||
|
@ -103,7 +106,10 @@ update_footer = (ownerName, isAuthenticated) ->
|
||||||
if !isClaimed
|
if !isClaimed
|
||||||
claim_wiki()
|
claim_wiki()
|
||||||
else
|
else
|
||||||
update_footer ownerName, true)
|
if wiki.lineup.bestTitle() is 'Login Required'
|
||||||
|
location.reload()
|
||||||
|
else
|
||||||
|
update_footer ownerName, true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -165,8 +171,6 @@ setup = (user) ->
|
||||||
settings.dialogURL = dialogProtocol + '//' + dialogHost + '/auth/loginDialog'
|
settings.dialogURL = dialogProtocol + '//' + dialogHost + '/auth/loginDialog'
|
||||||
settings.relayURL = dialogProtocol + '//' + dialogHost + '/auth/relay.html'
|
settings.relayURL = dialogProtocol + '//' + dialogHost + '/auth/relay.html'
|
||||||
settings.dialogAddAltURL = dialogProtocol + '//' + dialogHost + '/auth/addAuthDialog'
|
settings.dialogAddAltURL = dialogProtocol + '//' + dialogHost + '/auth/addAuthDialog'
|
||||||
|
|
||||||
|
|
||||||
update_footer ownerName, isAuthenticated
|
update_footer ownerName, isAuthenticated
|
||||||
else
|
else
|
||||||
console.log 'Unable to fetch client settings: ', response
|
console.log 'Unable to fetch client settings: ', response
|
||||||
|
|
Loading…
Reference in New Issue