File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/skins/vector/views/organisms Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ module.exports = React.createClass({
149149 var innerProgressStyle = {
150150 width : ( ( this . state . upload . uploadedBytes / this . state . upload . totalBytes ) * 100 ) + '%'
151151 } ;
152+ var uploadedSize = filesize ( this . state . upload . uploadedBytes ) ;
153+ var totalSize = filesize ( this . state . upload . totalBytes ) ;
154+ if ( uploadedSize . replace ( / ^ .* / , '' ) === totalSize . replace ( / ^ .* / , '' ) ) {
155+ uploadedSize = uploadedSize . replace ( / .* / , '' ) ;
156+ }
152157 statusBar = (
153158 < div className = "mx_RoomView_uploadBar" >
154159 < div className = "mx_RoomView_uploadProgressOuter" >
@@ -157,7 +162,7 @@ module.exports = React.createClass({
157162 < img className = "mx_RoomView_uploadIcon" src = "img/fileicon.png" width = "40" height = "40" />
158163 < img className = "mx_RoomView_uploadCancel" src = "img/cancel.png" width = "40" height = "40" />
159164 < div className = "mx_RoomView_uploadBytes" >
160- { filesize ( this . state . upload . uploadedBytes ) . replace ( / . * / , '' ) } / { filesize ( this . state . upload . totalBytes ) }
165+ { uploadedSize } / { totalSize }
161166 </ div >
162167 < div className = "mx_RoomView_uploadFilename" > Uploading { this . state . upload . fileName } </ div >
163168 </ div >
You can’t perform that action at this time.
0 commit comments