Commit ce266ee577183f9c24a98a3b18b6296707f6c612
1 parent
0cbb5859
perf: first screen loading compatible phone
Showing
1 changed file
with
20 additions
and
1 deletions
| ... | ... | @@ -589,6 +589,25 @@ | 
| 589 | 589 | </figure> | 
| 590 | 590 | </div> | 
| 591 | 591 | <script> | 
| 592 | + | |
| 593 | + function isMobile() { | |
| 594 | + // http://192.168.10.106:8083/thingskit-drawio/?configurationId=5c683cb0-48fb-4062-aabf-a5093eea0446&userId=1262f76c-ec5d-4091-85a1-52c552915d4e&lightbox=1 | |
| 595 | + var urlParams = (function () { | |
| 596 | + var result = new Object(); | |
| 597 | + var params = window.location.search.slice(1).split('&'); | |
| 598 | + | |
| 599 | + for (var i = 0; i < params.length; i++) { | |
| 600 | + var idx = params[i].indexOf('='); | |
| 601 | + | |
| 602 | + if (idx > 0) { | |
| 603 | + result[params[i].substring(0, idx)] = params[i].substring(idx + 1); | |
| 604 | + } | |
| 605 | + } | |
| 606 | + | |
| 607 | + return result; | |
| 608 | + })(); | |
| 609 | + return !!urlParams.userId; | |
| 610 | + } | |
| 592 | 611 | var timeInterval = setInterval(() => { | 
| 593 | 612 | try { | 
| 594 | 613 | if (!echarts) return | 
| ... | ... | @@ -617,7 +636,7 @@ | 
| 617 | 636 | top: 'center', | 
| 618 | 637 | style: { | 
| 619 | 638 | text: 'ThingsKit Scada', | 
| 620 | - fontSize: 70, | |
| 639 | + fontSize: isMobile() ? 20 : 70, | |
| 621 | 640 | fontWeight: 'bold', | 
| 622 | 641 | lineDash: [0, 200], | 
| 623 | 642 | lineDashOffset: 0, | ... | ... |