mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: improve JetBrains error message to mention Toolbox requirement (#18294)
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
This commit is contained in:
co-authored by
kylecarbs
parent
98a9aa19ce
commit
2f59cd0c73
@@ -50,7 +50,19 @@ export const useAppLink = (
|
||||
// an error message will be displayed.
|
||||
const openAppExternallyFailedTimeout = 500;
|
||||
const openAppExternallyFailed = setTimeout(() => {
|
||||
displayError(`${label} must be installed first.`);
|
||||
// Check if this is a JetBrains IDE app
|
||||
const isJetBrainsApp =
|
||||
app.url &&
|
||||
(app.url.startsWith("jetbrains-gateway:") ||
|
||||
app.url.startsWith("jetbrains:"));
|
||||
|
||||
if (isJetBrainsApp) {
|
||||
displayError(
|
||||
`To use ${label}, you need to have JetBrains Toolbox installed.`,
|
||||
);
|
||||
} else {
|
||||
displayError(`${label} must be installed first.`);
|
||||
}
|
||||
}, openAppExternallyFailedTimeout);
|
||||
window.addEventListener("blur", () => {
|
||||
clearTimeout(openAppExternallyFailed);
|
||||
|
||||
Reference in New Issue
Block a user