From 12e8ad8f6bb8d4b68b61e165db104489cc2e2b19 Mon Sep 17 00:00:00 2001
From: "J. Ryan Stinnett"
Date: Tue, 25 Feb 2020 11:23:51 +0000
Subject: [PATCH] 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.
---
.../views/settings/CrossSigningPanel.js | 32 ++++++++++++-------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js
index aba2d03ad2..d583210c9a 100644
--- a/src/components/views/settings/CrossSigningPanel.js
+++ b/src/components/views/settings/CrossSigningPanel.js
@@ -158,18 +158,27 @@ export default class CrossSigningPanel extends React.PureComponent {
)}
;
}
- let bootstrapButton;
+ let resetButton;
if (enabledForAccount) {
- bootstrapButton = (
-
- {_t("Reset cross-signing and secret storage")}
-
+ resetButton = (
+
+
+ {_t("Reset cross-signing and secret storage")}
+
+
);
- } else if (!enabledForAccount && homeserverSupportsCrossSigning) {
+ }
+ let bootstrapButton;
+ if (
+ (!enabledForAccount || !crossSigningPublicKeysOnDevice) &&
+ homeserverSupportsCrossSigning
+ ) {
bootstrapButton = (
-
- {_t("Bootstrap cross-signing and secret storage")}
-
+
+
+ {_t("Bootstrap cross-signing and secret storage")}
+
+
);
}
@@ -198,9 +207,8 @@ export default class CrossSigningPanel extends React.PureComponent {
{errorSection}
-
- {bootstrapButton}
-
+ {bootstrapButton}
+ {resetButton}
);
}