diff --git a/services/web/app/views/project/editor/share.pug b/services/web/app/views/project/editor/share.pug index cd900c69ef..36ed146734 100644 --- a/services/web/app/views/project/editor/share.pug +++ b/services/web/app/views/project/editor/share.pug @@ -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'") diff --git a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee index dcd9a2da65..b28381bdc7 100644 --- a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee +++ b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee @@ -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() diff --git a/services/web/public/stylesheets/app/editor/share.less b/services/web/public/stylesheets/app/editor/share.less index 9efa8fdbad..1fe4663c7b 100644 --- a/services/web/public/stylesheets/app/editor/share.less +++ b/services/web/public/stylesheets/app/editor/share.less @@ -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;