'use strict'; // Compatibility controls for existing thumbnail tasks; legacy gallery pages are retired. async function thumbnailJobFields(job){ const plans=await api('/api/v1/thumbnail-plans');if(!$('#job-form'))return; const box=document.createElement('section');box.id='legacy-thumbnail-job-fields';box.hidden=!job.generate_thumbnail&&!job.thumbnail_plan_id;box.innerHTML=`

${tr('仅支持照片数据源任务;上传成功后使用源画面生成。新任务请使用来源图库生成方案与终端绑定。','For photo-source tasks only; generates from source pixels after upload succeeds. New tasks should use source-library plans and terminal bindings.')}

`; $('#job-form .modal-actions').before(box); const update=()=>{const supported=$('#job-content-type')?.value==='photo_source';$('#job-thumbnail').disabled=!supported;if(!supported)$('#job-thumbnail').checked=false;$('#job-thumbnail-plan').disabled=!$('#job-thumbnail').checked;$('#job-thumbnail-plan').required=$('#job-thumbnail').checked;}; $('#job-thumbnail').onchange=update;$('#job-content-type')?.addEventListener('change',update);update(); }