Skip to content

Commit 50ebce6

Browse files
committed
make file upload look slightly less crap
1 parent 191d566 commit 50ebce6

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

‎src/skins/vector/css/organisms/RoomView.css‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,25 @@ limitations under the License.
212212

213213
.mx_RoomView_uploadProgressOuter {
214214
width: 100%;
215-
background-color: black;
216-
height: 5px;
215+
background-color: #a9dbf4;
216+
height: 4px;
217217
}
218218

219219
.mx_RoomView_uploadProgressInner {
220-
background-color: blue;
221-
height: 5px;
220+
background-color: #80cef4;
221+
height: 4px;
222+
}
223+
224+
.mx_RoomView_uploadFilename {
225+
margin-top: 15px;
226+
margin-left: 56px;
227+
}
228+
229+
.mx_RoomView_uploadBytes {
230+
float: right;
231+
opacity: 0.5;
232+
margin-top: 15px;
233+
margin-right: 70px;
222234
}
223235

224236
.mx_RoomView_ongoingConfCallNotification {

‎src/skins/vector/views/organisms/RoomView.js‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,26 @@ module.exports = React.createClass({
138138
<div />
139139
);
140140

141+
// for testing UI...
142+
// this.state.upload = {
143+
// uploadedBytes: 123493,
144+
// totalBytes: 347534,
145+
// fileName: "testing_fooble.jpg",
146+
// }
147+
141148
if (this.state.upload) {
142149
var innerProgressStyle = {
143150
width: ((this.state.upload.uploadedBytes / this.state.upload.totalBytes) * 100) + '%'
144151
};
145152
statusBar = (
146153
<div className="mx_RoomView_uploadBar">
147-
<span className="mx_RoomView_uploadFilename">Uploading {this.state.upload.fileName}</span>
148-
<span className="mx_RoomView_uploadBytes">
149-
{filesize(this.state.upload.uploadedBytes)} / {filesize(this.state.upload.totalBytes)}
150-
</span>
151154
<div className="mx_RoomView_uploadProgressOuter">
152155
<div className="mx_RoomView_uploadProgressInner" style={innerProgressStyle}></div>
153156
</div>
157+
<div className="mx_RoomView_uploadBytes">
158+
{filesize(this.state.upload.uploadedBytes).replace(/ .*/, '')} / {filesize(this.state.upload.totalBytes)}
159+
</div>
160+
<div className="mx_RoomView_uploadFilename">Uploading {this.state.upload.fileName}</div>
154161
</div>
155162
);
156163
} else {

0 commit comments

Comments
 (0)