Merge pull request #70 from bleonard252-forks/pleroma-support

Pleroma support (fixes #69)
This commit is contained in:
Marquis Kurt 2019-08-25 13:20:27 -04:00 committed by GitHub
commit b7e45a4373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -102,6 +102,7 @@ class AboutPage extends Component<any, IAboutPageState> {
render() {
const { classes } = this.props;
return (
<div className={classes.pageLayoutConstraints}>
<Paper>
@ -117,7 +118,7 @@ class AboutPage extends Component<any, IAboutPageState> {
<Typography className={classes.instanceHeaderText} variant="h4" component="p">{this.state.instance ? this.state.instance.uri: "Loading..."}</Typography>
</div>
<List className={classes.pageListConstraints}>
<ListItem>
{(localStorage['isPleroma'] == "false") && <ListItem>
<ListItemAvatar>
<LinkableAvatar to={`/profile/${this.state.instance? this.state.instance.contact_account.id: 0}`} alt="Instance admin" src={this.state.instance? this.state.instance.contact_account.avatar_static: ""}/>
</ListItemAvatar>
@ -137,7 +138,7 @@ class AboutPage extends Component<any, IAboutPageState> {
</LinkableIconButton>
</Tooltip>
</ListItemSecondaryAction>
</ListItem>
</ListItem>}
<ListItem>
<ListItemAvatar>
<Avatar>

View File

@ -15,4 +15,7 @@ export function refreshUserAccountData() {
}).catch((err: Error) => {
console.error(err.message);
});
client.get('/instance').then((resp: any) => {
localStorage.setItem('isPleroma', (resp.data.version.match(/Pleroma/) ? "true" : "false"))
})
}