Show both bootstrap and reset cross-signing where appropriate
For cases like having keys on your account but not on the current device, this ensures we offer both bootstrap and reset as possible paths.
This commit is contained in:
parent
866fdd6185
commit
12e8ad8f6b
1 changed files with 20 additions and 12 deletions
|
@ -158,18 +158,27 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
)}</p>;
|
||||
}
|
||||
|
||||
let bootstrapButton;
|
||||
let resetButton;
|
||||
if (enabledForAccount) {
|
||||
bootstrapButton = (
|
||||
<AccessibleButton kind="danger" onClick={this._destroySecureSecretStorage}>
|
||||
{_t("Reset cross-signing and secret storage")}
|
||||
</AccessibleButton>
|
||||
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 = (
|
||||
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
|
||||
{_t("Bootstrap cross-signing and secret storage")}
|
||||
</AccessibleButton>
|
||||
<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>
|
||||
{bootstrapButton}
|
||||
{resetButton}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue