Show tokens in share modal

This commit is contained in:
Shane Kilkelly 2017-09-29 10:11:23 +01:00
parent 9810f63245
commit df338ebd6d
3 changed files with 22 additions and 0 deletions

View file

@ -29,6 +29,13 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
href
ng-click="openMakePrivateModal()"
) #{translate("make_private")}
.col-xs-12.access-token-display
div
strong #{translate("read_only")}
pre.access-token {{ getReadOnlyTokenLink() }}
div
strong #{translate("read_and_write")}
pre.access-token {{ getReadAndWriteTokenLink() }}
//- legacy public-access
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")

View file

@ -199,6 +199,12 @@ define [
scope: $scope
}
$scope.getReadAndWriteTokenLink = () ->
location.origin + "/" + $scope.project.tokens.readAndWrite
$scope.getReadOnlyTokenLink = () ->
location.origin + "/" + $scope.project.tokens.readOnly
$scope.done = () ->
$modalInstance.close()

View file

@ -6,6 +6,15 @@
font-size: 1rem;
}
.access-token-display {
padding-top: 8px;
.access-token {
background-color: @gray-lightest;
border: 1px solid @gray-lighter;
padding: 6px 12px 6px 12px
}
}
.project-member, .project-invite, .public-access-level {
padding: (@line-height-computed / 2) 0;
border-bottom: 1px solid @gray-lighter;