Moar tweaking of the config panel example because idk

This commit is contained in:
Alexandre Aubin 2021-09-06 16:45:27 +02:00
parent 8f3193ff6c
commit 1d758642ae

View file

@ -61,11 +61,11 @@ services = ["nginx"]
type = "color" type = "color"
[main.components.select] [main.components.select]
ask = "I can chose option?" ask = "I can haz choices?"
type = "select" type = "select"
choices.option1 = "Plop1" choices.option_one = "W00t \o\"
choices.option2 = "Plop2" choices.option_two = "Awesom! =D"
choices.option3 = "Plop3" choices.option_three = "Uhoh? ô.o"
[main.components.domain] [main.components.domain]
ask = "I can haz domain?" ask = "I can haz domain?"
@ -98,7 +98,7 @@ services = ["nginx"]
name = "Messages / Read-only components" name = "Messages / Read-only components"
[main.messages.success] [main.messages.success]
ask = "I can haz success" ask = "I can haz success!"
type = "alert" type = "alert"
style = "success" style = "success"
icon = "beer" icon = "beer"
@ -127,39 +127,44 @@ services = ["nginx"]
type = "markdown" type = "markdown"
[main.generic] [main.generic]
name = "Generic options" name = "Specific question options demo"
[main.generic.pattern] [main.generic.pattern]
ask = "This is a question with a pattern validation" ask = "I can haz pattern validation!"
type = "string" type = "string"
pattern.regexp = '^[A-F]\d\d$' pattern.regexp = '^[A-F]\d\d$'
pattern.error = "Provide a room like F12 : one uppercase and 2 numbers" pattern.error = "Provide a room like F12 : one uppercase and 2 numbers"
[main.generic.example] [main.generic.example]
ask = "This is a question with an example value" ask = "I can haz example value"
type = "string" type = "string"
example = "Camille" example = "Camille"
[main.generic.required] [main.generic.required]
ask = "This is a required value" ask = "I can haz required field"
type = "string" type = "string"
optional = false optional = false
[main.generic.help] [main.generic.help]
ask = "Here we add some help" ask = "I can haz some help tips"
type = "string"
help = "Im in ur help text helpin' yar userz"
[main.generic.triggervisible]
ask = "I can trigger visibility for other questionz or sectionz!!"
type = "select" type = "select"
help = "You can not fill this question with your keyboard (yes i know it's very useful)" choices.nothing = "Not triggering any invisible question/section"
choices.question = "Display next question" choices.nextquestion = "Display next question"
choices.section = "Display next section" choices.nextsection = "Display next section"
[main.generic.visible] [main.generic.visible]
ask = "This question is only displayed if previous question is set to 'Display next question'" ask = "This question is only displayed if previous question is set to 'Display next question'"
type = "string" type = "string"
visible = "help == 'question'" visible = "triggervisible == 'nextquestion'"
[main.ifsection] [main.ifsection]
name = "This section is only displayed if the previous question is set to 'Display next section'" name = "This section is only displayed if the previous question is set to 'Display next section'"
visible = "help == 'section'" visible = "trigglervisible == 'nextsection'"
[main.ifsection.sub] [main.ifsection.sub]
ask = "I can haz cheezburgers?" ask = "I can haz cheezburgers?"
@ -218,20 +223,23 @@ name = "Bind panel"
bind = "__FINALPATH__/nginx.conf" bind = "__FINALPATH__/nginx.conf"
[bind.function] [bind.function]
name = "Custom bash getters / validators / setters" name = "Bind to custom bash getters / validators / setters"
[bind.function.arg8] [bind.function.arg8]
ask = "Custom validator and setter for arg8 password" ask = "I can haz a password ?"
help = "N.B. : This is mapped to a custom validate__/set__arg8 function in the config script"
type = "password" type = "password"
bind = "null" bind = "null"
[bind.function.arg9] [bind.function.arg9]
ask = "Custom getter arg9" ask = "Custom getter arg9"
help = "N.B.: This is mapped to a custom get__arg9 function in the config script"
type = "markdown" type = "markdown"
bind = "null" bind = "null"
[bind.function.alert] [bind.function.alert]
ask = "Custom getter alert" ask = "Custom getter alert"
help = "N.B.: This is mapped to a custom get__alert function in the config script"
type = "alert" type = "alert"
style = "info" style = "info"
bind = "null" bind = "null"