Add Cannot_Update_Require_Manual dialog type
This commit is contained in:
parent
6ddf7b913a
commit
55c5f15cd9
5 changed files with 79 additions and 1 deletions
|
@ -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": {
|
"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.",
|
"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",
|
"description": "Shown on MacOS if running on a read-only volume and we cannot update",
|
||||||
|
|
|
@ -128,6 +128,26 @@ story.add('Knobs Playground', () => {
|
||||||
</FakeLeftPaneContainer>
|
</FakeLeftPaneContainer>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
story.add(`Cannot Update & Require Manual (${name} container)`, () => (
|
||||||
|
<FakeLeftPaneContainer containerWidthBreakpoint={containerWidthBreakpoint}>
|
||||||
|
<DialogUpdate
|
||||||
|
{...defaultPropsForBreakpoint}
|
||||||
|
dialogType={DialogType.Cannot_Update_Require_Manual}
|
||||||
|
currentVersion="5.24.0"
|
||||||
|
/>
|
||||||
|
</FakeLeftPaneContainer>
|
||||||
|
));
|
||||||
|
|
||||||
|
story.add(`Cannot Update & Require Manual Beta (${name} container)`, () => (
|
||||||
|
<FakeLeftPaneContainer containerWidthBreakpoint={containerWidthBreakpoint}>
|
||||||
|
<DialogUpdate
|
||||||
|
{...defaultPropsForBreakpoint}
|
||||||
|
dialogType={DialogType.Cannot_Update_Require_Manual}
|
||||||
|
currentVersion="5.24.0-beta.1"
|
||||||
|
/>
|
||||||
|
</FakeLeftPaneContainer>
|
||||||
|
));
|
||||||
|
|
||||||
story.add(`macOS RO Error (${name} container)`, () => (
|
story.add(`macOS RO Error (${name} container)`, () => (
|
||||||
<FakeLeftPaneContainer containerWidthBreakpoint={containerWidthBreakpoint}>
|
<FakeLeftPaneContainer containerWidthBreakpoint={containerWidthBreakpoint}>
|
||||||
<DialogUpdate
|
<DialogUpdate
|
||||||
|
|
|
@ -108,6 +108,48 @@ export const DialogUpdate = ({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dialogType === DialogType.Cannot_Update_Require_Manual) {
|
||||||
|
const url = isBeta(currentVersion)
|
||||||
|
? BETA_DOWNLOAD_URL
|
||||||
|
: PRODUCTION_DOWNLOAD_URL;
|
||||||
|
return (
|
||||||
|
<LeftPaneDialog
|
||||||
|
containerWidthBreakpoint={containerWidthBreakpoint}
|
||||||
|
type="warning"
|
||||||
|
title={i18n('cannotUpdate')}
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
<Intl
|
||||||
|
components={{
|
||||||
|
url: (
|
||||||
|
<a
|
||||||
|
key="signal-download"
|
||||||
|
href={url}
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{url}
|
||||||
|
</a>
|
||||||
|
),
|
||||||
|
support: (
|
||||||
|
<a
|
||||||
|
key="signal-support"
|
||||||
|
href="https://support.signal.org/hc/en-us/requests/new?desktop"
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{i18n('autoUpdateContactSupport')}
|
||||||
|
</a>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
i18n={i18n}
|
||||||
|
id="cannotUpdateRequireManualDetail"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</LeftPaneDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (dialogType === DialogType.MacOS_Read_Only) {
|
if (dialogType === DialogType.MacOS_Read_Only) {
|
||||||
return (
|
return (
|
||||||
<LeftPaneDialog
|
<LeftPaneDialog
|
||||||
|
|
|
@ -7,6 +7,7 @@ export enum DialogType {
|
||||||
None = 'None',
|
None = 'None',
|
||||||
Update = 'Update',
|
Update = 'Update',
|
||||||
Cannot_Update = 'Cannot_Update',
|
Cannot_Update = 'Cannot_Update',
|
||||||
|
Cannot_Update_Require_Manual = 'Cannot_Update_Require_Manual',
|
||||||
MacOS_Read_Only = 'MacOS_Read_Only',
|
MacOS_Read_Only = 'MacOS_Read_Only',
|
||||||
DownloadReady = 'DownloadReady',
|
DownloadReady = 'DownloadReady',
|
||||||
FullDownloadReady = 'FullDownloadReady',
|
FullDownloadReady = 'FullDownloadReady',
|
||||||
|
|
|
@ -363,7 +363,8 @@ export abstract class Updater {
|
||||||
if (parsedYaml.requireManualUpdate) {
|
if (parsedYaml.requireManualUpdate) {
|
||||||
this.logger.warn('checkForUpdates: manual update required');
|
this.logger.warn('checkForUpdates: manual update required');
|
||||||
this.markCannotUpdate(
|
this.markCannotUpdate(
|
||||||
new Error('yaml file has requireManualUpdate flag')
|
new Error('yaml file has requireManualUpdate flag'),
|
||||||
|
DialogType.Cannot_Update_Require_Manual
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue