diff --git a/www/teams/inner.js b/www/teams/inner.js index 28f617aca..918f0eeac 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -3,6 +3,7 @@ define([ '/common/toolbar3.js', '/common/drive-ui.js', '/common/common-util.js', + '/common/common-hash.js', '/common/common-interface.js', '/common/common-ui-elements.js', '/common/common-feedback.js', @@ -23,6 +24,7 @@ define([ Toolbar, DriveUI, Util, + Hash, UI, UIElements, Feedback, @@ -118,6 +120,7 @@ define([ 'cp-team-chat' ], 'admin': [ + 'cp-team-edpublic', 'cp-team-name', 'cp-team-avatar', 'cp-team-delete', @@ -690,6 +693,26 @@ define([ }); }); + makeBlock('edpublic', function (common, cb) { + var container = h('div'); + var $div = $(container); + var metadataMgr = common.getMetadataMgr(); + var privateData = metadataMgr.getPrivateData(); + var team = privateData.teams[APP.team]; + if (!team) { return void cb(); } + var publicKey = team.edPublic; + var name = team.name; + if (publicKey) { + var $key = $('
', {'class': 'cp-sidebarlayout-element'}).appendTo($div); + var userHref = Hash.getUserHrefFromKeys(privateData.origin, name, publicKey); + var $pubLabel = $('', {'class': 'label'}) + .text(Messages.settings_publicSigningKey); + $key.append($pubLabel).append(UI.dialog.selectable(userHref)); + } + var content = [container]; + cb(content); + }); + makeBlock('name', function (common, cb) { var $inputBlock = $('
', {'class': 'cp-sidebarlayout-input-block'}); var $input = $('', {