Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/homepage/commit/3c4818a2b49dd5c9b4e880423f3b3038b8bf3205
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
13 additions and
2 deletions
@ -31,9 +31,13 @@ widget:
another: key3
label: Field 3
format: percent # optional - defaults to text
- field: key # needs to be YAML string or object
label: Field 4
format: date # optional - defaults to text
dateStyle: long # optional - defaults to "long". Allowed values: `["full", "long", "medium", "short"]` .
```
Supported formats for the values are `text` , `number` , `float` , `percent` , `bytes` and `bitrate` .
Supported formats for the values are `text` , `number` , `float` , `percent` , `bytes` , `bitrate` and `d ate`.
## Example
@ -123,6 +123,9 @@ module.exports = {
i18next . services . formatter . add ( "percent" , ( value , lng , options ) =>
new Intl . NumberFormat ( lng , { style : "percent" , ... options } ) . format ( parseFloat ( value ) / 100.0 ) ,
) ;
i18next . services . formatter . add ( "date" , ( value , lng , options ) =>
new Intl . DateTimeFormat ( lng , { ... options } ) . format ( new Date ( value ) ) ,
) ;
} ,
type : "3rdParty" ,
} ,
@ -10,7 +10,8 @@
"bibitrate" : "{{value, rate(bits: true; binary: true)}}" ,
"percent" : "{{value, percent}}" ,
"number" : "{{value, number}}" ,
"ms" : "{{value, number}}"
"ms" : "{{value, number}}" ,
"date" : "{{value, date}}"
} ,
"widget" : {
"missing_type" : "Missing Widget Type: {{type}}" ,
@ -69,6 +69,9 @@ function formatValue(t, mapping, rawValue) {
case "bitrate" :
value = t ( "common.bitrate" , { value } ) ;
break ;
case "date" :
value = t ( "common.date" , { value , dateStyle : mapping ? . dateStyle ? ? "long" } ) ;
break ;
case "text" :
default :
/ / n o t h i n g