mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-07 18:15:49 +08:00
feat(classroom): add TrackDef type and wrap existing modules into core track
Adds TrackDef type to shared/learn/types.ts and creates learnTracks export in learnModules.ts with existing 4 modules grouped under 'Core Flight Missions' track. Backward compatible — learnModules flat array still exported. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createBaseScenario, createScenarioSeries, digitsToWords, formatTemp, lettersToNato } from '~~/shared/learn/scenario'
|
||||
import type { ModuleDef, Scenario } from '~~/shared/learn/types'
|
||||
import type { ModuleDef, Scenario, TrackDef } from '~~/shared/learn/types'
|
||||
|
||||
function gradientArt(colors: string[]): string {
|
||||
const stops = colors
|
||||
@@ -3292,4 +3292,13 @@ export const learnModules: ModuleDef[] = [
|
||||
}
|
||||
]
|
||||
|
||||
export const learnTracks: TrackDef[] = [
|
||||
{
|
||||
id: 'core',
|
||||
title: 'Core Flight Missions',
|
||||
subtitle: 'From basics to full flight',
|
||||
modules: learnModules,
|
||||
},
|
||||
]
|
||||
|
||||
export default learnModules
|
||||
|
||||
@@ -184,3 +184,10 @@ export type ModuleDef = {
|
||||
lessons: Lesson[]
|
||||
meta?: ModuleMeta
|
||||
}
|
||||
|
||||
export type TrackDef = {
|
||||
id: string
|
||||
title: string
|
||||
subtitle: string
|
||||
modules: ModuleDef[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user