mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
add ui-tabs
This commit is contained in:
parent
ffde0e3cef
commit
d2e4691425
1 changed files with 67 additions and 44 deletions
|
@ -18,8 +18,9 @@ usable (for now: installation arguments in `manifest.json/toml`,
|
|||
|
||||
## YunoHost arguments general format
|
||||
|
||||
The general format for an argument looks like this in toml:
|
||||
|
||||
The general format for an argument looks like this:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "one_of_the_available_type"
|
||||
|
@ -31,9 +32,8 @@ example = "an example value" # optional
|
|||
default = "some stuff" # optional, not available for all types
|
||||
optional = true # optional, will skip if not answered
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -51,6 +51,8 @@ And in json:
|
|||
"optional": true // optional, will skip if not answered
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
## All avaiable types
|
||||
|
||||
|
@ -59,7 +61,8 @@ And in json:
|
|||
This one is the simpliest one and is the default type if you don't specify one.
|
||||
|
||||
Example in toml:
|
||||
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "string" # optional
|
||||
|
@ -68,9 +71,8 @@ ask.fr = "la question en français"
|
|||
example = "an example value" # optional
|
||||
default = "some stuff" # optional
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -83,13 +85,14 @@ And in json:
|
|||
"example": "an example value"
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### string with choices
|
||||
|
||||
Like string except the user needs to chose in a list of specifics strings.
|
||||
|
||||
Example in toml:
|
||||
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "string"
|
||||
|
@ -99,9 +102,8 @@ example = "an example value" # optional
|
|||
choices = ["fr", "en"]
|
||||
default = "en" # optional
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -115,22 +117,22 @@ And in json:
|
|||
"default": "en" // optional
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### domain
|
||||
|
||||
This type will ask the user to chose one of the domains of their YunoHost instance.
|
||||
|
||||
Example in toml:
|
||||
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "domain"
|
||||
ask.en = "the question in english"
|
||||
ask.fr = "la question en français"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -141,14 +143,16 @@ And in json:
|
|||
}
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### Path
|
||||
|
||||
This type will ask the user to chose an URL path (generally to happen it to a
|
||||
domain) like "/path/to/my/app"
|
||||
|
||||
Example in toml:
|
||||
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "path"
|
||||
|
@ -156,9 +160,8 @@ ask.en = "the question in english"
|
|||
ask.fr = "la question en français"
|
||||
default = "/my_app"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -170,6 +173,8 @@ And in json:
|
|||
"default": "/my_app"
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### User
|
||||
|
||||
|
@ -178,6 +183,8 @@ YunoHost installation. Generally this is used to select who is going to be the
|
|||
admin or who is going to have access to this application.
|
||||
|
||||
Example in toml:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
|
@ -185,9 +192,8 @@ type = "user"
|
|||
ask.en = "the question in english"
|
||||
ask.fr = "la question en français"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -198,6 +204,8 @@ And in json:
|
|||
}
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### Password
|
||||
|
||||
|
@ -208,6 +216,8 @@ In CLI it will behave like any password query and won't print any character on
|
|||
type (not "\*\*\*...") for security reasons.
|
||||
|
||||
Example in toml:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
|
@ -215,9 +225,8 @@ type = "password"
|
|||
ask.en = "the question in english"
|
||||
ask.fr = "la question en français"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -228,12 +237,16 @@ And in json:
|
|||
}
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### Boolean
|
||||
|
||||
This type will ask the user to answer true or false to a question.
|
||||
|
||||
Example in toml:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
|
@ -242,9 +255,8 @@ ask.en = "the question in english"
|
|||
ask.fr = "la question en français"
|
||||
default = true
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -256,12 +268,16 @@ And in json:
|
|||
"default": true
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### Number
|
||||
|
||||
Like string except the user needs to enter a number
|
||||
|
||||
Example in toml:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
|
@ -270,9 +286,8 @@ ask.en = "the question in english"
|
|||
ask.fr = "la question en français"
|
||||
default = 0
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -284,6 +299,8 @@ And in json:
|
|||
"default": 0
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### App
|
||||
|
||||
|
@ -291,6 +308,8 @@ This type will ask the user to select an application in the list of installed
|
|||
application on their YunoHost.
|
||||
|
||||
Example in toml:
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
|
@ -298,9 +317,8 @@ type = "app"
|
|||
ask.en = "the question in english"
|
||||
ask.fr = "la question en français"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -311,21 +329,24 @@ And in json:
|
|||
}
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
||||
### display_text
|
||||
|
||||
This is a special type that allows the application packager to write some text
|
||||
that will be simply displayed. This is useful to provide more context.
|
||||
|
||||
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||
[ui-tab title="in toml"]
|
||||
```toml
|
||||
[maybe.some.stuff.before.the_name]
|
||||
type = "display_text"
|
||||
ask.en = "the text in english"
|
||||
ask.fr = "le text en français"
|
||||
```
|
||||
|
||||
And in json:
|
||||
|
||||
[/ui-tab]
|
||||
[ui-tab title="in json"]
|
||||
```javascript
|
||||
{
|
||||
"name": "the_name",
|
||||
|
@ -336,3 +357,5 @@ And in json:
|
|||
}
|
||||
},
|
||||
```
|
||||
[/ui-tab]
|
||||
[/ui-tabs]
|
||||
|
|
Loading…
Add table
Reference in a new issue