fix: drop jpg/jpeg support from icon system (svg + png only)
Icons.display path only handles svg/png, so jpg-backed icons never rendered. Remove jpg/jpeg: drop from EXT map and magicOk in ingest.js, narrow FILE regex in sets.js to (svg|png), update the file input accept attribute in icon_sets_panel.js, and simplify the content-type ternary in the icon_sets route (jpeg branch was now unreachable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ let bundledDir = path.resolve('public/icons/devices');
|
||||
export function _setDirs({ setsDir: s, bundledDir: b }) { if (s) setsDir = s; if (b) bundledDir = b; }
|
||||
|
||||
const SLUG = /^[a-z0-9-]+$/;
|
||||
const FILE = /^[a-z0-9-]+\.(svg|png|jpg|jpeg)$/;
|
||||
const FILE = /^[a-z0-9-]+\.(svg|png)$/;
|
||||
function okSet(s) { return SLUG.test(s); }
|
||||
|
||||
async function listDir(dir) {
|
||||
|
||||
Reference in New Issue
Block a user