From 8fbf57ef3cf47cf8dacc851d7ee4af87739f403a Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:39:33 -0700 Subject: [PATCH] Add Cannot_Update_Require_Manual dialog type Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- _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 75ff1cdbb..43f946e63 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1055,6 +1055,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 866d01c6d..9c98a65ee 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 (