Update copy on some toasts

This commit is contained in:
Michael Telatynski 2020-11-02 17:25:56 +00:00
parent 0c14de3017
commit def02aec12
2 changed files with 9 additions and 9 deletions

View file

@ -29,15 +29,15 @@ const onReject = () => {
const TOAST_KEY = "desktopnotifications"; const TOAST_KEY = "desktopnotifications";
export const showToast = () => { export const showToast = (fromMessageSend: boolean) => {
ToastStore.sharedInstance().addOrReplaceToast({ ToastStore.sharedInstance().addOrReplaceToast({
key: TOAST_KEY, key: TOAST_KEY,
title: _t("Notifications"), title: fromMessageSend ? _t("Don't miss a reply") : _t("Notifications"),
props: { props: {
description: _t("You are not receiving desktop notifications"), description: _t("Enable desktop notifications"),
acceptLabel: _t("Enable them now"), acceptLabel: _t("Enable"),
onAccept, onAccept,
rejectLabel: _t("Close"), rejectLabel: _t("Dismiss"),
onReject, onReject,
}, },
component: GenericToast, component: GenericToast,

View file

@ -74,18 +74,18 @@ export const showToast = (version: string, newVersion: string, releaseNotes?: st
}; };
} else { } else {
onAccept = installUpdate; onAccept = installUpdate;
acceptLabel = _t("Restart"); acceptLabel = _t("Update");
} }
const brand = SdkConfig.get().brand; const brand = SdkConfig.get().brand;
ToastStore.sharedInstance().addOrReplaceToast({ ToastStore.sharedInstance().addOrReplaceToast({
key: TOAST_KEY, key: TOAST_KEY,
title: _t("Upgrade your %(brand)s", { brand }), title: _t("Update %(brand)s", { brand }),
props: { props: {
description: _t("A new version of %(brand)s is available!", { brand }), description: _t("New version of %(brand)s is available", { brand }),
acceptLabel, acceptLabel,
onAccept, onAccept,
rejectLabel: _t("Later"), rejectLabel: _t("Dismiss"),
onReject, onReject,
}, },
component: GenericToast, component: GenericToast,