diff --git a/www/profile/app-profile.less b/www/profile/app-profile.less index cf8474521..9d0809ea3 100644 --- a/www/profile/app-profile.less +++ b/www/profile/app-profile.less @@ -140,6 +140,7 @@ .cp-app-profile-displayname { font-weight: bold; font-size: 30px; + word-break: break-word; } .cp-app-profile-link { font-size: 25px; @@ -185,7 +186,21 @@ } .cp-app-profile-friend-request { flex: 0; - margin-top: 10px; + white-space: normal; + margin-bottom: 0.5rem; + svg { + min-width: @variables_icon_width; + } + } + .cp-app-profile-friend-request.btn-success { + margin-right: 0.5rem; + } + #cp-sidebarlayout-container #cp-sidebarlayout-rightside .cp-app-profile-friend-container button.btn.cp-app-profile-friend-request { + height: auto; + > span { + word-break: break-word; + overflow-wrap: anywhere; + } } // I tried using flexbox but messed with how the pencil icon was displayed diff --git a/www/profile/inner.js b/www/profile/inner.js index 98d64fc00..e0a1edefe 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -236,7 +236,7 @@ define([ // If this curve has sent us a friend request, we should not be able to sent it to them var friendRequests = common.getFriendRequests(); if (friendRequests[data.curvePublic]) { - $button.append(Messages._getKey('friendRequest_received', [name || Messages.anonymous])) + $button.append(UI.setHTML(h('span'), Messages._getKey('friendRequest_received', [name || Messages.anonymous]))) .click(function () { UIElements.displayFriendRequestModal(common, friendRequests[data.curvePublic]); }); @@ -276,7 +276,7 @@ define([ return; } // This is not a friend yet: we can send a friend request - $button.text(Messages._getKey('userlist_addAsFriendTitle', [data.name || Messages.anonymous])) + $button.empty().append([Icons.get('add-friend'), h('span', Messages._getKey('userlist_addAsFriendTitle', [data.name || Messages.anonymous]))]) .click(function () { APP.common.sendFriendRequest({ curvePublic: data.curvePublic,