tree.ts
typescript
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8
docs: add production launch discovery report and infra laun…
Sonnet 5
8 days ago
| 1 | /** |
| 2 | * tree.ts — File tree browser page module. |
| 3 | * |
| 4 | * The tree is fully SSR'd. This module only handles the branch selector |
| 5 | * navigation, which requires JS to redirect on change. |
| 6 | * |
| 7 | * Registered as: window.MusePages['tree'] |
| 8 | */ |
| 9 | |
| 10 | export function initTree(data: Record<string, unknown>): void { |
| 11 | const base = String(data.base ?? ''); |
| 12 | const dirPath = String(data.dir_path ?? ''); |
| 13 | const pathSuffix = dirPath ? '/' + dirPath : ''; |
| 14 | |
| 15 | const sel = document.getElementById('branch-sel') as HTMLSelectElement | null; |
| 16 | sel?.addEventListener('change', () => { |
| 17 | window.location.href = base + '/tree/' + encodeURIComponent(sel.value) + pathSuffix; |
| 18 | }); |
| 19 | } |
File History
2 commits
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8
docs: add production launch discovery report and infra laun…
Sonnet 5
8 days ago
sha256:eb0928124669c933c0ef852bea1ad0c56649cf21bd7e9663c3b51004771b0591
docs: add MuseHub cloud identity/AWS operating model and Go…
Sonnet 5
patch
9 days ago