diff options
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/public/bundle.js b/public/bundle.js index 2394646..b788ccc 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -599,7 +599,8 @@ var FileList = function (_Component) { var _props = this.props, files = _props.files, - linkFiles = _props.linkFiles; + linkFiles = _props.linkFiles, + _onClick = _props.onClick; var fileList = files.map(function (file) { return (0, _preact.h)( @@ -612,17 +613,23 @@ var FileList = function (_Component) { 'a', { target: '_blank', href: file.url }, file.name || file.url - ) : file.name || file.url + ) : (0, _preact.h)( + 'span', + { 'class': 'link', onClick: function onClick() { + return _onClick(file); + } }, + '(file.name || file.url)' + ) ), (0, _preact.h)( 'div', - { className: 'size' }, - file.size ? (file.size / 1024 / 1024).toFixed(1) + ' mb.' : '' + { className: 'date' }, + (0, _moment2.default)(file.created_at).format("YYYY-MM-DD h:mm a") ), (0, _preact.h)( 'div', - { className: 'date' }, - (0, _moment2.default)(file.created_at).format("YYYY-MM-DD h:mm a") + { className: 'size' }, + file.size ? (file.size / 1024 / 1024).toFixed(1) + ' mb.' : '' ), (0, _preact.h)( 'div', @@ -3551,6 +3558,7 @@ var SampleRNNDatasets = function (_Component) { _this.handleURL = _this.handleURL.bind(_this); _this.fetchURL = _this.fetchURL.bind(_this); _this.fileOptions = _this.fileOptions.bind(_this); + _this.pickFile = _this.pickFile.bind(_this); props.actions.folder.index({ module: 'samplernn' }); props.actions.file.index({ module: 'samplernn' }); return _this; @@ -3625,6 +3633,11 @@ var SampleRNNDatasets = function (_Component) { }, { preempt: true, watch: true }); } }, { + key: 'pickFile', + value: function pickFile(file) { + console.log('pick', file); + } + }, { key: 'fileOptions', value: function fileOptions(file) { var _this2 = this; @@ -3724,6 +3737,7 @@ var SampleRNNDatasets = function (_Component) { (0, _preact.h)(_fileList2.default, { files: samplernn.files, options: this.fileOptions, + onClick: this.pickFile, linkFiles: true }) ) |
