improve file upload UI

pull/1/head
Pierre Bondoerffer 7 years ago
parent ca686f9c92
commit 34ba673cd3
No known key found for this signature in database
GPG Key ID: C0C7C0C5063F2236

@ -3,6 +3,7 @@
@import "../less2/include/alertify.less"; @import "../less2/include/alertify.less";
@import "../less2/include/colortheme.less"; @import "../less2/include/colortheme.less";
@import "../less2/include/modal.less";
@import "./bar.less"; @import "./bar.less";
@import "./loading.less"; @import "./loading.less";
@import "./dropdown.less"; @import "./dropdown.less";
@ -633,29 +634,30 @@ noscript {
/* Upload status table */ /* Upload status table */
#uploadStatusContainer { #uploadStatusContainer {
.modal_base();
position: absolute; position: absolute;
left: 10vw; right: 10vw; left: 10vw; right: 10vw;
bottom: 100px; bottom: 10vh;
background-color: rgba(0,0,0,0.5); opacity: 1;
color: white;
opacity: 0.7;
box-sizing: border-box; box-sizing: border-box;
z-index:10000; z-index: 10000;
display: none; display: none;
font-family: @colortheme_font; opacity: 0.9;
#uploadStatus { #uploadStatus {
width: 80vw; width: 80vw;
border: 1px solid black;
border-collapse: collapse;
tr:nth-child(1) { tr:nth-child(1) {
background-color: #888; background-color: darken(@colortheme_modal-bg, 20%);
border: 1px solid #999; td {
td { text-align: center; } text-align: center;
font-weight: bold;
padding: 0.25em;
}
} }
@upload_pad_h: 0.25em;
@upload_pad_v: 0.5em;
td { td {
border-left: 1px solid #BBB; padding: @upload_pad_h @upload_pad_v;
border-right: 1px solid #BBB;
padding: 0 10px;
} }
.upProgress { .upProgress {
width: 200px; width: 200px;
@ -666,9 +668,10 @@ noscript {
.progressContainer { .progressContainer {
position: absolute; position: absolute;
width: 0px; width: 0px;
left: 5px; left: @upload_pad_v;
top: 1px; bottom: 1px; top: @upload_pad_h; bottom: @upload_pad_h;
background-color: rgba(0,0,255,0.3); background-color: rgba(0,0,255,0.3);
z-index: -1;
} }
.upCancel { text-align: center; } .upCancel { text-align: center; }
.fa.cancel { .fa.cancel {

@ -15,6 +15,8 @@
@colortheme_modal-bg: #222; @colortheme_modal-bg: #222;
@colortheme_modal-fg: #fff; @colortheme_modal-fg: #fff;
@colortheme_modal-link: #eee;
@colortheme_modal-link-visited: lighten(@colortheme_modal-link, 10%);
@colortheme_modal-dim: rgba(0, 0, 0, 0.4); @colortheme_modal-dim: rgba(0, 0, 0, 0.4);
@colortheme_modal-padding: 12px; @colortheme_modal-padding: 12px;
@colortheme_modal-shadow: 0 8px 32px 0 rgba(0,0,0,.4); @colortheme_modal-shadow: 0 8px 32px 0 rgba(0,0,0,.4);

@ -0,0 +1,17 @@
@import (once) "./colortheme.less";
.modal_base() {
font-family: @colortheme_font;
background-color: @colortheme_modal-bg;
color: @colortheme_modal-fg;
box-shadow: @colortheme_modal-shadow;
a {
color: @colortheme_modal-link;
&:visited {
color: @colortheme_modal-link-visited;
}
}
}

@ -56,12 +56,13 @@ define([
$row.find('.upCancel').html('-'); $row.find('.upCancel').html('-');
var $pv = $row.find('.progressValue'); var $pv = $row.find('.progressValue');
var $pb = $row.find('.progressContainer'); var $pb = $row.find('.progressContainer');
var $pc = $row.find('.upProgress');
var $link = $row.find('.upLink'); var $link = $row.find('.upLink');
var updateProgress = function (progressValue) { var updateProgress = function (progressValue) {
$pv.text(Math.round(progressValue*100)/100 + '%'); $pv.text(Math.round(progressValue*100)/100 + '%');
$pb.css({ $pb.css({
width: (progressValue/100)*188+'px' width: (progressValue/100)*$pc.width()+'px'
}); });
}; };

@ -128,9 +128,3 @@ media-tag {
z-index: 10000; z-index: 10000;
display: block; display: block;
} }
body #uploadStatusContainer {
background-color: rgba(255, 255, 255, 0.9);
color: black;
opacity: 0.9;
}

Loading…
Cancel
Save