ui: ConfigEditor: add dynamic setting

This commit is contained in:
undefined committed 2025-06-11 11:56:14 +08:00
1 parent c1cdc703fe
commit 6213d0a90a
2 files changed
+3 -2

No files matched your search

@@ -117,7 +117,7 @@ function MonacoContainer({
} }
export default function ConfigEditor({ export default function ConfigEditor({
schema, config, monaco, Markdown, onSave, registerAction, sidebar, schema, config, monaco, Markdown, onSave, registerAction, sidebar, dynamic,
}) { }) {
const getValue = () => { const getValue = () => {
try { try {
@@ -178,7 +178,7 @@ export default function ConfigEditor({
<div style={{ <div style={{
overflowY: 'scroll', top: 0, bottom: 0, left: 0, right: 0, position: 'absolute', marginLeft: 10, overflowY: 'scroll', top: 0, bottom: 0, left: 0, right: 0, position: 'absolute', marginLeft: 10,
}}> }}>
<Form schema={schema} initial={initial} value={value} onChange={updateFromForm} /> <Form schema={schema} initial={initial} value={value} onChange={updateFromForm} dynamic={dynamic} />
</div> </div>
</Allotment.Pane> </Allotment.Pane>
{sidebar && <Allotment.Pane maxSize={220}>{sidebar}</Allotment.Pane>} {sidebar && <Allotment.Pane maxSize={220}>{sidebar}</Allotment.Pane>}
@@ -45,6 +45,7 @@ const page = new NamedPage('manage_config', async () => {
}); });
}} }}
sidebar={<DomComponent childDom={$('.section.side').get(0)} />} sidebar={<DomComponent childDom={$('.section.side').get(0)} />}
dynamic={UiContext.dynamic || {}}
/> />
<style>{` <style>{`
body { body {