diff options
Diffstat (limited to 'app/client/common')
| -rw-r--r-- | app/client/common/select.component.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/client/common/select.component.js b/app/client/common/select.component.js index 9ff60ce..3b008a3 100644 --- a/app/client/common/select.component.js +++ b/app/client/common/select.component.js @@ -15,10 +15,19 @@ class Select extends Component { } render() { const value = this.props.opt[this.props.name] - const options = this.props.options.map((key,i) => { + const options = (this.props.options || []).map((key,i) => { + let name, value + if (typeof key == 'string') { + name = key.length < 4 ? key.toUpperCase() : key + value = key + } else { + let frames = Math.round(key.count / 30) + ' s.' + name = key.name.replace(/_/g, ' ') + ' (' + frames + ')' + value = key.name + } return ( - <option value={key} key={i}> - {capitalize(key)} + <option value={value} key={i}> + {name} </option> ) }) |
