Commit f4c76fb
committed
feat: add multi-source payload repository support
- Add MULTI_SOURCES_ENABLED config flag with toggle in Settings
- New "Manage Sources" view: add/remove/reorder third-party payload sources
via URL; default source is locked and non-removable
- Source JSON format: top-level `name` field sets display name; falls back
to hostname extraction if absent; checksums are optional
- PS5 mode shows QR code + URL for Manage Sources; desktop shows full list UI
- Source removal uses shared confirm modal; reorder auto-saves with toast
- Backend (payload_mgr.c):
- CRUD for sources list persisted to /data/pldmgr/sources.json
- Multi-source repository list/install routes; each source has its
own independent payload catalog
- Bounded name parsing: only searches before "payloads" key to avoid
capturing payload item names; domain fallback when name absent
- list_payloads response now includes `meta` map: walks
PAYLOADS_STORAGE_DIR subdirectories for .elf/.bin/.lua sidecar
files and emits source_name per payload
- Fallback for pre-feature sidecars: extracts hostname from
install_source_detail, skipping the official repository URL
- Frontend: source badge (Globe icon + name) shown in bottom-right corner
of each payload card on Dashboard and Management tab when
MULTI_SOURCES_ENABLED is on and payload has a non-default source
- StorageHub: accordion-style per-source catalogs when multi-source enabled
- showConfirm helper in App.jsx auto-closes modal before executing callback1 parent 72e7818 commit f4c76fb
11 files changed
Lines changed: 1643 additions & 117 deletions
File tree
- frontend
- src
- components
- ui
- views
- include
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
93 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
94 | 125 | | |
95 | 126 | | |
96 | 127 | | |
| |||
103 | 134 | | |
104 | 135 | | |
105 | 136 | | |
106 | | - | |
| 137 | + | |
| 138 | + | |
107 | 139 | | |
108 | 140 | | |
109 | 141 | | |
110 | 142 | | |
| 143 | + | |
111 | 144 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
115 | 161 | | |
116 | 162 | | |
117 | 163 | | |
118 | 164 | | |
119 | 165 | | |
120 | 166 | | |
121 | 167 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
125 | 184 | | |
126 | 185 | | |
127 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
128 | 221 | | |
129 | 222 | | |
130 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
| |||
107 | 122 | | |
108 | 123 | | |
109 | 124 | | |
110 | | - | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| |||
116 | 130 | | |
117 | 131 | | |
118 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| |||
158 | 176 | | |
159 | 177 | | |
160 | 178 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
167 | 183 | | |
168 | 184 | | |
169 | 185 | | |
| |||
172 | 188 | | |
173 | 189 | | |
174 | 190 | | |
175 | | - | |
| 191 | + | |
176 | 192 | | |
177 | 193 | | |
178 | 194 | | |
| |||
218 | 234 | | |
219 | 235 | | |
220 | 236 | | |
221 | | - | |
| 237 | + | |
222 | 238 | | |
223 | 239 | | |
224 | 240 | | |
225 | 241 | | |
226 | 242 | | |
227 | | - | |
| 243 | + | |
228 | 244 | | |
229 | 245 | | |
230 | | - | |
| 246 | + | |
231 | 247 | | |
232 | 248 | | |
233 | 249 | | |
234 | | - | |
| 250 | + | |
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
238 | 254 | | |
239 | | - | |
240 | | - | |
241 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
242 | 259 | | |
243 | 260 | | |
244 | 261 | | |
| |||
496 | 513 | | |
497 | 514 | | |
498 | 515 | | |
499 | | - | |
| 516 | + | |
500 | 517 | | |
501 | 518 | | |
502 | 519 | | |
503 | 520 | | |
504 | 521 | | |
| 522 | + | |
505 | 523 | | |
506 | 524 | | |
507 | 525 | | |
| |||
512 | 530 | | |
513 | 531 | | |
514 | 532 | | |
| 533 | + | |
515 | 534 | | |
516 | 535 | | |
517 | 536 | | |
| |||
558 | 577 | | |
559 | 578 | | |
560 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
561 | 590 | | |
562 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
563 | 594 | | |
564 | 595 | | |
565 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
0 commit comments