mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
args: reflect pydantic visible
changes
This commit is contained in:
parent
ab4dc8fd4e
commit
06bb22f45d
1 changed files with 4 additions and 4 deletions
|
@ -131,7 +131,7 @@ export function formatYunoHostArgument(arg) {
|
||||||
arg.ask = formatI18nField(arg.ask)
|
arg.ask = formatI18nField(arg.ask)
|
||||||
const field = {
|
const field = {
|
||||||
is: arg.readonly ? 'ReadOnlyField' : 'FormField',
|
is: arg.readonly ? 'ReadOnlyField' : 'FormField',
|
||||||
visible: [undefined, true, '"true"'].includes(arg.visible),
|
visible: arg.visible,
|
||||||
props: {
|
props: {
|
||||||
label: arg.ask,
|
label: arg.ask,
|
||||||
component: undefined,
|
component: undefined,
|
||||||
|
@ -433,12 +433,12 @@ export function formatYunoHostConfigPanels(data) {
|
||||||
const section = {
|
const section = {
|
||||||
id: _section.id,
|
id: _section.id,
|
||||||
isActionSection: _section.is_action_section,
|
isActionSection: _section.is_action_section,
|
||||||
visible: [undefined, true, '"true"'].includes(_section.visible),
|
visible: _section.visible
|
||||||
}
|
}
|
||||||
if (_section.help) section.help = formatI18nField(_section.help)
|
if (_section.help) section.help = formatI18nField(_section.help)
|
||||||
if (_section.name) section.name = formatI18nField(_section.name)
|
if (_section.name) section.name = formatI18nField(_section.name)
|
||||||
if (_section.visible && ![false, '"false"'].includes(_section.visible)) {
|
if (typeof _section.visible === "string") {
|
||||||
addEvaluationGetter('visible', section, _section.visible, result.forms)
|
addEvaluationGetter('visible', section, section.visible, result.forms)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { form, fields, validations, errors } = formatYunoHostArguments(
|
const { form, fields, validations, errors } = formatYunoHostArguments(
|
||||||
|
|
Loading…
Add table
Reference in a new issue