Open local addresses section by default when there are no existing local addresses
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
91a88f25a8
commit
5ae1b1444f
1 changed files with 5 additions and 1 deletions
|
@ -134,6 +134,10 @@ export default class AliasSettings extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setState({ localAliases });
|
this.setState({ localAliases });
|
||||||
|
|
||||||
|
if (localAliases.length === 0) {
|
||||||
|
this.setState({ detailsOpen: true });
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.setState({ localAliasesLoading: false });
|
this.setState({ localAliasesLoading: false });
|
||||||
}
|
}
|
||||||
|
@ -388,7 +392,7 @@ export default class AliasSettings extends React.Component {
|
||||||
/>
|
/>
|
||||||
<span className='mx_SettingsTab_subheading mx_AliasSettings_localAliasHeader'>{_t("Local Addresses")}</span>
|
<span className='mx_SettingsTab_subheading mx_AliasSettings_localAliasHeader'>{_t("Local Addresses")}</span>
|
||||||
<p>{_t("Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", {localDomain})}</p>
|
<p>{_t("Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", {localDomain})}</p>
|
||||||
<details onToggle={this.onLocalAliasesToggled}>
|
<details onToggle={this.onLocalAliasesToggled} open={this.state.detailsOpen}>
|
||||||
<summary>{ this.state.detailsOpen ? _t('Show less') : _t("Show more")}</summary>
|
<summary>{ this.state.detailsOpen ? _t('Show less') : _t("Show more")}</summary>
|
||||||
{localAliasesList}
|
{localAliasesList}
|
||||||
</details>
|
</details>
|
||||||
|
|
Loading…
Reference in a new issue