Merge branch 'master' of https://github.com/syuilo/misskey
This commit is contained in:
commit
38b9fed379
1 changed files with 5 additions and 6 deletions
|
@ -10,6 +10,10 @@ riot.mixin \net do
|
|||
|
||||
module.exports = (i, endpoint, data) ->
|
||||
pending++
|
||||
if pending == 1
|
||||
spinner := document.create-element \div
|
||||
..set-attribute \id \wait
|
||||
document.body.append-child spinner
|
||||
|
||||
if i? and typeof i == \object then i = i.token
|
||||
|
||||
|
@ -36,11 +40,6 @@ module.exports = (i, endpoint, data) ->
|
|||
then endpoint
|
||||
else "#{CONFIG.api.url}/#{endpoint}"
|
||||
|
||||
if pending == 1
|
||||
spinner := document.create-element \div
|
||||
..set-attribute \id \wait
|
||||
document.body.append-child spinner
|
||||
|
||||
new Promise (resolve, reject) ->
|
||||
timer = set-timeout ->
|
||||
net.trigger \detected-slow-network
|
||||
|
|
Loading…
Reference in a new issue