1
0
mirror of https://github.com/hyperspacedev/hyperspace synced 2025-02-03 18:57:38 +01:00

Update About to work with admin name field for config

This commit is contained in:
Marquis Kurt 2019-04-08 15:47:41 -04:00
parent e79dd84545
commit 49e92c0d23
2 changed files with 5 additions and 3 deletions

View File

@ -11,8 +11,8 @@
"defaultInstance": "mastodon.social"
},
"admin": {
"name": "Marquis Kurt",
"account": "367895"
"name": "Hyperspace Developers",
"account": "774314"
},
"license": {
"name": "Apache 2.0 License",

View File

@ -34,6 +34,7 @@ interface IAboutPageState {
federated?: boolean;
developer?: boolean;
hyperspaceAdmin?: UAccount;
hyperspaceAdminName?: string;
versionNumber?: string;
brandName?: string;
license: License;
@ -69,6 +70,7 @@ class AboutPage extends Component<any, IAboutPageState> {
console.log(config);
this.setState({
hyperspaceAdmin: account,
hyperspaceAdminName: config.admin.name,
federated: config.federated? config.federated === "true": false,
developer: config.developer? config.developer === "true": false,
versionNumber: config.version,
@ -141,7 +143,7 @@ class AboutPage extends Component<any, IAboutPageState> {
<PersonIcon/>
</Avatar>
</ListItemAvatar>
<ListItemText primary="App provider" secondary={this.state.hyperspaceAdmin? (this.state.hyperspaceAdmin.display_name || "@" + this.state.hyperspaceAdmin.acct): "No provider set in config"}/>
<ListItemText primary="App provider" secondary={this.state.hyperspaceAdmin && this.state.hyperspaceAdminName? (this.state.hyperspaceAdminName || this.state.hyperspaceAdmin.display_name || "@" + this.state.hyperspaceAdmin.acct): "No provider set in config"}/>
<ListItemSecondaryAction>
<LinkableIconButton to={`/compose?visibility=${this.state.federated? "public": "private"}&acct=${this.state.hyperspaceAdmin? this.state.hyperspaceAdmin.acct: ""}`}>
<ChatIcon/>