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
|
## 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
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "one_of_the_available_type"
|
type = "one_of_the_available_type"
|
||||||
|
@ -31,9 +32,8 @@ example = "an example value" # optional
|
||||||
default = "some stuff" # optional, not available for all types
|
default = "some stuff" # optional, not available for all types
|
||||||
optional = true # optional, will skip if not answered
|
optional = true # optional, will skip if not answered
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -51,6 +51,8 @@ And in json:
|
||||||
"optional": true // optional, will skip if not answered
|
"optional": true // optional, will skip if not answered
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
## All avaiable types
|
## 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.
|
This one is the simpliest one and is the default type if you don't specify one.
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "string" # optional
|
type = "string" # optional
|
||||||
|
@ -68,9 +71,8 @@ ask.fr = "la question en français"
|
||||||
example = "an example value" # optional
|
example = "an example value" # optional
|
||||||
default = "some stuff" # optional
|
default = "some stuff" # optional
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -83,13 +85,14 @@ And in json:
|
||||||
"example": "an example value"
|
"example": "an example value"
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### string with choices
|
### string with choices
|
||||||
|
|
||||||
Like string except the user needs to chose in a list of specifics strings.
|
Like string except the user needs to chose in a list of specifics strings.
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
Example in toml:
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "string"
|
type = "string"
|
||||||
|
@ -99,9 +102,8 @@ example = "an example value" # optional
|
||||||
choices = ["fr", "en"]
|
choices = ["fr", "en"]
|
||||||
default = "en" # optional
|
default = "en" # optional
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -115,22 +117,22 @@ And in json:
|
||||||
"default": "en" // optional
|
"default": "en" // optional
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### domain
|
### domain
|
||||||
|
|
||||||
This type will ask the user to chose one of the domains of their YunoHost instance.
|
This type will ask the user to chose one of the domains of their YunoHost instance.
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
Example in toml:
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "domain"
|
type = "domain"
|
||||||
ask.en = "the question in english"
|
ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -141,14 +143,16 @@ And in json:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### Path
|
### Path
|
||||||
|
|
||||||
This type will ask the user to chose an URL path (generally to happen it to a
|
This type will ask the user to chose an URL path (generally to happen it to a
|
||||||
domain) like "/path/to/my/app"
|
domain) like "/path/to/my/app"
|
||||||
|
|
||||||
Example in toml:
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "path"
|
type = "path"
|
||||||
|
@ -156,9 +160,8 @@ ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
default = "/my_app"
|
default = "/my_app"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -170,6 +173,8 @@ And in json:
|
||||||
"default": "/my_app"
|
"default": "/my_app"
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### User
|
### 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.
|
admin or who is going to have access to this application.
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
|
@ -185,9 +192,8 @@ type = "user"
|
||||||
ask.en = "the question in english"
|
ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -198,6 +204,8 @@ And in json:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### Password
|
### 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.
|
type (not "\*\*\*...") for security reasons.
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
|
@ -215,9 +225,8 @@ type = "password"
|
||||||
ask.en = "the question in english"
|
ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -228,12 +237,16 @@ And in json:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### Boolean
|
### Boolean
|
||||||
|
|
||||||
This type will ask the user to answer true or false to a question.
|
This type will ask the user to answer true or false to a question.
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
|
@ -242,9 +255,8 @@ ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
default = true
|
default = true
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -256,12 +268,16 @@ And in json:
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### Number
|
### Number
|
||||||
|
|
||||||
Like string except the user needs to enter a number
|
Like string except the user needs to enter a number
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
|
@ -270,9 +286,8 @@ ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
default = 0
|
default = 0
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -284,6 +299,8 @@ And in json:
|
||||||
"default": 0
|
"default": 0
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### App
|
### App
|
||||||
|
|
||||||
|
@ -291,6 +308,8 @@ This type will ask the user to select an application in the list of installed
|
||||||
application on their YunoHost.
|
application on their YunoHost.
|
||||||
|
|
||||||
Example in toml:
|
Example in toml:
|
||||||
|
[ui-tabs position="top-left" active="0" theme="lite"]
|
||||||
|
[ui-tab title="in toml"]
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
|
@ -298,9 +317,8 @@ type = "app"
|
||||||
ask.en = "the question in english"
|
ask.en = "the question in english"
|
||||||
ask.fr = "la question en français"
|
ask.fr = "la question en français"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -311,21 +329,24 @@ And in json:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
||||||
### display_text
|
### display_text
|
||||||
|
|
||||||
This is a special type that allows the application packager to write some 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.
|
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
|
```toml
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "display_text"
|
type = "display_text"
|
||||||
ask.en = "the text in english"
|
ask.en = "the text in english"
|
||||||
ask.fr = "le text en français"
|
ask.fr = "le text en français"
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
And in json:
|
[ui-tab title="in json"]
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"name": "the_name",
|
"name": "the_name",
|
||||||
|
@ -336,3 +357,5 @@ And in json:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
[/ui-tab]
|
||||||
|
[/ui-tabs]
|
||||||
|
|
Loading…
Add table
Reference in a new issue