You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
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:
@@ -158,18 +158,27 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||||||
)}</p>;
|
)}</p>;
|
||||||
}
|
}
|
||||||
|
|
||||||
let bootstrapButton;
|
let resetButton;
|
||||||
if (enabledForAccount) {
|
if (enabledForAccount) {
|
||||||
bootstrapButton = (
|
resetButton = (
|
||||||
|
<div className="mx_CrossSigningPanel_buttonRow">
|
||||||
<AccessibleButton kind="danger" onClick={this._destroySecureSecretStorage}>
|
<AccessibleButton kind="danger" onClick={this._destroySecureSecretStorage}>
|
||||||
{_t("Reset cross-signing and secret storage")}
|
{_t("Reset cross-signing and secret storage")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
} else if (!enabledForAccount && homeserverSupportsCrossSigning) {
|
}
|
||||||
|
let bootstrapButton;
|
||||||
|
if (
|
||||||
|
(!enabledForAccount || !crossSigningPublicKeysOnDevice) &&
|
||||||
|
homeserverSupportsCrossSigning
|
||||||
|
) {
|
||||||
bootstrapButton = (
|
bootstrapButton = (
|
||||||
|
<div className="mx_CrossSigningPanel_buttonRow">
|
||||||
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
|
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
|
||||||
{_t("Bootstrap cross-signing and secret storage")}
|
{_t("Bootstrap cross-signing and secret storage")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,9 +207,8 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||||||
</tbody></table>
|
</tbody></table>
|
||||||
</details>
|
</details>
|
||||||
{errorSection}
|
{errorSection}
|
||||||
<div className="mx_CrossSigningPanel_buttonRow">
|
|
||||||
{bootstrapButton}
|
{bootstrapButton}
|
||||||
</div>
|
{resetButton}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user