From c7ca50c9341199d90705f5b04ae12da6c1efb31e Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 23 Aug 2019 16:42:31 +0200 Subject: [PATCH] add "copy shareable link" button to "profile" page --- www/profile/app-profile.less | 6 +++++- www/profile/inner.js | 23 +++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/www/profile/app-profile.less b/www/profile/app-profile.less index 852b11421..1284f31c4 100644 --- a/www/profile/app-profile.less +++ b/www/profile/app-profile.less @@ -122,9 +122,13 @@ #cp-app-profile-invite-button { float: right; } - #cp-app-profile-viewprofile-button { + .cp-app-profile-viewprofile-button { margin-bottom: 20px; float: right; + margin-left: 5px; + &> span { + margin-left: 10px; + } } #cp-app-profile-description { position: relative; diff --git a/www/profile/inner.js b/www/profile/inner.js index 75f1022f8..324e918a8 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -9,6 +9,7 @@ define([ '/common/common-interface.js', '/common/common-ui-elements.js', '/common/common-realtime.js', + '/common/clipboard.js', '/common/hyperscript.js', '/customize/messages.js', '/customize/application_config.js', @@ -36,6 +37,7 @@ define([ UI, UIElements, Realtime, + Clipboard, h, Messages, AppConfig, @@ -96,15 +98,20 @@ define([ var hash = common.getMetadataMgr().getPrivateData().hashes.viewHash; var url = APP.origin + '/profile/#' + hash; - var $button = $('