File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 import { compareVersions } from ' $lib/scripts/stringUtils' ;
2929
3030 const imageFolder =
31- compareVersions (config .programVersion , ' 12.0' ) < 0 ? ' illustrations' : ' plans' ;
31+ compareVersions (config .programVersion , ' 12.0' ) < 0
32+ ? import .meta.glob(' ./*' , {
33+ eager : true ,
34+ import : 'default ',
35+ base : '/src /gen -assets /illustrations '
36+ })
37+ : import .meta.glob([' ./*' , ' !./*.json' ], {
38+ eager : true ,
39+ import : 'default ',
40+ base : '/src /gen -assets /plans '
41+ });
3242
3343 const barIconColor = $s[' ui.bar.text-select.icon' ][' color' ];
3444 // need some way to know the status of the plan
202212 <div>
203213 <img
204214 class="plan-image"
205- src="{base}/{ imageFolder}/ {$page.data.planConfig.image.file}"
215+ src={ imageFolder[`./$ {$page.data.planConfig.image.file}`]}
206216 alt={$page.data.planConfig.image.file}
207217 width={$page.data.planConfig.image.width}
208218 height={$page.data.planConfig.image.height}
You can’t perform that action at this time.
0 commit comments