fix(routing): send /bridge to the Bridge download page

/bridge is the address the app hands to people who do not have the desktop
Bridge yet, but the only page under it is /bridge/connect — which pairs an
already-installed Bridge with a code. The bare path resolved to nothing.

It now forwards to opensquawk.de/bridge, where the download lives. The
classroom's experience switcher goes through it as well: picking Live ATC there
without a Bridge previously dropped the user into a cockpit with nothing
attached.

The two links that really do mean the pairing screen — the cockpit's "Connect
simulator" hint and the pairing screen's own post-login redirect — now name
/bridge/connect instead of relying on /bridge to land there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
itsrubberduck
2026-07-30 19:03:10 +02:00
parent 811e1cbe2b
commit 099bccf5c5
4 changed files with 11 additions and 8 deletions

View File

@@ -250,7 +250,7 @@ onMounted(() => {
location="bottom"
>
<template #activator="{ props: tip }">
<NuxtLink class="bridge-connect-hint" to="/bridge" v-bind="tip">
<NuxtLink class="bridge-connect-hint" to="/bridge/connect" v-bind="tip">
<v-icon size="15">mdi-bridge</v-icon>
<span class="bridge-connect-hint-label">Connect simulator</span>
</NuxtLink>

View File

@@ -326,7 +326,7 @@ const token = computed(() => {
const hasToken = computed(() => token.value.length >= 6)
const manualTokenReady = computed(() => manualTokenInput.value.length === 6)
const loginTarget = computed(() => `/login?redirect=${encodeURIComponent(route.fullPath || '/bridge')}`)
const loginTarget = computed(() => `/login?redirect=${encodeURIComponent(route.fullPath || '/bridge/connect')}`)
const authDisplayName = computed(() => {
if (!user.value) return ''

View File

@@ -1,14 +1,17 @@
<script setup lang="ts">
// /bridge is the address everything points at — the Live ATC card on the front
// page, the cockpit's "connect a bridge" hint, and the post-login redirect the
// pairing screen builds for itself. The page behind it is /bridge/connect, so
// the bare path resolved to nothing and every one of those links 404'd.
// /bridge is where the app sends anyone who does not have the desktop Bridge
// yet — the Live ATC card on the front page and the experience switcher in the
// classroom. There is no page for it here (only /bridge/connect, which pairs an
// already-installed Bridge with a code), so the bare path resolved to nothing
// and those links 404'd. The download lives on the website, so forward there.
const BRIDGE_DOWNLOAD_URL = 'https://opensquawk.de/bridge'
definePageMeta({
layout: false,
// Redirect from middleware, not from setup: an `await navigateTo()` in setup
// suspends the first render and the navigation aborts it, leaving the URL
// changed and the screen blank until a reload (see /start and /login).
middleware: [to => navigateTo({ path: '/bridge/connect', query: to.query }, { replace: true })],
middleware: [() => navigateTo(BRIDGE_DOWNLOAD_URL, { external: true, replace: true })],
})
</script>

View File

@@ -32,7 +32,7 @@
<v-icon size="16" class="experience-option-check">mdi-check</v-icon>
</div>
<NuxtLink
to="/live-atc"
to="/bridge"
role="menuitemradio"
class="experience-option"
aria-checked="false"