tree.ts
typescript
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
5 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
3 commits
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
5 days ago
sha256:3fadb0439bba9451b89229676971c0d4a40900dec7810e9d5f8791b8d950d505
fix: install.sh version from latest published tarball, not …
Sonnet 4.6
minor
⚠
96 days ago
sha256:763eb2cb8675073b84c19345b27586d2ed939a9aee97c5479b69f502f1a70eff
fix(tests): update test suite to match current implementation
Sonnet 4.6
patch
118 days ago