mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add loading indicator while server returns links
This commit is contained in:
parent
e7ba75c2e5
commit
37115b8408
2 changed files with 12 additions and 10 deletions
|
@ -49,10 +49,12 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
.col-xs-12.access-token-display-area
|
.col-xs-12.access-token-display-area
|
||||||
div.access-token-wrapper
|
div.access-token-wrapper
|
||||||
strong #{translate('anyone_with_link_can_edit')}
|
strong #{translate('anyone_with_link_can_edit')}
|
||||||
pre.access-token {{ getReadAndWriteTokenLink() }}
|
pre.access-token(ng-show="readAndWriteTokenLink") {{ readAndWriteTokenLink }}
|
||||||
|
pre.access-token(ng-hide="readAndWriteTokenLink") #{translate('loading')}...
|
||||||
div.access-token-wrapper
|
div.access-token-wrapper
|
||||||
strong #{translate('anyone_with_link_can_view')}
|
strong #{translate('anyone_with_link_can_view')}
|
||||||
pre.access-token {{ getReadOnlyTokenLink() }}
|
pre.access-token(ng-show="readOnlyTokenLink") {{ readOnlyTokenLink }}
|
||||||
|
pre.access-token(ng-hide="readOnlyTokenLink") #{translate('loading')}...
|
||||||
|
|
||||||
//- legacy public-access
|
//- legacy public-access
|
||||||
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")
|
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")
|
||||||
|
|
|
@ -189,17 +189,17 @@ define [
|
||||||
$scope.project.publicAccesLevel = "private"
|
$scope.project.publicAccesLevel = "private"
|
||||||
settings.saveProjectAdminSettings({publicAccessLevel: "private"})
|
settings.saveProjectAdminSettings({publicAccessLevel: "private"})
|
||||||
|
|
||||||
$scope.getReadAndWriteTokenLink = () ->
|
$scope.$watch "project.tokens.readAndWrite", (token) ->
|
||||||
if $scope?.project?.tokens?.readAndWrite?
|
if token?
|
||||||
location.origin + "/" + $scope.project.tokens.readAndWrite
|
$scope.readAndWriteTokenLink = "#{location.origin}/#{token}"
|
||||||
else
|
else
|
||||||
''
|
$scope.readAndWriteTokenLink = null
|
||||||
|
|
||||||
$scope.getReadOnlyTokenLink = () ->
|
$scope.$watch "project.tokens.readOnly", (token) ->
|
||||||
if $scope?.project?.tokens?.readOnly?
|
if token?
|
||||||
location.origin + "/read/" + $scope.project.tokens.readOnly
|
$scope.readOnlyTokenLink = "#{location.origin}/#{token}"
|
||||||
else
|
else
|
||||||
''
|
$scope.readOnlyTokenLink = null
|
||||||
|
|
||||||
$scope.done = () ->
|
$scope.done = () ->
|
||||||
$modalInstance.close()
|
$modalInstance.close()
|
||||||
|
|
Loading…
Reference in a new issue