Fix JobEditor crash: pass viewer into CwdField.

CwdField required viewer.canViewAll but JobEditor never received the prop, so opening cron mode threw ReferenceError and blanked the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-08 16:45:47 +08:00
parent feae559fcf
commit 69d0d7124f

View file

@ -1081,7 +1081,7 @@ body>.dsh-ct-main{position:fixed;top:0;right:0;bottom:0;left:var(--dsh-ct-sideba
)
}
function JobEditor({ t, form, setForm, isNew, error, lastOutput, nextRunAt, lastRunAt, workspaces, catalog, presets, imCatalog, onSave, onRun, onPause, onRemove }) {
function JobEditor({ t, form, setForm, isNew, error, lastOutput, nextRunAt, lastRunAt, workspaces, catalog, presets, imCatalog, viewer, onSave, onRun, onPause, onRemove }) {
return h('div', { className: 'dsh-ct-editor' },
h('h1', null, isNew ? t('newJob') : (form.name || t('title'))),
h('p', { className: 'dsh-ct-editorLead' }, t('editorLead')),
@ -1422,6 +1422,7 @@ body>.dsh-ct-main{position:fixed;top:0;right:0;bottom:0;left:var(--dsh-ct-sideba
catalog,
presets,
imCatalog,
viewer,
onSave: save,
onRun: () => selection.jobId && run(selection.jobId),
onPause: () => {