| 6293 | e.preventDefault(); |
| 6294 | const directory = await window.electron.openFileDialog(); |
| 6295 | if (directory && directory[0]) addStlHomeExcludeDir(directory[0]); |
| 6296 | }); |
| 6297 | } |
| 6298 | } |
| 6299 | window.bindStlHomeExcludeControls = bindStlHomeExcludeControls; |
| 6300 | |
| 6301 | function parseLegacyStlHomeSetting(raw) { |
| 6302 | const text = String(raw || '').trim(); |
| 6303 | if (!text) return []; |
| 6304 | if (text.startsWith('[')) return parseStlHomeExcludeSetting(text); |
| 6305 | if (/[\r\n,;]/.test(text)) { |
| 6306 | return parseStlHomeExcludeSetting(JSON.stringify( |
| 6307 | text.split(/[\r\n,;]+/).map((entry) => entry.trim()).filter(Boolean) |
| 6308 | )); |
| 6309 | } |
| 6310 | return [text]; |
| 6311 | } |
| 6312 | |