fix(site/src/modules/apps): distinguish JB Toolbox from Gateway (#20830)

Edits the "To use <APP>, you need to have Jetbrains Toolbox installed"
error message to vary based on JetBrains Toolbox vs. Gateway.

---------

Co-authored-by: Jake Howell <jake@hwll.me>
This commit is contained in:
Phorcys
2025-11-20 09:54:42 +00:00
committed by GitHub
co-authored by Jake Howell
parent 007f2df079
commit 426cc98f7c
+9 -5
View File
@@ -58,15 +58,19 @@ export const useAppLink = (
const openAppExternallyFailedTimeout = 500;
const openAppExternallyFailed = setTimeout(() => {
// Check if this is a JetBrains IDE app
const isJetBrainsApp =
app.url &&
(app.url.startsWith("jetbrains-gateway:") ||
app.url.startsWith("jetbrains:"));
// starts with "jetbrains-gateway://connect#type=coder" (from https://registry.coder.com/modules/coder/jetbrains-gateway)
const isJetBrainsGateway = app.url?.startsWith("jetbrains-gateway:");
// starts with "jetbrains://gateway/coder" (from https://registry.coder.com/modules/coder/jetbrains)
const isJetBrainsToolbox = app.url?.startsWith("jetbrains:");
// Check if this is a coder:// URL
const isCoderApp = app.url?.startsWith("coder:");
if (isJetBrainsApp) {
if (isJetBrainsGateway) {
displayError(
`To use ${label}, you need to have JetBrains Gateway installed.`,
);
} else if (isJetBrainsToolbox) {
displayError(
`To use ${label}, you need to have JetBrains Toolbox installed.`,
);