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)
|
||||
const field = {
|
||||
is: arg.readonly ? 'ReadOnlyField' : 'FormField',
|
||||
visible: [undefined, true, '"true"'].includes(arg.visible),
|
||||
visible: arg.visible,
|
||||
props: {
|
||||
label: arg.ask,
|
||||
component: undefined,
|
||||
|
@ -433,12 +433,12 @@ export function formatYunoHostConfigPanels(data) {
|
|||
const section = {
|
||||
id: _section.id,
|
||||
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.name) section.name = formatI18nField(_section.name)
|
||||
if (_section.visible && ![false, '"false"'].includes(_section.visible)) {
|
||||
addEvaluationGetter('visible', section, _section.visible, result.forms)
|
||||
if (typeof _section.visible === "string") {
|
||||
addEvaluationGetter('visible', section, section.visible, result.forms)
|
||||
}
|
||||
|
||||
const { form, fields, validations, errors } = formatYunoHostArguments(
|
||||
|
|
Loading…
Add table
Reference in a new issue