From 55c5f15cd9000de4addb707f4c39514dfaec8096 Mon Sep 17 00:00:00 2001
From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Date: Wed, 6 Apr 2022 11:27:17 -0700
Subject: [PATCH] Add Cannot_Update_Require_Manual dialog type
---
_locales/en/messages.json | 14 +++++++++
ts/components/DialogUpdate.stories.tsx | 20 ++++++++++++
ts/components/DialogUpdate.tsx | 42 ++++++++++++++++++++++++++
ts/types/Dialogs.ts | 1 +
ts/updater/common.ts | 3 +-
5 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 9838748be4..6817aebcf5 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -1059,6 +1059,20 @@
}
}
},
+ "cannotUpdateRequireManualDetail": {
+ "message": "Signal couldn't update. Visit $url$ to install it manually. Then, $support$ about this problem",
+ "description": "Shown if a general error happened while trying to install update package and manual update is required",
+ "placeholders": {
+ "url": {
+ "content": "$2",
+ "example": "https://signal.org/download"
+ },
+ "support": {
+ "content": "$3",
+ "example": "contact support"
+ }
+ }
+ },
"readOnlyVolume": {
"message": "Signal Desktop is likely in a macOS quarantine, and will not be able to auto-update. Please try moving $app$ to $folder$ with Finder.",
"description": "Shown on MacOS if running on a read-only volume and we cannot update",
diff --git a/ts/components/DialogUpdate.stories.tsx b/ts/components/DialogUpdate.stories.tsx
index 866d01c6d4..9c98a65ee8 100644
--- a/ts/components/DialogUpdate.stories.tsx
+++ b/ts/components/DialogUpdate.stories.tsx
@@ -128,6 +128,26 @@ story.add('Knobs Playground', () => {
));
+ story.add(`Cannot Update & Require Manual (${name} container)`, () => (
+
+
+
+ ));
+
+ story.add(`Cannot Update & Require Manual Beta (${name} container)`, () => (
+
+
+
+ ));
+
story.add(`macOS RO Error (${name} container)`, () => (
+
+
+ {url}
+
+ ),
+ support: (
+
+ {i18n('autoUpdateContactSupport')}
+
+ ),
+ }}
+ i18n={i18n}
+ id="cannotUpdateRequireManualDetail"
+ />
+
+
+ );
+ }
+
if (dialogType === DialogType.MacOS_Read_Only) {
return (