mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 14:11:18 +00: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
|
||||
div.access-token-wrapper
|
||||
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
|
||||
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
|
||||
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")
|
||||
|
|
|
@ -189,17 +189,17 @@ define [
|
|||
$scope.project.publicAccesLevel = "private"
|
||||
settings.saveProjectAdminSettings({publicAccessLevel: "private"})
|
||||
|
||||
$scope.getReadAndWriteTokenLink = () ->
|
||||
if $scope?.project?.tokens?.readAndWrite?
|
||||
location.origin + "/" + $scope.project.tokens.readAndWrite
|
||||
$scope.$watch "project.tokens.readAndWrite", (token) ->
|
||||
if token?
|
||||
$scope.readAndWriteTokenLink = "#{location.origin}/#{token}"
|
||||
else
|
||||
''
|
||||
$scope.readAndWriteTokenLink = null
|
||||
|
||||
$scope.getReadOnlyTokenLink = () ->
|
||||
if $scope?.project?.tokens?.readOnly?
|
||||
location.origin + "/read/" + $scope.project.tokens.readOnly
|
||||
$scope.$watch "project.tokens.readOnly", (token) ->
|
||||
if token?
|
||||
$scope.readOnlyTokenLink = "#{location.origin}/#{token}"
|
||||
else
|
||||
''
|
||||
$scope.readOnlyTokenLink = null
|
||||
|
||||
$scope.done = () ->
|
||||
$modalInstance.close()
|
||||
|
|
Loading…
Reference in a new issue