Added display values for all general.json settings

This commit is contained in:
DJj123dj
2025-04-14 14:53:31 +02:00
parent 49504bc3de
commit e129724c12
3 changed files with 83 additions and 76 deletions
+2
View File
@@ -409,6 +409,8 @@ export interface ODCheckerStructureOptions {
cliDisplayName?:string
/**The description of this config in the Interactive Setup CLI. */
cliDisplayDescription?:string
/**Hide the description of this config in the Interactive Setup CLI parent view/list. */
cliHideDescriptionInParent?:boolean
/**The default value of this variable when creating it in the Interactive Setup CLI. When not specified, the user will be asked to insert a value. */
cliInitDefaultValue?:ODValidJsonType
}
+1 -1
View File
@@ -90,7 +90,7 @@ async function renderConfigObjectStructureSelector(checker:api.ODChecker,backFn:
const list = structure.options.children.filter((child) => !child.cliHideInEditMode)
const nameList = list.map((child) => (child.checker.options.cliDisplayName ? child.checker.options.cliDisplayName : child.key))
const nameLength = utilities.getLongestLength(nameList)
const finalnameList = nameList.map((name,index) => name.padEnd(nameLength+5," ")+ansis.gray(list[index].checker.options.cliDisplayDescription ? "=> "+list[index].checker.options.cliDisplayDescription : ""))
const finalnameList = nameList.map((name,index) => name.padEnd(nameLength+5," ")+ansis.gray((!list[index].checker.options.cliHideDescriptionInParent && list[index].checker.options.cliDisplayDescription) ? "=> "+list[index].checker.options.cliDisplayDescription : ""))
const answer = await terminal.singleColumnMenu(finalnameList,{