Put backup details in a table

pull/21833/head
J. Ryan Stinnett 2020-09-04 14:09:34 +01:00
parent 217f145910
commit 2fbb551035
3 changed files with 36 additions and 8 deletions

View File

@ -35,3 +35,15 @@ limitations under the License.
.mx_SecureBackupPanel_buttonRow { .mx_SecureBackupPanel_buttonRow {
margin: 1em 0; margin: 1em 0;
} }
.mx_SecureBackupPanel_statusList {
border-spacing: 0;
td {
padding: 0;
&:first-of-type {
padding-inline-end: 1em;
}
}
}

View File

@ -174,6 +174,7 @@ export default class SecureBackupPanel extends React.PureComponent {
} = this.state; } = this.state;
let statusDescription; let statusDescription;
let extraDetailsTableRows;
let extraDetails; let extraDetails;
let actions; let actions;
if (error) { if (error) {
@ -316,9 +317,18 @@ export default class SecureBackupPanel extends React.PureComponent {
</AccessibleButton>; </AccessibleButton>;
} }
extraDetailsTableRows = <>
<tr>
<td>{_t("Backup version:")}</td>
<td>{backupInfo.version}</td>
</tr>
<tr>
<td>{_t("Algorithm:")}</td>
<td>{backupInfo.algorithm}</td>
</tr>
</>;
extraDetails = <> extraDetails = <>
<div>{_t("Backup version: ")}{backupInfo.version}</div>
<div>{_t("Algorithm: ")}{backupInfo.algorithm}</div>
{uploadStatus} {uploadStatus}
<div>{backupSigStatuses}</div> <div>{backupSigStatuses}</div>
<div>{trustedLocally}</div> <div>{trustedLocally}</div>
@ -359,9 +369,15 @@ export default class SecureBackupPanel extends React.PureComponent {
{statusDescription} {statusDescription}
<details> <details>
<summary>{_t("Advanced")}</summary> <summary>{_t("Advanced")}</summary>
<div>{_t("Backup key stored: ")}{ <table className="mx_SecureBackupPanel_statusList"><tbody>
<tr>
<td>{_t("Backup key stored:")}</td>
<td>{
backupKeyStored === true ? _t("in secret storage") : _t("not stored") backupKeyStored === true ? _t("in secret storage") : _t("not stored")
}</div> }</td>
</tr>
{extraDetailsTableRows}
</tbody></table>
{extraDetails} {extraDetails}
</details> </details>
{actions} {actions}