[FIX] mail: various UI fixes

- correct template for undo snackbar
- better padding for chat windows
- recent messages now display 'now' instead of 'a few seconds ago'
This commit is contained in:
Géry Debongnie
2016-02-05 15:23:27 +01:00
parent 9e31b5de2a
commit bc03c915d4
4 changed files with 13 additions and 4 deletions
+5
View File
@@ -2058,6 +2058,11 @@ msgstr ""
msgid "Notify followers of the document (mass post only)"
msgstr ""
#. module: mail
#: code:addons/mail/static/src/js/thread.js:140
msgid "now"
msgstr ""
#. module: mail
#: model:ir.model.fields,field_description:mail.field_mail_channel_message_needaction_counter
#: model:ir.model.fields,field_description:mail.field_mail_thread_message_needaction_counter
+1 -1
View File
@@ -390,7 +390,7 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
if (channel.type !== 'static') {
// Display snackbar if needactions have been cleared
if (channel.needaction_counter > 0) {
self.render_snackbar('mail.chat.MessageSentSnackbar', {
self.render_snackbar('mail.chat.UndoSnackbar', {
nb_needactions: channel.needaction_counter,
});
}
+6 -2
View File
@@ -137,8 +137,12 @@ var Thread = Widget.extend({
var date = msg.date.format('YYYY-MM-DD');
if (date === moment().format('YYYY-MM-DD')) {
msg.day = _t("Today");
msg.hour = msg.date.fromNow();
msg.day = _t("Today");
if (moment().diff(msg.date, 'minutes') === 0) {
msg.hour = _t("now");
} else {
msg.hour = msg.date.fromNow();
}
} else if (date === moment().subtract(1, 'days').format('YYYY-MM-DD')) {
msg.day = _t("Yesterday");
msg.hour = msg.date.format('LT');
+1 -1
View File
@@ -60,7 +60,6 @@
.o_mail_thread {
.o-flex(1, 1, auto);
overflow: auto;
padding: 5px;
.o_thread_date_separator {
margin-top: 0px;
@@ -74,6 +73,7 @@
.o_thread_message_sidebar {
margin-right: 5px;
}
padding: 4px 5px;
}
}