mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: ConfigEditor: add dynamic setting
This commit is contained in:
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 {
|
||||||
|
|||||||
Reference in new issue
Block a user