Merge pull request #123 from hyperspacedev/1.0.3-pleroma-about-fix
[HD-17] Fix Pleroma about page blank regression
This commit is contained in:
commit
a2a9edcb5b
|
@ -22,12 +22,6 @@ if (userLoggedIn()) {
|
|||
refreshUserAccountData();
|
||||
}
|
||||
|
||||
window.onstorage = (event: any) => {
|
||||
if (event.key == "account") {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<HashRouter>
|
||||
<SnackbarProvider
|
||||
|
|
|
@ -23,11 +23,9 @@ import AssignmentIcon from "@material-ui/icons/Assignment";
|
|||
import AssignmentIndIcon from "@material-ui/icons/AssignmentInd";
|
||||
import NetworkCheckIcon from "@material-ui/icons/NetworkCheck";
|
||||
import UpdateIcon from "@material-ui/icons/Update";
|
||||
import InfoIcon from "@material-ui/icons/Info";
|
||||
import NotesIcon from "@material-ui/icons/Notes";
|
||||
import CodeIcon from "@material-ui/icons/Code";
|
||||
import TicketAccountIcon from "mdi-material-ui/TicketAccount";
|
||||
import MastodonIcon from "mdi-material-ui/Mastodon";
|
||||
import EditIcon from "@material-ui/icons/Edit";
|
||||
import VpnKeyIcon from "@material-ui/icons/VpnKey";
|
||||
|
||||
|
@ -107,9 +105,16 @@ class AboutPage extends Component<any, IAboutPageState> {
|
|||
});
|
||||
}
|
||||
|
||||
shouldRenderInstanceContact(): boolean {
|
||||
if (this.state.instance != null) {
|
||||
return this.state.instance.version.match(/Pleroma/) == null;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { classes } = this.props;
|
||||
|
||||
return (
|
||||
<div className={classes.pageLayoutConstraints}>
|
||||
<Paper>
|
||||
|
@ -297,7 +302,7 @@ class AboutPage extends Component<any, IAboutPageState> {
|
|||
</div>
|
||||
</div>
|
||||
<List className={classes.pageListConstraints}>
|
||||
{localStorage["isPleroma"] == "false" && (
|
||||
{this.shouldRenderInstanceContact() ? (
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<LinkableAvatar
|
||||
|
@ -352,7 +357,7 @@ class AboutPage extends Component<any, IAboutPageState> {
|
|||
</Tooltip>
|
||||
</ListItemSecondaryAction>
|
||||
</ListItem>
|
||||
)}
|
||||
) : null}
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar>
|
||||
|
|
|
@ -25,12 +25,6 @@ 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"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue