lsc 4 年之前
父节点
当前提交
456526e628

+ 11 - 0
images/fail.svg

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
+    <title>失败</title>
+    <desc>Created with Sketch.</desc>
+    <g id="失败" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组" fill="#FF3030" fill-rule="nonzero">
+            <path d="M19.2078664,6.11465685 C21.3557435,11.193794 18.9859702,17.0516538 13.9087442,19.2135955 C12.6756503,19.7350091 11.3499165,20.0024762 10.0109181,20 C5.24815578,19.9971482 1.14610881,16.6440411 0.200418841,11.9806559 C-0.745271129,7.31727069 1.72698459,2.63355332 6.11309195,0.779027518 C11.2039917,-1.35057963 17.0599892,1.03551969 19.2078664,6.11465685 Z M14.9497475,5.45961941 C14.6959067,5.20577862 14.2843494,5.20577862 14.0305087,5.45961941 L14.0305087,5.45961941 L10,9.49 L5.96949135,5.45961941 C5.74103464,5.2311627 5.3848276,5.20831703 5.13082083,5.39108239 L5.05025253,5.45961941 C4.79641174,5.7134602 4.79641174,6.12501743 5.05025253,6.37885822 L5.05025253,6.37885822 L9.08,10.409 L5.05025253,14.4398755 C4.82179582,14.6683322 4.79895015,15.0245393 4.98171552,15.278546 L5.05025253,15.3591143 C5.30409332,15.6129551 5.71565056,15.6129551 5.96949135,15.3591143 L5.96949135,15.3591143 L9.999,11.328 L14.0305087,15.3591143 C14.2589654,15.5875711 14.6151724,15.6104167 14.8691792,15.4276514 L14.9497475,15.3591143 C15.2035883,15.1052736 15.2035883,14.6937163 14.9497475,14.4398755 L14.9497475,14.4398755 L10.919,10.409 L14.9497475,6.37885822 C15.1782042,6.15040151 15.2010499,5.79419448 15.0182845,5.54018771 Z" id="形状结合"></path>
+        </g>
+    </g>
+</svg>

文件差异内容过多而无法显示
+ 7 - 0
images/language.svg


+ 12 - 0
images/run.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
+    <title>运行</title>
+    <desc>Created with Sketch.</desc>
+    <g id="运行" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组" transform="translate(2.000000, 2.000000)" fill="#FFFFFF" fill-rule="nonzero">
+            <path d="M8,0 C3.58892308,0 0,3.58892308 0,8 C0,12.4110769 3.58892308,16 8,16 C12.4110769,16 16,12.4110769 16,8 C16,3.58892308 12.4110769,0 8,0 Z M8,15 C4.26769231,15 1,11.7323077 1,8 C1,4.26769231 4.26769231,1 8,1 C11.7323077,1 15,4.26769231 15,8 C15,11.7323077 11.7323077,15 8,15 Z" id="形状"></path>
+            <path d="M6.85557693,4.6060453 C6.69202006,4.48335049 6.47558183,4.46573545 6.29540878,4.56045546 C6.11523574,4.65517548 6.00183105,4.84620931 6.00183105,5.05487395 L6.00183105,10.9456807 C6.00200501,11.1542455 6.11551541,11.3450886 6.29564819,11.4396704 C6.47578096,11.5342522 6.6920983,11.5165908 6.85557693,11.3939545 L10.7802274,8.44855118 C10.9194485,8.34416412 11.0018311,8.17730933 11.0018311,7.99972253 C11.0018311,7.82213572 10.9194485,7.65528093 10.7802274,7.55089387 L6.85557693,4.6060453 Z" id="路径"></path>
+        </g>
+    </g>
+</svg>

