Commit 011cec4
fix: load SortableJS locally via UseLocalAssets pattern
SortableJS was loaded as an ES module from CDN via sortable-loader.js,
which was blocked by CSP in local asset mode. This caused "Sortable not
loaded!" errors preventing sidebar nav reordering and dashboard editing.
- Add SortableJS UMD build to base.templ UseLocalAssets conditional
- Remove sortable-loader.js module script from base.templ and dashboard_editor.templ
- Simplify editor.js Sortable check (no longer needs async event listener)
- Add SortableJS to Makefile dev-assets download target
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 9f943d5 commit 011cec4
4 files changed
Lines changed: 7 additions & 12 deletions
File tree
- gearbox
- internal/framework/templates
- layouts
- pages
- static/js/dashboard
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
813 | | - | |
814 | | - | |
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 34 | + | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
0 commit comments