feat(live-atc): manual flight entry on setup screen

Adds a "Manual flight" card alongside VATSIM and demo so a flight can
be entered by hand (callsign, dep, arr, optional aircraft/altitude)
without a VATSIM account. Feeds into the same scenario picker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
itsrubberduck
2026-07-19 19:37:53 +02:00
parent a53442b1d1
commit 9eb670c0c4
3 changed files with 128 additions and 1 deletions

View File

@@ -713,6 +713,24 @@ export function useLiveAtcSession(
currentScreen.value = 'scenario'
}
/** Start from a manually entered flight instead of VATSIM / demo. */
const startManualFlight = (plan: {
callsign: string
dep: string
arr: string
aircraft?: string
altitude?: string
}) => {
selectedPlan.value = {
callsign: plan.callsign.trim().toUpperCase(),
aircraft: plan.aircraft?.trim().toUpperCase() || 'A320/L',
dep: plan.dep.trim().toUpperCase(),
arr: plan.arr.trim().toUpperCase(),
altitude: plan.altitude?.trim() || '36000',
}
currentScreen.value = 'scenario'
}
/** Launch a specific scenario with the current flight plan. */
const launchScenario = async (scenario: Scenario) => {
if (!selectedPlan.value) return
@@ -833,6 +851,7 @@ export function useLiveAtcSession(
loadFlightPlans,
startMonitoring,
startDemoFlight,
startManualFlight,
launchScenario,
flyAgain,
backToSetup,