diff options
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/public/bundle.js b/public/bundle.js index 51c7bbe..577af1c 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -1826,7 +1826,7 @@ var buildZip = exports.buildZip = function buildZip(name, file, _ref2) { // dispatch event dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' }); zip.generateAsync({ type: "blob" }).then(function (content) { - dispatch({ type: _types2.default.wav2pix.zip }); + dispatch({ type: _types2.default.wav2pix.zip, size: content.size }); // FileSaver.saveAs(content, "wav2pix_" + name + ".zip") resolve({ zip: content, @@ -7324,7 +7324,7 @@ var pix2wavReducer = function pix2wavReducer() { }); case _types2.default.wav2pix.zip: return _extends({}, state, { - status: 'Built zip file' + status: 'Built zip file ' + _util2.default.hush_size(state.size)[1] }); case _types2.default.wav2pix.uploading: return _extends({}, state, { @@ -7737,6 +7737,10 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var date_stamp = function date_stamp() { + return (0, _moment2.default)().format("_YYYYMMDD_HHmm"); +}; + var SpectrogramUpload = function (_Component) { _inherits(SpectrogramUpload, _Component); @@ -7749,6 +7753,7 @@ var SpectrogramUpload = function (_Component) { file: null, pcm: null, name: "", + datasetName: "", frames: [], frame_start: 0, max: 3000, @@ -7773,7 +7778,12 @@ var SpectrogramUpload = function (_Component) { var _this2 = this; var name = file.name.split('.')[0].replace(/\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_'); - this.setState({ file: file, name: name, pcm: '' }, function () { + this.setState({ + file: file, + name: name + date_stamp(), + datasetName: name, + pcm: '' + }, function () { if (file.size < 2 << 20) { _this2.rebuildFrames(); } @@ -7970,7 +7980,9 @@ var SpectrogramUpload = function (_Component) { value: this.state.frame_start, defaultValue: 0, onChange: function onChange(frame_start) { - _this6.setState({ frame_start: frame_start }, function () { + _this6.setState({ + frame_start: frame_start + }, function () { _this6.rebuildFrames(); }); } @@ -7992,6 +8004,7 @@ var SpectrogramUpload = function (_Component) { onChange: function onChange(frame_step) { var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / frame_step); _this6.setState({ + name: _this6.state.datasetName + '_step_' + frame_step + date_stamp(), frame_step: frame_step, max: Math.min(_this6.state.max, total_frame_count) }, function () { |
