Merge pull request #2081 from cryptpad/missing-padding-profile-buttons

Fix padding for profile action buttons
This commit is contained in:
yflory 2026-02-04 15:16:20 +01:00 committed by GitHub
commit 07f14a2a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -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

View File

@ -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,