+ 12 - 0
images/screenshot.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="31px" height="29px" viewBox="0 0 31 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
+    <title>截图</title>
+    <desc>Created with Sketch.</desc>
+    <g id="截图" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组" transform="translate(2.000000, 2.000000)" fill="#FFFFFF" fill-rule="nonzero">
+            <path d="M16.5,0 C17.5,0 17.6956781,0.61975 18,1 L20,4 L25,4 L25,4 C25.8969487,4 27,4.908 27,6 L27,23.5 C26.9919915,24.592 26.3929445,25 25.5,25 L1.5,25 C0.603051304,25 4.54747351e-13,24.592 4.54747351e-13,23.5 L4.54747351e-13,6 C4.54747351e-13,4.908 1.1030513,4 2,4 L7,4 L9,1 C9.30832611,0.546625 9.5,0 10.5,0 L16.5,0 Z M15.5,2 L11.5,2 C11.1144463,2 10.7453523,2.13922414 10.5,2.5 L10.5,2.5 L8,6 L3,6 C2.28624772,6 2,6.13103448 2,7 L2,7 L2,22 C2,22.8689655 2.28624772,23 3,23 L3,23 L24,23 C24.7105659,23 24.9936272,22.8689655 25,22 L25,22 L25,7 C25,6.13103448 24.7137523,6 24,6 L24,6 L19,6 L16.5,2.5 C16.257834,2.19741379 15.8441306,2 15.5,2 L15.5,2 Z" id="形状结合"></path>
+            <path d="M13.5,7.5 C17.3258635,7.5 20,10.1741365 20,14 C19.9944311,17.8258635 17.3202945,20.5 13.5,20.5 C9.67970549,20.5 7,17.8258635 7,14 C7,10.1797055 9.67413655,7.5 13.5,7.5 Z M13.5,9.5 C10.9455,9.5 9,11.4455 9,14 C9,16.5545 10.9455,18.5 13.5,18.5 C16.0545,18.5 18,16.5545 18,14 C17.995125,11.4455 16.049625,9.5 13.5,9.5 Z" id="形状结合"></path>
+        </g>
+    </g>
+</svg>

+ 11 - 0
images/success.svg

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
+    <title>成功</title>
+    <desc>Created with Sketch.</desc>
+    <g id="成功" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组" fill="#24AF00" fill-rule="nonzero">
+            <path d="M19.2078664,6.11465685 C21.3557435,11.193794 18.9859702,17.0516538 13.9087442,19.2135955 C12.6756503,19.7350091 11.3499165,20.0024762 10.0109181,20 C5.24815578,19.9971482 1.14610881,16.6440411 0.200418841,11.9806559 C-0.745271129,7.31727069 1.72698459,2.63355332 6.11309195,0.779027518 C11.2039917,-1.35057963 17.0599892,1.03551969 19.2078664,6.11465685 Z M15.8645598,6.20325599 C15.6069091,5.9378388 15.1828788,5.9315428 14.9174616,6.18919348 L14.9174616,6.18919348 L8.48442591,12.4329435 L5.13621162,9.18205062 C4.87085606,8.92439992 4.44687572,8.93064595 4.18922502,9.19600152 C3.93157432,9.46135708 3.93782035,9.88533742 4.20317591,10.1429881 L4.20317591,10.1429881 L8.01880091,13.8467828 C8.14368285,13.9682581 8.3111014,14.0361067 8.48531877,14.035846 C8.65945892,14.0360484 8.8267868,13.9682041 8.95161341,13.8467828 L8.95161341,13.8467828 L15.8504973,7.15035419 C16.1159145,6.89270349 16.1222105,6.46867319 15.8645598,6.20325599 Z" id="形状结合"></path>
+        </g>
+    </g>
+</svg>

+ 12 - 0
images/uploadCode.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
+    <title>上传</title>
+    <desc>Created with Sketch.</desc>
+    <g id="上传" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组" transform="translate(1.183594, 2.000000)" fill="#FFFFFF" fill-rule="nonzero">
+            <path d="M9.41210938,0.83984375 L9.41210938,11.2695312 C9.41210938,11.59375 9.15039062,11.8554688 8.82617188,11.8554688 C8.50195312,11.8554688 8.24023438,11.59375 8.24023438,11.2695312 L8.24023438,0.83984375 C8.24023438,0.515625 8.50195312,0.25390625 8.82617188,0.25390625 C9.1484375,0.25390625 9.41210938,0.515625 9.41210938,0.83984375 Z" id="路径"></path>
+            <path d="M5.10351563,4.23828125 C5.33398438,4.46875 5.703125,4.46875 5.93359375,4.23828125 L8.27539063,1.89648437 C8.58007813,1.59179688 9.07421875,1.59179688 9.38085938,1.89648437 L11.7226563,4.23828125 C11.9511719,4.46679687 12.3222656,4.46679687 12.5507813,4.23828125 C12.7792969,4.00976562 12.7792969,3.63867188 12.5507813,3.41015625 L9.37304688,0.236328125 C9.06835938,-0.068359375 8.57226563,-0.068359375 8.26757813,0.236328125 L5.1015625,3.41015625 C4.875,3.640625 4.875,4.00976562 5.10351563,4.23828125 Z M15.6512146,15.6054687 L1.99511719,15.6054687 C1.34863281,15.6054687 0.823242187,15.0800781 0.823242187,14.4335937 L0.81640625,9 C0.81640625,8.6796875 1.06011963,8.5 1.31640625,8.5 C1.56686401,8.5 1.81640625,8.6796875 1.81640625,9 L1.81640625,13.8476562 C1.81640625,14.171875 2.09094238,14.4335937 2.41516113,14.4335937 L15.0652771,14.4335937 C15.3894958,14.4335937 15.8164063,14.171875 15.8164063,13.8476562 L15.8164063,9 C15.8164063,8.6796875 16.0558472,8.5 16.3156128,8.5 C16.6090393,8.5 16.8230896,8.6796875 16.8230896,9 L16.8230896,14.4335937 C16.8230896,15.0800781 16.297699,15.6054687 15.6512146,15.6054687 Z" id="形状"></path>
+        </g>
+    </g>
+</svg>

+ 12 - 0
index.css

@@ -1417,3 +1417,15 @@ table td, th {
 .cancelBtn:focus{
      background-color: #CCCCCC;
 }
+
+input::-webkit-input-placeholder {
+    color: #ccc;
+}
+
+input::-moz-input-placeholder {
+    color: #ccc;
+}
+
+input::-ms-input-placeholder {
+    color: #ccc;
+}

+ 16 - 10
index.html

@@ -182,7 +182,7 @@
                         <a id="nav_language" class='dropdown-button lang_resize' data-activates='languages'
                             style="position:relative;padding: 0 25px;">
                             <span class="translatable_language" style="display: none;">Language</span>
-                            <img class="left nav-icon" src="./images/language.png" style="width: 30px;height: 50px;">
+                            <img class="left" src="./images/language.svg" style="width: 30px;height: 50px;margin: 7px 0 0 0;">
                             <i class="down" style="position: relative;top: 30px;left: 2px;float: right;"></i>
                         </a>
                         <ul id='languages' class='dropdown-content active'>
@@ -686,7 +686,7 @@
                     </li>
                     <i id="workspace_screenshot"
                         style="margin-left:5px;cursor: pointer;position: absolute;right: 350px;">
-                        <img src="./images/screenshot.png" style="width: 40px;height: 35px;margin:15px 0 0 0;" />
+                        <img src="./images/screenshot.svg" style="width: 40px;height: 35px;margin:15px 0 0 0;" />
                     </i>
                     <i id="button_delete" class="material-icons sketch_name_icon right"
                         style="margin-left:5px;cursor: pointer;display: none;">delete</i>
@@ -920,8 +920,14 @@
                                     <img class="fullscreenIcon hidden" src="./images/icon-fullscreen.svg">
                                     <img class="fullscreenIcon hidden" src="./images/icon-fullscreen-exit.svg">
 
-                                    <i id="repl_delete" class="material-icons sketch_name_icon right"
-                                        style="margin-left: 20px;cursor: pointer;position: absolute;top: 12px;right: 0px;display:none;">delete</i>
+                                    <!-- <i id="repl_delete" class="material-icons sketch_name_icon right"
+                                        style="margin-left: 20px;cursor: pointer;position: absolute;top: 12px;right: 0px;display:none;">delete</i> -->
+                                        <a  id="repl_delete" class="waves-effect waves-light btn" style="
+                                        padding:0 0.5rem;border-radius: 3px;height: 36px;
+                                        margin:0 20px;cursor: pointer;position: absolute;top: 12px;right: 0px;display:none;background-color: #ADADAD !important;
+                                        ">
+                                            <span style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;" class="translatable_Clear_data">清除数据</span>
+                                        </a>
                                 </div>
                                 <div class="card-content"
                                     style="position:relative;height: calc(100% - 90px);overflow:auto;margin-top: 45px;"
@@ -1059,16 +1065,16 @@
                                                 width: 88px;height: 36px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-play-circle"
                                                     aria-hidden="true"></i> -->
-                                                <img src="./images/run.png"
+                                                <img src="./images/run.svg"
                                                     style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
                                                 <span id="runCode"
                                                     style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
                                             </a>
                                             <a onclick="uploadpyfile()" id="uploadpy" class="waves-effect
                                             waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
-                                            width: 88px;height: 36px;">
+                                            width: 88px;height: 36px;margin: 0px 0px 0 25px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-upload" aria-hidden="true"></i> -->
-                                                <img src="./images/uploadCode.png"
+                                                <img src="./images/uploadCode.svg"
                                                     style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
                                                 <span id="uploadFiles"
                                                     style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
@@ -1100,7 +1106,7 @@
                                         <div class="col s5 btn-network" style="padding-right:1px;">
                                             <div class="select-wrapper initialized">
                                                 <!-- <span class="caret">▼</span> -->
-                                                <i class="down"></i>
+                                                <i class="down" style="position: relative;top: 25px;left: 0px;float: right;width: 12px;border-color: #ccc transparent transparent transparent;z-index: 99;"></i>
                                                 <input type="text" class="select-dropdown" id="select_dropdown"
                                                     readonly="true"
                                                     data-activates="select-options-eca84f35-6884-7dc4-9d8b-c14115abe698"
@@ -1209,9 +1215,9 @@
                                         <div class="col s6" style="float: right;">
                                             <div style="float: right;">
                                                 <div style="display: inline-block;vertical-align: middle;">
-                                                    <img id="runSuccess" src="./images/success.png"
+                                                    <img id="runSuccess" src="./images/success.svg"
                                                         style="display: none;" />
-                                                    <img id="runFail" src="./images/fail.png" style="display: none;" />
+                                                    <img id="runFail" src="./images/fail.svg" style="display: none;" />
                                                 </div>
                                                 <div style="display: inline-block;">
                                                     <span id="statusMsg" style="display: none;"></span>

+ 5 - 0
msg/en.js

@@ -1,6 +1,10 @@
 var Ardublockly = Ardublockly || {};
 
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "run failed",
+    upload_success: "run successfully!",
+    upload_fail2: "upload failed",
+    upload_success2: "upload successfully!",
     translationLanguage: "English",
     title: "CocoBlockly X",
     blocks: "Blocks",
@@ -470,6 +474,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "Suggest",
     Adapter_connected: "Adapter is connected",
     Adapter_fill_connected: "Adapter is disconnected",
+    Clear_data: "Clear Data",
     os: "System",
     browser: "Browser",
     select_Example: "Example",

+ 5 - 0
msg/zh-hans.js

@@ -1,5 +1,9 @@
 var Ardublockly = Ardublockly || {};
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "运行失败",
+    upload_success: "运行成功!",
+    upload_fail2: "上传失败",
+    upload_success2: "上传成功!",
     translationLanguage: "简体中文",
     title: "CocoBlockly X",
     blocks: "模块",
@@ -515,6 +519,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "建议",
     Adapter_connected: "适配器连接",
     Adapter_fill_connected: "适配器连接失败",
+    Clear_data: "清除数据",
     os: "系统",
     browser: "浏览器",
     select_Basics: "IoT模块基础案例",

+ 5 - 0
msg/zh-hant.js

@@ -1,6 +1,10 @@
 var Ardublockly = Ardublockly || {};
 
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "運行失敗",
+    upload_success: "運行成功!",
+    upload_fail2: "上傳失敗",
+    upload_success2: "上傳成功!",
     translationLanguage: "簡體中文",
     title: "CocoBlockly X",
     blocks: "模組",
@@ -518,6 +522,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "建議",
     Adapter_connected: "適配器連接",
     Adapter_fill_connected: "適配器連接失敗",
+    Clear_data: "清除數據",
     os: "系統",
     browser: "瀏覽器",
     select_Basics: "IoT 模組基礎案例",

+ 21 - 16
python/index.html

@@ -182,7 +182,7 @@
                         <a id="nav_language" class='dropdown-button lang_resize' data-activates='languages'
                             style="position:relative;padding: 0 25px;">
                             <span class="translatable_language" style="display: none;">Language</span>
-                            <img class="left nav-icon" src="./images/language.png" style="width: 30px;height: 50px;">
+                            <img class="left nav-icon" src="../images/language.svg" style="width: 30px;height: 50px;margin: 7px 0 0;">
                             <i class="down" style="position: relative;top: 30px;left: 2px;float: right;"></i>
                         </a>
                         <ul id='languages' class='dropdown-content active'>
@@ -938,17 +938,18 @@
                                 <div class="card-content"
                                     style="position:relative;height: calc(100% - 243px);overflow:auto;padding:5px 10px;background-color: #fff; color: #000;"
                                     id="repl_box">
-                                    <div class="editDiv" id="editDiv"
-                                        style="width: 100%;left: -10px;background: #E6F1FF;">
-                                        <span class="translatable_serial_plotter switch_select"
-                                            onclick="switchSerial('1')">The
+                                    <div class="editDiv" id="editDiv" style="width: 100%;left: -10px;background: #E6F1FF;">
+                                        <span class="translatable_serial_plotter switch_select" onclick="switchSerial('1')">The
                                             data to print</span>
-                                        <span class="translatable_serial_visualization"
-                                            onclick="switchSerial('2')">Visual
+                                        <span class="translatable_serial_visualization" onclick="switchSerial('2')">Visual
                                             display</span>
-
-                                        <i id="repl_delete" class="material-icons sketch_name_icon right"
-                                            style="margin-left: 20px;cursor: pointer;position: absolute;top: 6px;right: 12px;display:block;">delete</i>
+                                    
+                                        <!-- <i id="repl_delete" class="material-icons sketch_name_icon right"
+                                                                                style="margin-left: 20px;cursor: pointer;position: absolute;top: 6px;right: 12px;display:block;">delete</i> -->
+                                        <a id="repl_delete" class="waves-effect waves-light btn"
+                                            style="padding:0 0.5rem;border-radius: 3px;height: 36px; margin:0 20px;cursor: pointer;position: absolute;top: 50px;right: 0px;background-color: #ADADAD !important;">
+                                            <span style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;" class="translatable_Clear_data">清除数据</span>
+                                        </a>
                                     </div>
                                     <div class="blockpy-toolbar" id="repl_box_content"
                                         style="display:block;padding-top:35px;">
@@ -1043,16 +1044,16 @@
                                                 width: 88px;height: 36px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-play-circle"
                                                     aria-hidden="true"></i> -->
-                                                <img src="./images/run.png"
+                                                <img src="../images/run.svg"
                                                     style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
                                                 <span id="runCode"
                                                     style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
                                             </a>
                                             <a onclick="uploadpyfile()" id="uploadpy" class="waves-effect
                                             waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
-                                            width: 88px;height: 36px;">
+                                            width: 88px;height: 36px;margin: 0px 0px 0 25px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-upload" aria-hidden="true"></i> -->
-                                                <img src="./images/uploadCode.png"
+                                                <img src="../images/uploadCode.svg"
                                                     style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
                                                 <span id="uploadFiles"
                                                     style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
@@ -1082,7 +1083,11 @@
                                                 files</span></a>
 
                                         <div class="col s5 btn-network" style="padding-right:1px;">
-                                            <div class="select-wrapper initialized"><span class="caret">▼</span><input
+                                            <div class="select-wrapper initialized">
+                                                <!-- <span class="caret">▼</span> -->
+                                                <i class="down"
+                                                    style="position: relative;top: 25px;left: 0px;float: right;width: 12px;border-color: #ccc transparent transparent transparent;z-index: 99;"></i>
+                                                    <input
                                                     type="text" class="select-dropdown" id="select_dropdown"
                                                     readonly="true"
                                                     data-activates="select-options-eca84f35-6884-7dc4-9d8b-c14115abe698"
@@ -1181,9 +1186,9 @@
                                         <div class="col s6" style="float: right;">
                                             <div style="float: right;">
                                                 <div style="display: inline-block;vertical-align: middle;">
-                                                    <img id="runSuccess" src="./images/success.png"
+                                                    <img id="runSuccess" src="../images/success.svg"
                                                         style="display: none;" />
-                                                    <img id="runFail" src="./images/fail.png" style="display: none;" />
+                                                    <img id="runFail" src="../images/fail.svg" style="display: none;" />
                                                 </div>
                                                 <div style="display: inline-block;">
                                                     <span id="statusMsg" style="display: none;"></span>

+ 5 - 0
python/msg/en.js

@@ -1,6 +1,10 @@
 var Ardublockly = Ardublockly || {};
 
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "run failed",
+    upload_success: "run successfully!",
+    upload_fail2: "upload failed",
+    upload_success2: "upload successfully!",
     translationLanguage: "English",
     title: "CocoBlockly X",
     blocks: "Blocks",
@@ -470,6 +474,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "Suggest",
     Adapter_connected: "Adapter is connected",
     Adapter_fill_connected: "Adapter is disconnected",
+    Clear_data:"Clear Data",
     os: "System",
     browser: "Browser",
     select_Example: "Example",

+ 5 - 0
python/msg/zh-hans.js

@@ -1,5 +1,9 @@
 var Ardublockly = Ardublockly || {};
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "运行失败",
+    upload_success: "运行成功!",
+    upload_fail2: "上传失败",
+    upload_success2: "上传成功!",
     translationLanguage: "简体中文",
     title: "CocoBlockly X",
     blocks: "模块",
@@ -516,6 +520,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "建议",
     Adapter_connected: "适配器连接",
     Adapter_fill_connected: "适配器连接失败",
+    Clear_data: "清除数据",
     os: "系统",
     browser: "浏览器",
     select_Basics: "IoT模块基础案例",

+ 5 - 0
python/msg/zh-hant.js

@@ -1,6 +1,10 @@
 var Ardublockly = Ardublockly || {};
 
 Ardublockly.LOCALISED_TEXT = {
+    upload_fail: "運行失敗",
+    upload_success: "運行成功!",
+    upload_fail2: "上傳失敗",
+    upload_success2: "上傳成功!",
     translationLanguage: "簡體中文",
     title: "CocoBlockly X",
     blocks: "模組",
@@ -519,6 +523,7 @@ Ardublockly.LOCALISED_TEXT = {
     title_suggest: "建議",
     Adapter_connected: "適配器連接",
     Adapter_fill_connected: "適配器連接失敗",
+    Clear_data: "清除數據",
     os: "系統",
     browser: "瀏覽器",
     select_Basics: "IoT 模組基礎案例",

+ 16 - 2
python/src/blockly/cocoblockly.js

@@ -1559,10 +1559,24 @@ async function cocoblockly() {
         } else if (types[0] === 'upload') {
             if (types[1] === 'success') {
                 percent = '100%';
-                text = str_group.upload_success;
+                if (typeU == 1) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_success;
+                } else if (typeU == 2) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_success2;
+                } else {
+                    text = str_group.upload_success;
+                }
+                typeU = 0
             }
             else if (types[1] === 'error') {
-                text = str_group.upload_fail;
+                if (typeU == 1) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_fail;
+                } else if (typeU == 2) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_fail2;
+                } else {
+                    text = str_group.upload_fail;
+                }
+                typeU = 0
             }
         }
         CCB.status = 'idle';

+ 14 - 6
python/src/blockly/web.js

@@ -7,8 +7,13 @@ var put_file_data = null;
 var get_file_name = null;
 var get_file_data = null;
 var _filename;
+var typeU = 0;
 
 sendfile = function () {
+    if ($('#runCode')[0].innerHTML == CCB.str_group.run_code) {
+        typeU = 1;
+    }
+
     $('#error-btn').css('display', 'none');
     if (!(CCB.socket && CCB.socket.id)) {
         return;
@@ -48,11 +53,11 @@ sendfile = function () {
             complete: (data) => {
                 //成功之后去除上传中的提示,改成上传成功
                 $('#runCode')[0].innerHTML = CCB.str_group.run_code;
-                $('#runCode')[0].style.backgroundColor = "#508cf0";
+                // $('#runCode')[0].style.backgroundColor = "#508cf0";
             },
             error: function (error) {
                 $('#runCode')[0].innerHTML = CCB.str_group.run_code;
-                $('#runCode')[0].style.backgroundColor = "#508cf0";
+                // $('#runCode')[0].style.backgroundColor = "#508cf0";
             }
         });
     }
@@ -124,6 +129,9 @@ sendcontent = function (data) {
 }
 
 uploadpyfile = function () {
+    if ($('#uploadFiles')[0].innerHTML == CCB.str_group.uploadFiles) {
+        typeU = 2;
+    }
     $('#error-btn').css('display', 'none');
     var _codetext = blockpy.components.editor.codeMirror.getValue();
     if ($(".select-connected")[0].selectedIndex) {
@@ -139,11 +147,11 @@ uploadpyfile = function () {
             complete: (data) => {
                 //成功之后去除上传中的提示,改成上传成功
                 $('#uploadFiles')[0].innerHTML = Ardublockly.LOCALISED_TEXT.uploadFiles;
-                $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
+                // $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
             },
             error: function (error) {
                 $('#uploadFiles')[0].innerHTML = Ardublockly.LOCALISED_TEXT.uploadFiles;
-                $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
+                // $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
             }
         });
     }
@@ -172,11 +180,11 @@ uploadfile = function (type) {
                 complete: (data) => {
                     //成功之后去除上传中的提示,改成上传成功
                     $('#runCuploadFilesode')[0].innerHTML = _title;
-                    $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
+                    // $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
                 },
                 error: function (error) {
                     $('#runCuploadFilesode')[0].innerHTML = _title;
-                    $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
+                    // $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
                 }
             });
         }

+ 16 - 2
src/blockly/cocoblockly.js

@@ -1559,10 +1559,24 @@ async function cocoblockly() {
         } else if (types[0] === 'upload') {
             if (types[1] === 'success') {
                 percent = '100%';
-                text = str_group.upload_success;
+                if(typeU==1){
+                    text = Ardublockly.LOCALISED_TEXT.upload_success;
+                }else if(typeU==2){
+                    text = Ardublockly.LOCALISED_TEXT.upload_success2;
+                }else{
+                    text = str_group.upload_success;
+                }
+                typeU = 0
             }
             else if (types[1] === 'error') {
-                text = str_group.upload_fail;
+                if (typeU == 1) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_fail;
+                } else if (typeU == 2) {
+                    text = Ardublockly.LOCALISED_TEXT.upload_fail2;
+                } else {
+                    text = str_group.upload_fail;
+                }
+                typeU = 0
             }
         }
         CCB.status = 'idle';

+ 14 - 6
src/blockly/web.js

@@ -7,8 +7,13 @@ var put_file_data = null;
 var get_file_name = null;
 var get_file_data = null;
 var _filename;
+var typeU = 0;
 
 sendfile = function () {
+    if ($('#runCode')[0].innerHTML == CCB.str_group.run_code){
+        typeU = 1;
+    }
+
     $('#error-btn').css('display', 'none');
     if (!(CCB.socket && CCB.socket.id)) {
         return;
@@ -48,11 +53,11 @@ sendfile = function () {
             complete: (data) => {
                 //成功之后去除上传中的提示,改成上传成功
                 $('#runCode')[0].innerHTML = CCB.str_group.run_code;
-                $('#runCode')[0].style.backgroundColor = "#508cf0";
+                // $('#runCode')[0].style.backgroundColor = "#508cf0";
             },
             error: function (error) {
                 $('#runCode')[0].innerHTML = CCB.str_group.run_code;
-                $('#runCode')[0].style.backgroundColor = "#508cf0";
+                // $('#runCode')[0].style.backgroundColor = "#508cf0";
             }
         });
     }
@@ -124,6 +129,9 @@ sendcontent = function (data) {
 }
 
 uploadpyfile = function () {
+    if ($('#uploadFiles')[0].innerHTML == CCB.str_group.uploadFiles) {
+        typeU = 2;
+    }
     $('#error-btn').css('display', 'none');
     var _codetext = blockpy.components.editor.codeMirror.getValue();
     if ($(".select-connected")[0].selectedIndex) {
@@ -139,11 +147,11 @@ uploadpyfile = function () {
             complete: (data) => {
                 //成功之后去除上传中的提示,改成上传成功
                 $('#uploadFiles')[0].innerHTML = Ardublockly.LOCALISED_TEXT.uploadFiles;
-                $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
+                // $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
             },
             error: function (error) {
                 $('#uploadFiles')[0].innerHTML = Ardublockly.LOCALISED_TEXT.uploadFiles;
-                $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
+                // $('#uploadFiles')[0].style.backgroundColor = "#508cf0";
             }
         });
     }
@@ -172,11 +180,11 @@ uploadfile = function (type) {
                 complete: (data) => {
                     //成功之后去除上传中的提示,改成上传成功
                     $('#runCuploadFilesode')[0].innerHTML = _title;
-                    $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
+                    // $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
                 },
                 error: function (error) {
                     $('#runCuploadFilesode')[0].innerHTML = _title;
-                    $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
+                    // $('#runCuploadFilesode')[0].style.backgroundColor = "#508cf0";
                 }
             });
         }

+ 3 - 1
src/interface.html

@@ -74,7 +74,9 @@
                     </div>
                     <div class="row btn-network">
                         <div class="col s6" style="padding-right:1px;">
-                            <div class="select-wrapper initialized"><span class="caret">▼</span><input type="text"
+                            <div class="select-wrapper initialized"><span class="caret">▼</span>
+                                <i class="down" style="position: relative; top: 30px; left: 2px; float: right;"></i>
+                                <input type="text"
                                     class="select-dropdown" id="select_dropdown" readonly="true"
                                     data-activates="select-options-eca84f35-6884-7dc4-9d8b-c14115abe698"
                                     value="检测不到连接端口">

文件差异内容过多而无法显示
+ 0 - 0
src/interface.js


部分文件因为文件数量过多而无法显示