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:
parent
e79dd84545
commit
49e92c0d23
@ -11,8 +11,8 @@
|
||||
"defaultInstance": "mastodon.social"
|
||||
},
|
||||
"admin": {
|
||||
"name": "Marquis Kurt",
|
||||
"account": "367895"
|
||||
"name": "Hyperspace Developers",
|
||||
"account": "774314"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0 License",
|
||||
|
@ -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/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user