v1.6.0/scroll fix, thread styling, interactive system link message

This commit is contained in:
2020-08-04 23:50:03 -04:00
parent 1873f7606a
commit 55840f7c00
5 changed files with 49 additions and 12 deletions
+13 -1
View File
@@ -17,7 +17,7 @@ Hulu logo is a trademark and intellectual property of Hulu, LLC.
HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia Direct,LLC.
************************************************************************/
import React, { Component } from 'react';
import { Typography, IconButton, Paper, TextField, InputAdornment } from '@material-ui/core';
import { Typography, IconButton, Paper, TextField, InputAdornment, Button } from '@material-ui/core';
import { Reply, Send } from '@material-ui/icons';
import './Thread.css';
import { LocalData, webhookFetcher } from './Api';
@@ -99,6 +99,18 @@ export default class Thread extends Component {
</Paper>
);
}
if (msg.type === 'interactive/link') {
return (
<Paper elevation={0} className="thread-interactive-text">
<Typography className="thread-interactive-question" variant="overline">
{msg.text}
</Typography>
<Button className="thread-interactive-link" fullWidth target="_blank" href={msg.endpoint} color="secondary">
{msg.name}
</Button>
</Paper>
);
}
return <p>{msg.text}</p>;
}
getTimeString(time) {