Skip to content

Commit 4e28be4

Browse files
committed
Add a link to system requirements to message box
1 parent 7bb19d2 commit 4e28be4

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

packages/compass/src/main/auto-update-manager.ts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,26 @@ const checkForUpdates: StateEnterAction = async function checkForUpdates(
184184
updateManager.setState(AutoUpdateManagerState.UpdateAvailable, updateInfo);
185185
} else {
186186
if (fromState === AutoUpdateManagerState.UserPromptedManualCheck) {
187-
void dialog.showMessageBox({
188-
icon: COMPASS_ICON,
189-
message:
190-
updateInfo.reason === 'outdated-operating-system'
191-
? `The version of your operating system is no longer supported. Expected at least ${updateInfo.expectedVersion}`
192-
: 'There are currently no updates available.',
193-
});
187+
if (updateInfo.reason === 'outdated-operating-system') {
188+
void dialog
189+
.showMessageBox({
190+
icon: COMPASS_ICON,
191+
message: `The version of your operating system is no longer supported. Expected at least ${updateInfo.expectedVersion}.`,
192+
buttons: ['OK', 'Visit Documentation on System Requirements'],
193+
})
194+
.then(async (value) => {
195+
if (value.response === 1) {
196+
await shell.openExternal(
197+
'https://www.mongodb.com/docs/compass/current/install/'
198+
);
199+
}
200+
});
201+
} else {
202+
void dialog.showMessageBox({
203+
icon: COMPASS_ICON,
204+
message: 'There are currently no updates available.',
205+
});
206+
}
194207
}
195208

196209
if (updateInfo.reason === 'outdated-operating-system') {

0 commit comments

Comments
 (0)