Merge pull request #62 from hyperspacedev/post-cards

Executive merge before release PR
This commit is contained in:
Marquis Kurt 2019-05-24 18:23:02 -04:00 committed by GitHub
commit 8256b06fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -84,6 +84,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
})
this.streamNotifications()
}
streamNotifications() {
@ -153,7 +154,7 @@ export class AppLayout extends Component<any, IAppLayoutState> {
}
searchForQuery(what: string) {
window.location.href = isDesktopApp? "hyperspace://hyperspace/app/index.html#/search?query=" + what: "/#/search?query=" + what;
window.location.href = isDesktopApp()? "hyperspace://hyperspace/app/index.html#/search?query=" + what: "/#/search?query=" + what;
window.location.reload;
}

View File

@ -151,10 +151,15 @@ export class Post extends React.Component<any, IPostState> {
<CardActionArea href={status.card.url} target="_blank" rel="noreferrer">
<CardContent>
<Typography gutterBottom variant="h6" component="h2">{status.card.title}</Typography>
<Typography>{status.card.description || "No description provided. Click with caution."}</Typography>
<Typography>
{
status.card.description.slice(0, 500) + (status.card.description.length > 500? "...": "")
|| "No description provided. Click with caution."
}
</Typography>
</CardContent>
{
status.card.image?
status.card.image && status.media_attachments.length <= 0?
<CardMedia className={classes.postMedia} image={status.card.image}/>: <span/>
}
<CardContent>