Skip to content

Commit 11656ff

Browse files
committed
Fixes UI for low resolutions
1 parent ca79072 commit 11656ff

24 files changed

+341
-194
lines changed

gulpfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function Copytest() {
3434
return merge(
3535
gulp.src(['www/index.html'])
3636
.pipe(removeCode({production: false}))
37+
.pipe(removeCode({cleanheader: true}))
3738
.pipe(gulp.dest('dist')),
3839
gulp.src(['www/images/**/*.*'])
3940
.pipe(gulp.dest('dist/images'))
@@ -44,6 +45,7 @@ function Copy() {
4445
return merge(
4546
gulp.src(['www/index.html'])
4647
.pipe(removeCode({production: true}))
48+
.pipe(removeCode({cleanheader: true}))
4749
.pipe(gulp.dest('dist')),
4850
gulp.src(['www/images/**/*.*'])
4951
.pipe(gulp.dest('dist/images'))
@@ -55,6 +57,7 @@ function concatApptest() {
5557
gulp.src([ 'www/js/**/*.js'])
5658
.pipe(concat('app.js'))
5759
.pipe(removeCode({production: false}))
60+
.pipe(removeCode({cleanheader: true}))
5861
.pipe(gulp.dest('./dist/js')),
5962

6063
gulp.src([ 'www/css/**/*.css'])
@@ -68,6 +71,7 @@ function concatApp() {
6871
gulp.src([ 'www/js/**/*.js'])
6972
.pipe(concat('app.js'))
7073
.pipe(removeCode({production: true}))
74+
.pipe(removeCode({cleanheader: true}))
7175
.pipe(gulp.dest('./dist/js')),
7276

7377
gulp.src([ 'www/css/**/*.css'])
@@ -140,7 +144,7 @@ var defaultSeries = gulp.series(clean, lint, Copy, concatApp, minifyApp, includ
140144
//var packageSeries = gulp.series(clean, lint, Copy, concatApp, minifyApp, smoosh, compress);
141145
var packageSeries = gulp.series(clean, lint, Copy, concatApp, includehtml, includehtml, replaceSVG, minifyApp, smoosh, compress, clean2);
142146
var package2Series = gulp.series(clean, lint, Copy, concatApp, includehtml, includehtml, replaceSVG, smoosh);
143-
var package2testSeries = gulp.series(clean, lint, Copy, concatApptest, includehtml, includehtml, replaceSVG, smoosh);
147+
var package2testSeries = gulp.series(clean, lint, Copytest, concatApptest, includehtml, includehtml, replaceSVG, smoosh);
144148

145149
gulp.task('default', defaultSeries);
146150
gulp.task('package', packageSeries);

index.html.gz

291 Bytes
Binary file not shown.

www/css/modaldlg.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ z-index: 20000 ! important; /* Sit on top of the top */
101101
}
102102
}
103103

104-
@media screen and (max-width: 767px) {
104+
@media (min-height: 640px) {
105+
.modal {
106+
padding-top: 5px;
107+
}
108+
}
109+
110+
@media (max-width: 767px) {
105111
.modal-content {
106112
width: 100%;
107113
}

www/css/style.css

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11

22
body {
33
font-family: "Arial", sans-serif;
4-
font-size:14px;}
4+
font-size:14px;
5+
}
56

67
.hide_it {
78
display: none;
89
}
10+
911
.warningmsg {
1012
color:white;
1113
}
@@ -18,6 +20,10 @@ color:red;
1820
line-height: 0;
1921
}
2022

23+
.noshowonlowres {
24+
display: inline-block;
25+
}
26+
2127
.loader {
2228
border: 4px solid #f3f3f3; /* Light grey */
2329
border-top: 4px solid #3498db; /* Blue */
@@ -142,3 +148,58 @@ background-image:none;border:1px solid transparent;white-space:nowrap;padding:6p
142148
* -webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none; color: #ffffff;background-color: #31b0d5;border-color: #269abc;}
143149

144150
.panel-footer1{padding:10px 15px;color:#31708f;background-color:#f5f5f5;border-color:#dddddd;border-top:1px solid #dddddd;}
151+
152+
.w4 {
153+
width:4em;
154+
}
155+
.w5 {
156+
width:5em;
157+
}
158+
.w6 {
159+
width:6em;
160+
}
161+
162+
.w50 {
163+
width:50em;
164+
}
165+
166+
@media (max-width: 360px) {
167+
.container-fluid{
168+
min-width:350px;
169+
margin-left: -10px;
170+
margin-right: -10px;
171+
}
172+
.panel{
173+
margin-left: -17px;
174+
margin-right: -13px;
175+
}
176+
.pull-left,
177+
.pull-right
178+
{
179+
float: unset!important;
180+
}
181+
.noshowonlowres {
182+
display: none;
183+
}
184+
}
185+
@media (min-width: 361px) and (max-width: 640px) {
186+
.container-fluid{
187+
min-width:350px;
188+
margin-left: -10px;
189+
margin-right: -10px;
190+
}
191+
.panel{
192+
margin-left: -17px;
193+
margin-right: -13px;
194+
}
195+
.noshowonlowres {
196+
display: none;
197+
}
198+
}
199+
@media (min-width: 641px) and (max-width: 840px) {
200+
.container-fluid{
201+
min-width:350px;
202+
}
203+
204+
}
205+

www/css/wizard.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ div.step button {
3131
background: #e0e0e0;
3232
width: 50px;
3333
top: 50%;
34-
margin: 25px auto;
34+
margin: 25px auto;
3535
z-index: 1;
3636
}
3737

@@ -82,3 +82,14 @@ div.step button.active {
8282
padding: 6px 12px;
8383

8484
}
85+
86+
@media (max-width: 360px) {
87+
.connecting-line{
88+
width:2px!important;
89+
}
90+
91+
.input-group {
92+
display: block;
93+
}
94+
}
95+

www/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>ESP3D WebUI</title>
88
<script>var target_firmware="";</script>
9-
<script>var web_ui_version="0.9.60LE";</script>
9+
<script>var web_ui_version="0.9.80LE";</script>
1010
<script>var direct_sd=false;</script>
1111
<script>var fw_version="";</script>
1212
<script>var primary_sd= "/ext/";</script>
1313
<script>var secondary_sd= "/sd/";</script>
14-
<!--removeIf(production)-->
14+
<!--removeIf(cleanheader)-->
1515
<link href="css/bootstrap.css" rel="stylesheet">
1616
<link href="css/menu.css" rel="stylesheet">
1717
<link href="css/tabs.css" rel="stylesheet">
1818
<link href="css/modaldlg.css" rel="stylesheet">
1919
<link href="css/wizard.css" rel="stylesheet">
20-
<!--endRemoveIf(production)-->
20+
<!--endRemoveIf(cleanheader)-->
2121

2222
<!-- smoosh -->
2323
<link href="css/style.css" rel="stylesheet">
@@ -244,7 +244,7 @@
244244
<file-include w3-include-html="'sub/macrodlg.html'"></file-include>
245245
<file-include w3-include-html="'sub/restartdlg.html'"></file-include>
246246
<!-- / template -->
247-
<!--removeIf(production)-->
247+
<!--removeIf(cleanheader)-->
248248
<script src="js/wizard.js"></script>
249249
<script src="js/http.js"></script>
250250
<script src="js/icons.js"></script>
@@ -276,7 +276,7 @@
276276
<script src="js/smoothie.js"></script>
277277
<script src="js/dropmenu.js"></script>
278278
<script src="js/localstorage.js"></script>
279-
<!--endRemoveIf(production)-->
279+
<!--endRemoveIf(cleanheader)-->
280280
<!-- smoosh -->
281281
<script src="js/app.js"></script>
282282
<!-- endsmoosh -->

www/js/extruders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function init_extruder_panel(){
1111
function update_second_extruder(){
1212
temperature_second_extruder(document.getElementById('enable_second_extruder').checked);
1313
if (document.getElementById('enable_second_extruder').checked) {
14-
document.getElementById('second_extruder_UI').style.display='table-row';
14+
document.getElementById('second_extruder_UI').style.display='block';
1515
document.getElementById('temperature_secondExtruder').style.display='table-row';
1616
}
1717
else {

www/js/files.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var files_status_list = [];
66
var files_current_file_index = -1;
77
var files_error_status ="";
88

9-
function init_files_panel(){
9+
function init_files_panel(dorefresh){
1010
if ( target_firmware == "smoothieware"){
1111
files_currentPath =primary_sd;
1212
document.getElementById('files_refresh_primary_sd_btn').innerHTML = primary_sd.substring(0, primary_sd.length-1);
@@ -24,7 +24,9 @@ function init_files_panel(){
2424
if (!((target_firmware == "marlin") || (target_firmware == "???")))document.getElementById('files_createdir_btn').style.display="inline";
2525
else document.getElementById('files_createdir_btn').style.display="none";
2626
files_set_button_as_filter(files_filter_sd_list);
27-
if (direct_sd) files_refreshFiles(files_currentPath);
27+
var refreshlist = true;
28+
if (typeof dorefresh !== 'undefined') refreshlist = dorefresh;
29+
if (direct_sd && refreshlist) files_refreshFiles(files_currentPath);
2830
}
2931

3032
function files_set_button_as_filter(isfilter){
@@ -239,6 +241,7 @@ function files_showdeletebutton(index){
239241
}
240242

241243
function files_refreshFiles(path, usecache){
244+
//console.log("refresh requested " + path);
242245
var cmdpath = path;
243246
files_currentPath = path;
244247
if (typeof usecache === 'undefined') usecache = false;
@@ -250,7 +253,7 @@ function files_refreshFiles(path, usecache){
250253
document.getElementById('files_nav_loader').style.display="block";
251254
//this is pure direct SD
252255
if (direct_sd && !( target_firmware == "smoothieware" && files_currentPath.startsWith(secondary_sd))){
253-
if (target_firmware == "smoothieware")cmdpath = path.substring(5);
256+
if (target_firmware == "smoothieware")cmdpath = path.substring(4);
254257
var url = "/upload?path=" + encodeURI(cmdpath);
255258
//removeIf(production)
256259
var response = "{\"files\":[{\"name\":\"test2.gco\",\"shortname\":\"test2.gco\",\"size\":\"992 B\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"simpl3d.gcode\",\"shortname\":\"SIMPL3~1.GCO\",\"size\":\"0 B\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"patt2.g\",\"shortname\":\"patt2.g\",\"size\":\"9.73 MB\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"myfolder\",\"shortname\":\"myfolder\",\"size\":\"-1\",\"datetime\":\"2016-08-01 18:15:00\"},{\"name\":\"wconfig.ok\",\"shortname\":\"wconfig.ok\",\"size\":\"1.10 KB\",\"datetime\":\"2017-01-06 14:35:54\"},{\"name\":\"gpl.txt\",\"shortname\":\"gpl.txt\",\"size\":\"34.98 KB\",\"datetime\":\"2017-04-17 20:22:32\"},{\"name\":\"m1.g\",\"shortname\":\"m1.g\",\"size\":\"17 B\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"m2.g\",\"shortname\":\"m2.g\",\"size\":\"17 B\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"Test4.g\",\"shortname\":\"TEST4.G\",\"size\":\"20.47 KB\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"README.md\",\"shortname\":\"README.md\",\"size\":\"11.83 KB\",\"datetime\":\"2017-04-17 20:25:08\"},{\"name\":\"test file.gcode\",\"shortname\":\"TESTFI~1.GCO\",\"size\":\"11 B\",\"datetime\":\"2000-01-01 01:00:00\"},{\"name\":\"M3.g\",\"shortname\":\"M3.g\",\"size\":\"32 B\",\"datetime\":\"2000-01-01 01:00:00\"}],\"path\":\"/\",\"total\":\"14 GB\",\"used\":\"28 MB\",\"occupation\":\"1\",\"mode\":\"direct\",\"status\":\"Ok\"}";

www/js/language/de.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var germantrans = {
5555
"Extruders":"Extruder",
5656
"Fan (0-100%)":"L&uuml;fter (0-100%)",
5757
"Feed (25-150%)":"Vorschub (25-150%)",
58-
"Feedrate XY:":"Vorschubgeschwindigkeit XY:",
58+
"Feedrate :":"Vorschubgeschwindigkeit :",
5959
"Filename":"Dateiname",
6060
"Filter temperatures":"Filter Temperatur",
6161
"Firmware":"Firmware",

www/js/language/es.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var spanishtrans = {
5555
"Extruders":"Extrusores",
5656
"Fan (0-100%)":"Ventilador (0-100%)",
5757
"Feed (25-150%)":"Velocidad (25-150%)",
58-
"Feedrate XY:":"Avance XY:",
58+
"Feedrate :":"Avance :",
5959
"Filename":"Archivo",
6060
"Filter temperatures":"Filtrar temperaturas",
6161
"Firmware":"Firmware",

0 commit comments

Comments
 (0)