more cleanup of video attachments
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 620 B |
@@ -356,6 +356,8 @@ function inlineImageAttr(attr, data) {
|
|||||||
attr.alt = this.formatMessage(messages.drafty_image);
|
attr.alt = this.formatMessage(messages.drafty_image);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
attr.src = 'img/broken_image.png';
|
attr.src = 'img/broken_image.png';
|
||||||
|
} else {
|
||||||
|
attr.src = attr.src || 'img/broken_image.png';
|
||||||
}
|
}
|
||||||
attr.title = attr.alt;
|
attr.title = attr.alt;
|
||||||
return attr;
|
return attr;
|
||||||
@@ -370,14 +372,14 @@ function inlineVideoAttr(attr, data) {
|
|||||||
maxWidth: VIDEO_THUMBNAIL_WIDTH + 'px',
|
maxWidth: VIDEO_THUMBNAIL_WIDTH + 'px',
|
||||||
maxHeight: IMAGE_THUMBNAIL_DIM + 'px',
|
maxHeight: IMAGE_THUMBNAIL_DIM + 'px',
|
||||||
}
|
}
|
||||||
attr.alt = this.formatMessage(messages.drafty_video);
|
|
||||||
attr.className = 'inline-image';
|
attr.className = 'inline-image';
|
||||||
|
attr.alt = this.formatMessage(messages.drafty_video);
|
||||||
attr.title = attr.alt;
|
attr.title = attr.alt;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
attr.src = 'img/broken_video.png';
|
attr.src = 'img/broken_video.png';
|
||||||
|
} else {
|
||||||
|
attr.src = attr.src || 'img/broken_video.png';
|
||||||
}
|
}
|
||||||
// React requires this parameter to be lowercase and string.
|
|
||||||
attr.isvideo = 'T';
|
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ class SendMessage extends React.PureComponent {
|
|||||||
|
|
||||||
handleDropAttach(files) {
|
handleDropAttach(files) {
|
||||||
if (files && files.length > 0) {
|
if (files && files.length > 0) {
|
||||||
console.log('Dropping ', files);
|
|
||||||
this.props.onAttachFile(files[0]);
|
this.props.onAttachFile(files[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -2909,6 +2909,8 @@ function inlineImageAttr(attr, data) {
|
|||||||
attr.alt = this.formatMessage(messages.drafty_image);
|
attr.alt = this.formatMessage(messages.drafty_image);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
attr.src = 'img/broken_image.png';
|
attr.src = 'img/broken_image.png';
|
||||||
|
} else {
|
||||||
|
attr.src = attr.src || 'img/broken_image.png';
|
||||||
}
|
}
|
||||||
attr.title = attr.alt;
|
attr.title = attr.alt;
|
||||||
return attr;
|
return attr;
|
||||||
@@ -2921,13 +2923,14 @@ function inlineVideoAttr(attr, data) {
|
|||||||
maxWidth: _config_js__WEBPACK_IMPORTED_MODULE_9__.VIDEO_THUMBNAIL_WIDTH + 'px',
|
maxWidth: _config_js__WEBPACK_IMPORTED_MODULE_9__.VIDEO_THUMBNAIL_WIDTH + 'px',
|
||||||
maxHeight: _config_js__WEBPACK_IMPORTED_MODULE_9__.IMAGE_THUMBNAIL_DIM + 'px'
|
maxHeight: _config_js__WEBPACK_IMPORTED_MODULE_9__.IMAGE_THUMBNAIL_DIM + 'px'
|
||||||
};
|
};
|
||||||
attr.alt = this.formatMessage(messages.drafty_video);
|
|
||||||
attr.className = 'inline-image';
|
attr.className = 'inline-image';
|
||||||
|
attr.alt = this.formatMessage(messages.drafty_video);
|
||||||
attr.title = attr.alt;
|
attr.title = attr.alt;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
attr.src = 'img/broken_video.png';
|
attr.src = 'img/broken_video.png';
|
||||||
|
} else {
|
||||||
|
attr.src = attr.src || 'img/broken_video.png';
|
||||||
}
|
}
|
||||||
attr.isvideo = 'T';
|
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
function quoteFormatter(style, data, values, key) {
|
function quoteFormatter(style, data, values, key) {
|
||||||
@@ -15154,7 +15157,6 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
|||||||
}
|
}
|
||||||
handleDropAttach(files) {
|
handleDropAttach(files) {
|
||||||
if (files && files.length > 0) {
|
if (files && files.length > 0) {
|
||||||
console.log('Dropping ', files);
|
|
||||||
this.props.onAttachFile(files[0]);
|
this.props.onAttachFile(files[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user