Adjust main encryption toast to reference Secure Backup

This adjusts the main toast to focus on Secure Backup as suggested in designs.

Part of https://github.com/vector-im/element-web/issues/13895
This commit is contained in:
J. Ryan Stinnett 2020-09-16 13:57:23 +01:00
parent 550a53e49c
commit 7a5b0a964f
3 changed files with 22 additions and 8 deletions

View file

@ -28,7 +28,7 @@ const TOAST_KEY = "setupencryption";
const getTitle = (kind: Kind) => {
switch (kind) {
case Kind.SET_UP_ENCRYPTION:
return _t("Set up encryption");
return _t("Set up Secure Backup");
case Kind.UPGRADE_ENCRYPTION:
return _t("Encryption upgrade available");
case Kind.VERIFY_THIS_SESSION:
@ -36,10 +36,20 @@ const getTitle = (kind: Kind) => {
}
};
const getIcon = (kind: Kind) => {
switch (kind) {
case Kind.SET_UP_ENCRYPTION:
case Kind.UPGRADE_ENCRYPTION:
return "secure_backup";
case Kind.VERIFY_THIS_SESSION:
return "verification_warning";
}
};
const getSetupCaption = (kind: Kind) => {
switch (kind) {
case Kind.SET_UP_ENCRYPTION:
return _t("Set up");
return _t("Continue");
case Kind.UPGRADE_ENCRYPTION:
return _t("Upgrade");
case Kind.VERIFY_THIS_SESSION:
@ -51,7 +61,7 @@ const getDescription = (kind: Kind) => {
switch (kind) {
case Kind.SET_UP_ENCRYPTION:
case Kind.UPGRADE_ENCRYPTION:
return _t("Verify yourself & others to keep your chats safe");
return _t("Safeguard against losing access to encrypted messages & data");
case Kind.VERIFY_THIS_SESSION:
return _t("Other users may not trust it");
}
@ -88,7 +98,7 @@ export const showToast = (kind: Kind) => {
ToastStore.sharedInstance().addOrReplaceToast({
key: TOAST_KEY,
title: getTitle(kind),
icon: "verification_warning",
icon: getIcon(kind),
props: {
description: getDescription(kind),
acceptLabel: getSetupCaption(kind),