mirror of https://github.com/vector-im/riot-web
Update copy on some toasts
parent
0c14de3017
commit
def02aec12
|
@ -29,15 +29,15 @@ const onReject = () => {
|
|||
|
||||
const TOAST_KEY = "desktopnotifications";
|
||||
|
||||
export const showToast = () => {
|
||||
export const showToast = (fromMessageSend: boolean) => {
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: TOAST_KEY,
|
||||
title: _t("Notifications"),
|
||||
title: fromMessageSend ? _t("Don't miss a reply") : _t("Notifications"),
|
||||
props: {
|
||||
description: _t("You are not receiving desktop notifications"),
|
||||
acceptLabel: _t("Enable them now"),
|
||||
description: _t("Enable desktop notifications"),
|
||||
acceptLabel: _t("Enable"),
|
||||
onAccept,
|
||||
rejectLabel: _t("Close"),
|
||||
rejectLabel: _t("Dismiss"),
|
||||
onReject,
|
||||
},
|
||||
component: GenericToast,
|
||||
|
|
|
@ -74,18 +74,18 @@ export const showToast = (version: string, newVersion: string, releaseNotes?: st
|
|||
};
|
||||
} else {
|
||||
onAccept = installUpdate;
|
||||
acceptLabel = _t("Restart");
|
||||
acceptLabel = _t("Update");
|
||||
}
|
||||
|
||||
const brand = SdkConfig.get().brand;
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: TOAST_KEY,
|
||||
title: _t("Upgrade your %(brand)s", { brand }),
|
||||
title: _t("Update %(brand)s", { brand }),
|
||||
props: {
|
||||
description: _t("A new version of %(brand)s is available!", { brand }),
|
||||
description: _t("New version of %(brand)s is available", { brand }),
|
||||
acceptLabel,
|
||||
onAccept,
|
||||
rejectLabel: _t("Later"),
|
||||
rejectLabel: _t("Dismiss"),
|
||||
onReject,
|
||||
},
|
||||
component: GenericToast,
|
||||
|
|
Loading…
Reference in New Issue