mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Show error if refresh fails
This commit is contained in:
parent
7d8c7bebe2
commit
1f2ee4e3fc
2 changed files with 9 additions and 0 deletions
|
@ -74,3 +74,7 @@ div.binary-file.full-size(
|
|||
i.fa.fa-fw.fa-download
|
||||
|
|
||||
| #{translate("download")}
|
||||
div(ng-if="refreshError")
|
||||
br
|
||||
.alert.alert-danger.col-md-6.col-md-offset-3
|
||||
| Error: {{ refreshError}}
|
||||
|
|
|
@ -31,6 +31,7 @@ define [
|
|||
data: null
|
||||
|
||||
$scope.refreshing = false
|
||||
$scope.refreshError = null
|
||||
|
||||
MAX_URL_LENGTH = 60
|
||||
FRONT_OF_URL_LENGTH = 35
|
||||
|
@ -48,6 +49,7 @@ define [
|
|||
|
||||
$scope.refreshFile = (file) ->
|
||||
$scope.refreshing = true
|
||||
$scope.refreshError = null
|
||||
ide.fileTreeManager.refreshLinkedFile(file)
|
||||
.then (response) ->
|
||||
{ data } = response
|
||||
|
@ -57,6 +59,9 @@ define [
|
|||
ide.binaryFilesManager.openFileById(new_file_id)
|
||||
, 1000
|
||||
)
|
||||
$scope.refreshError = null
|
||||
.catch (response) ->
|
||||
$scope.refreshError = response.data
|
||||
.finally () ->
|
||||
$scope.refreshing = false
|
||||
|
||||
|
|
Loading…
Reference in a new issue