user stream preview size small

This commit is contained in:
Yuri Kuznetsov
2024-02-23 16:15:41 +02:00
parent a3a4d7bf36
commit 691c62f65d
3 changed files with 20 additions and 6 deletions
@@ -46,7 +46,7 @@ class EmailReceivedNoteStreamView extends NoteStreamView {
}
setup() {
let data = /** @type Object.<string, *> */this.model.get('data') || {};
const data = /** @type {Record} */this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
@@ -68,7 +68,11 @@ class EmailReceivedNoteStreamView extends NoteStreamView {
'attachments',
'attachmentMultiple',
{},
'views/stream/fields/attachment-multiple'
'views/stream/fields/attachment-multiple',
{
previewSize: this.options.isNotification || this.options.isUserStream ?
'small' : 'medium',
}
);
this.hasAttachments = true;
+12 -2
View File
@@ -45,7 +45,7 @@ class EmailSentNoteStreamView extends NoteStreamView {
}
setup() {
let data = /** @type Object.<string, *> */this.model.get('data') || {};
let data = /** @type {Record} */this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
@@ -63,7 +63,17 @@ class EmailSentNoteStreamView extends NoteStreamView {
}
if ((this.model.get('attachmentsIds') || []).length) {
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.createField(
'attachments',
'attachmentMultiple',
{},
'views/stream/fields/attachment-multiple',
{
previewSize: this.options.isNotification || this.options.isUserStream ?
'small' : 'medium',
}
);
this.hasAttachments = true;
}
}
+2 -2
View File
@@ -36,7 +36,7 @@ class PostNoteStreamView extends NoteStreamView {
isRemovable = true
data() {
let data = super.data();
const data = super.data();
data.showAttachments = !!(this.model.get('attachmentsIds') || []).length;
data.showPost = !!this.model.get('post');
@@ -49,7 +49,7 @@ class PostNoteStreamView extends NoteStreamView {
this.createField('post', null, null, 'views/stream/fields/post');
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple', {
previewSize: this.options.isNotification ? 'small' : 'medium'
previewSize: this.options.isNotification || this.options.isUserStream ? 'small' : 'medium'
});
this.isInternal = this.model.get('isInternal');