diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less
index 3e0458dae..6e7e6c01d 100644
--- a/customize.dist/src/less/toolbar.less
+++ b/customize.dist/src/less/toolbar.less
@@ -119,11 +119,8 @@ body .userlist-drawer {
}
}
.friend {
- display: flex;
- text-align: right;
- &:hover {
- background-color: rgba(0, 0, 0, 0.1);
- }
+ display: inline-block;
+ width: 20px;
}
}
@@ -136,6 +133,11 @@ body {
background-color: darken(@bgcolor, 10%);
color: @color;
}
+ .friend {
+ &:hover {
+ color: darken(@color, 15%);
+ }
+ }
}
.cryptpad-toolbar {
background-color: @bgcolor;
diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js
index b0c157ea4..42cf84655 100644
--- a/customize.dist/translations/messages.fr.js
+++ b/customize.dist/translations/messages.fr.js
@@ -253,6 +253,18 @@ define(function () {
out.profile_description = "Description";
out.profile_fieldSaved = 'Nouvelle valeur enregistrée: {0}';
+ // contacts/userlist
+ out.userlist_addAsFriendTitle = 'Ajouter "{0}" comme contact';
+ out.userlist_thisIsYou = 'Vous ("{0}")';
+ out.contacts_title = "Contacts";
+ out.contacts_addError = "Erreur lors de l'ajout de ce contact dans votre liste";
+ out.contacts_added = 'Invitation de contact acceptée';
+ out.contacts_rejected = 'Invitation d econtact rejetée';
+ out.contacts_request = '{0} souhaite vous ajouter en tant que contact. Accepter ?';
+ out.contacts_send = 'Envoyer';
+ out.contacts_remove = 'Supprimer ce contact';
+ out.contacts_confirmRemove = 'Êtes-vous sûr de voulour supprimer {0} de vos contacts ?';
+
// File manager
out.fm_rootName = "Documents";
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index c8a472954..3c6b7b4b8 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -266,6 +266,13 @@ define(function () {
out.userlist_addAsFriendTitle = 'Add "{0}" as a contact';
out.userlist_thisIsYou = 'This is you ("{0}")';
out.contacts_title = "Contacts";
+ out.contacts_addError = 'Error while adding that contact to the list';
+ out.contacts_added = 'Contact invite accepted.';
+ out.contacts_rejected = 'Contact invite rejected';
+ out.contacts_request = '{0} would like to add you as a contact. Accept?';
+ out.contacts_send = 'Send';
+ out.contacts_remove = 'Remove this contact';
+ out.contacts_confirmRemove = 'Are you sure you want to remove {0} from your contacts?';
// File manager
diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js
index 9da54dc0f..6b785041d 100644
--- a/www/common/common-messaging.js
+++ b/www/common/common-messaging.js
@@ -11,17 +11,8 @@ define([
unfriend: 'UNFRIEND'
};
- // TODO: pin the chat channel!
-
-
- // TODO: new Types
- // - send a rename message to the chat
- // - petnames
- // - close a chat / remove a friend
-
// TODO
// - mute a channel (hide notifications or don't open it?)
- //
var ready = [];
var pending = {};
@@ -87,6 +78,7 @@ define([
var $rightCol = $('', {'class': 'right-col'});
$('', {'class': 'name'}).text(data.displayName).appendTo($rightCol);
var $remove = $('', {'class': 'remove fa fa-user-times'}).appendTo($rightCol);
+ $remove.attr('title', common.Messages.contacts_remove);
$friend.dblclick(function () {
if (data.profile) {
window.open('/profile/#' + data.profile);
@@ -97,10 +89,12 @@ define([
});
$remove.click(function (e) {
e.stopPropagation();
- common.confirm("TODO: Are you sure?", function (yes) {//XXX
+ common.confirm(common.Messages.getKey('contacts_confirmRemove', [
+ common.fixHTML(data.displayName)
+ ]), function (yes) {
if (!yes) { return; }
remove(data.curvePublic);
- });
+ }, null, true);
});
if (data.avatar && avatars[data.avatar]) {
$friend.append(avatars[data.avatar]);
@@ -273,7 +267,7 @@ define([
console.error(err);
});
};
- $('