1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Merge pull request #4124 from matrix-org/jryans/show-bootstrap-more

Show both bootstrap and reset cross-signing where appropriate
This commit is contained in:
J. Ryan Stinnett
2020-02-25 17:29:31 +00:00
committed by GitHub

View File

@@ -158,18 +158,27 @@ export default class CrossSigningPanel extends React.PureComponent {
)}</p>;
}
let bootstrapButton;
let resetButton;
if (enabledForAccount) {
bootstrapButton = (
resetButton = (
<div className="mx_CrossSigningPanel_buttonRow">
<AccessibleButton kind="danger" onClick={this._destroySecureSecretStorage}>
{_t("Reset cross-signing and secret storage")}
</AccessibleButton>
</div>
);
} else if (!enabledForAccount && homeserverSupportsCrossSigning) {
}
let bootstrapButton;
if (
(!enabledForAccount || !crossSigningPublicKeysOnDevice) &&
homeserverSupportsCrossSigning
) {
bootstrapButton = (
<div className="mx_CrossSigningPanel_buttonRow">
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
{_t("Bootstrap cross-signing and secret storage")}
</AccessibleButton>
</div>
);
}
@@ -198,9 +207,8 @@ export default class CrossSigningPanel extends React.PureComponent {
</tbody></table>
</details>
{errorSection}
<div className="mx_CrossSigningPanel_buttonRow">
{bootstrapButton}
</div>
{resetButton}
</div>
);
}