Clean up cross-signing debug panel
parent
4417235d9e
commit
e87ff54eee
|
@ -102,28 +102,59 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
errorSection = <div className="error">{error.toString()}</div>;
|
errorSection = <div className="error">{error.toString()}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const enabled = (
|
||||||
|
crossSigningPublicKeysOnDevice &&
|
||||||
|
crossSigningPrivateKeysInStorage &&
|
||||||
|
secretStorageKeyInAccount
|
||||||
|
);
|
||||||
|
|
||||||
|
let summarisedStatus;
|
||||||
|
if (enabled) {
|
||||||
|
summarisedStatus = <p>✅ {_t(
|
||||||
|
"Cross-signing and secret storage are enabled.",
|
||||||
|
)}</p>;
|
||||||
|
} else if (crossSigningPrivateKeysInStorage) {
|
||||||
|
summarisedStatus = <p>{_t(
|
||||||
|
"Your account has a cross-signing identity in secret storage, but it " +
|
||||||
|
"is not yet trusted by this device.",
|
||||||
|
)}</p>;
|
||||||
|
} else {
|
||||||
|
summarisedStatus = <p>{_t(
|
||||||
|
"Cross-signing and secret storage are not yet set up.",
|
||||||
|
)}</p>;
|
||||||
|
}
|
||||||
|
|
||||||
|
let bootstrapButton;
|
||||||
|
if (!enabled) {
|
||||||
|
bootstrapButton = <div className="mx_CrossSigningPanel_buttonRow">
|
||||||
|
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
|
||||||
|
{_t("Bootstrap cross-signing and secret storage")}
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<table className="mx_CrossSigningPanel_statusList"><tbody>
|
{summarisedStatus}
|
||||||
<tr>
|
<details>
|
||||||
<td>{_t("Cross-signing public keys:")}</td>
|
<summary>{_t("Advanced")}</summary>
|
||||||
<td>{crossSigningPublicKeysOnDevice ? _t("on device") : _t("not found")}</td>
|
<table className="mx_CrossSigningPanel_statusList"><tbody>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{_t("Cross-signing public keys:")}</td>
|
||||||
<td>{_t("Cross-signing private keys:")}</td>
|
<td>{crossSigningPublicKeysOnDevice ? _t("on device") : _t("not found")}</td>
|
||||||
<td>{crossSigningPrivateKeysInStorage ? _t("in secret storage") : _t("not found")}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{_t("Cross-signing private keys:")}</td>
|
||||||
<td>{_t("Secret storage public key:")}</td>
|
<td>{crossSigningPrivateKeysInStorage ? _t("in secret storage") : _t("not found")}</td>
|
||||||
<td>{secretStorageKeyInAccount ? _t("in account data") : _t("not found")}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</tbody></table>
|
<td>{_t("Secret storage public key:")}</td>
|
||||||
<div className="mx_CrossSigningPanel_buttonRow">
|
<td>{secretStorageKeyInAccount ? _t("in account data") : _t("not found")}</td>
|
||||||
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
|
</tr>
|
||||||
{_t("Bootstrap Secure Secret Storage")}
|
</tbody></table>
|
||||||
</AccessibleButton>
|
</details>
|
||||||
</div>
|
|
||||||
{errorSection}
|
{errorSection}
|
||||||
|
{bootstrapButton}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,6 +496,10 @@
|
||||||
"New Password": "New Password",
|
"New Password": "New Password",
|
||||||
"Confirm password": "Confirm password",
|
"Confirm password": "Confirm password",
|
||||||
"Change Password": "Change Password",
|
"Change Password": "Change Password",
|
||||||
|
"Cross-signing and secret storage are enabled.": "Cross-signing and secret storage are enabled.",
|
||||||
|
"Your account has a cross-signing identity in secret storage, but it is not yet trusted by this device.": "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this device.",
|
||||||
|
"Cross-signing and secret storage are not yet set up.": "Cross-signing and secret storage are not yet set up.",
|
||||||
|
"Bootstrap cross-signing and secret storage": "Bootstrap cross-signing and secret storage",
|
||||||
"Cross-signing public keys:": "Cross-signing public keys:",
|
"Cross-signing public keys:": "Cross-signing public keys:",
|
||||||
"on device": "on device",
|
"on device": "on device",
|
||||||
"not found": "not found",
|
"not found": "not found",
|
||||||
|
@ -503,7 +507,6 @@
|
||||||
"in secret storage": "in secret storage",
|
"in secret storage": "in secret storage",
|
||||||
"Secret storage public key:": "Secret storage public key:",
|
"Secret storage public key:": "Secret storage public key:",
|
||||||
"in account data": "in account data",
|
"in account data": "in account data",
|
||||||
"Bootstrap Secure Secret Storage": "Bootstrap Secure Secret Storage",
|
|
||||||
"Your homeserver does not support device management.": "Your homeserver does not support device management.",
|
"Your homeserver does not support device management.": "Your homeserver does not support device management.",
|
||||||
"Unable to load device list": "Unable to load device list",
|
"Unable to load device list": "Unable to load device list",
|
||||||
"Authentication": "Authentication",
|
"Authentication": "Authentication",
|
||||||
|
|
Loading…
Reference in New Issue