Skip to content

Commit

Permalink
IDE: use the popup's overlay (and not the svg) to display file size e…
Browse files Browse the repository at this point in the history
…rrors
  • Loading branch information
giuliomoro committed Jun 17, 2022
1 parent fedc2ae commit 2f69554
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
3 changes: 0 additions & 3 deletions IDE/frontend-dev/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ body {
[data-drag-func=folder] {
fill: rgb(0, 255, 0);
}
&.no>polygon {
fill: rgb(255, 0, 0);
}
}

ul {
Expand Down
10 changes: 5 additions & 5 deletions IDE/frontend-dev/src/Views/FileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ class FileView extends View {
}

hideOverlay(){
this.svg.removeClassSVG(overlayActiveClass).removeClassSVG('no');
$('polygon', this.svg).removeClassSVG(overlayActiveClass).removeClassSVG('no');
this.svg.removeClassSVG(overlayActiveClass);
$('polygon', this.svg).removeClassSVG(overlayActiveClass);
}

// UI events
Expand Down Expand Up @@ -272,14 +272,15 @@ class FileView extends View {
uploadSizeError(name){
let strings = Object.assign({}, json.popups.upload_size_error);
strings.title = utils.formatString(strings.title, utils.breakable(name));
this.hideOverlay();
popup.twoButtons(strings,
() =>{
this.hideOverlay();
this.uploadFile();
},
() => this.hideOverlay(),
undefined,
{
titleClass: 'error',
error: true,
}
);
}
Expand Down Expand Up @@ -672,7 +673,6 @@ class FileView extends View {
{
// once we finished uploading the small files, print a
// single error message for all of the large ones
this.svg.addClassSVG('no');
this.uploadSizeError(largeFileQueue.join('`, `'));
largeFileQueue = [];
}
Expand Down
2 changes: 0 additions & 2 deletions IDE/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ body.uploading {
fill: #00ff7a; }
[data-drag-svg] [data-drag-func=folder] {
fill: lime; }
[data-drag-svg].no > polygon {
fill: red; }

ul {
font-family: inconsolata; }
Expand Down
14 changes: 6 additions & 8 deletions IDE/public/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f69554

Please sign in to comment.