Use fit: cover for non-square thumbnails, better movie icon
Also: Match Android's X button in the quote composition area
This commit is contained in:
parent
12257e1560
commit
37cac717cb
5 changed files with 41 additions and 29 deletions
|
@ -183,9 +183,8 @@ const View = Whisper.MessageView;
|
|||
#### A lot of text in quotation, with image
|
||||
|
||||
```jsx
|
||||
const quotedMessage = {
|
||||
imageUrl: util.gifObjectUrl,
|
||||
id: '3234-23423-2342',
|
||||
const thumbnail = {
|
||||
objectUrl: util.gifObjectUrl,
|
||||
};
|
||||
const outgoing = new Whisper.Message({
|
||||
type: 'outgoing',
|
||||
|
@ -218,8 +217,8 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
|
|||
}),
|
||||
}));
|
||||
|
||||
outgoing.quotedMessage = quotedMessage;
|
||||
incoming.quotedMessage = quotedMessage;
|
||||
outgoing.quoteThumbnail = thumbnail;
|
||||
incoming.quoteThumbnail = thumbnail;
|
||||
|
||||
const View = Whisper.MessageView;
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
|
@ -237,8 +236,8 @@ const View = Whisper.MessageView;
|
|||
#### Image with caption
|
||||
|
||||
```jsx
|
||||
const quotedMessage = {
|
||||
imageUrl: util.gifObjectUrl,
|
||||
const thumbnail = {
|
||||
objectUrl: util.gifObjectUrl,
|
||||
id: '3234-23423-2342',
|
||||
};
|
||||
const outgoing = new Whisper.Message({
|
||||
|
@ -268,8 +267,8 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
|
|||
}),
|
||||
}));
|
||||
|
||||
outgoing.quotedMessage = quotedMessage;
|
||||
incoming.quotedMessage = quotedMessage;
|
||||
outgoing.quoteThumbnail = thumbnail;
|
||||
incoming.quoteThumbnail = thumbnail;
|
||||
|
||||
const View = Whisper.MessageView;
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
|
@ -287,8 +286,8 @@ const View = Whisper.MessageView;
|
|||
#### Image
|
||||
|
||||
```jsx
|
||||
const quotedMessage = {
|
||||
imageUrl: util.gifObjectUrl,
|
||||
const thumbnail = {
|
||||
objectUrl: util.gifObjectUrl,
|
||||
};
|
||||
|
||||
const outgoing = new Whisper.Message({
|
||||
|
@ -317,8 +316,8 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
|
|||
}),
|
||||
}));
|
||||
|
||||
outgoing.quotedMessage = quotedMessage;
|
||||
incoming.quotedMessage = quotedMessage;
|
||||
outgoing.quoteThumbnail = thumbnail;
|
||||
incoming.quoteThumbnail = thumbnail;
|
||||
|
||||
const View = Whisper.MessageView;
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
|
@ -375,8 +374,8 @@ const View = Whisper.MessageView;
|
|||
#### Video with caption
|
||||
|
||||
```jsx
|
||||
const quotedMessage = {
|
||||
imageUrl: util.gifObjectUrl,
|
||||
const thumbnail = {
|
||||
objectUrl: util.gifObjectUrl,
|
||||
};
|
||||
|
||||
const outgoing = new Whisper.Message({
|
||||
|
@ -406,8 +405,8 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
|
|||
}),
|
||||
}));
|
||||
|
||||
outgoing.quotedMessage = quotedMessage;
|
||||
incoming.quotedMessage = quotedMessage;
|
||||
outgoing.quoteThumbnail = thumbnail;
|
||||
incoming.quoteThumbnail = thumbnail;
|
||||
|
||||
const View = Whisper.MessageView;
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
|
@ -425,8 +424,8 @@ const View = Whisper.MessageView;
|
|||
#### Video
|
||||
|
||||
```jsx
|
||||
const quotedMessage = {
|
||||
imageUrl: util.gifObjectUrl,
|
||||
const thumbnail = {
|
||||
objectUrl: util.gifObjectUrl,
|
||||
};
|
||||
|
||||
const outgoing = new Whisper.Message({
|
||||
|
@ -456,8 +455,8 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
|
|||
}),
|
||||
}));
|
||||
|
||||
outgoing.quotedMessage = quotedMessage;
|
||||
incoming.quotedMessage = quotedMessage;
|
||||
outgoing.quoteThumbnail = thumbnail;
|
||||
incoming.quoteThumbnail = thumbnail;
|
||||
|
||||
const View = Whisper.MessageView;
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
|
|
|
@ -95,7 +95,7 @@ export class Quote extends React.Component<Props, {}> {
|
|||
if (Mime.isVideo(contentType)) {
|
||||
return objectUrl
|
||||
? this.renderImage(objectUrl, 'play')
|
||||
: this.renderIcon('play');
|
||||
: this.renderIcon('movie');
|
||||
}
|
||||
if (Mime.isImage(contentType)) {
|
||||
return objectUrl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue