panweitong 3 năm trước cách đây
mục cha
commit
cf7f0f0a2b

+ 52 - 4
index.css

@@ -1171,13 +1171,17 @@ table td, th {
     width: 240px !important
 }
 
- .blue{
+.blue{
     background-color: #4A6AFF !important;
- }
+}
  
- .green {
+.green {
     background-color: #24AF00 !important;
- }
+}
+
+.gray {
+    background-color: #ADADAD !important;
+}
 
  #plugin_mac_or_windows,#connect_method,#local_help_ai_kit, #help_extends{
     background-color: #fff;
@@ -1311,4 +1315,48 @@ table td, th {
 
 .backdrop {
     background-color: #ffffff;
+}
+
+.firmware_upgrade_modal {
+    top: 25% !important;
+    width: 600px;
+    max-height: 330px;
+    background-color: #ffffff;
+    box-shadow: 0 0 10px 0 rgba(0,0,0,0.25);
+    border-radius: 3px;
+}
+
+#firmware_upgrade_Area {
+    height: 282px;
+    overflow-y: auto;
+    background-color: #ffffff;
+}
+
+.firmware_module {
+    width: 130px;
+    height: 130px;
+    background: #FFFFFF;
+    border: 2px solid #CCCCCC;
+    border-radius: 3px;
+    display: inline-block;
+    margin-top: 8%;
+}
+
+.firmware_module_iot,.firmware_module_ai {
+    font-size: 18px;
+    color: #2D2F33;
+    letter-spacing: 0;
+    display: table-cell;
+    vertical-align: middle;
+}
+
+.firmware_module_download {
+    display: inline-block;
+    margin-top: 4%;
+}
+
+.button_text{
+   font-size: 14px;
+   color: #FFFFFF;
+   letter-spacing: 0;
 }

+ 70 - 2
index.html

@@ -249,7 +249,7 @@
                                     </li>
                                 </ul>
                             </li>
-                            <li id="button_upgrade_firmware">
+                            <li id="button_upgrade_firmware" class="modal-trigger" href = "#firmware_upgrade_modal">
                                 <span class="translatable_upgrade_firmware">固件升级</span>
                             </li>
                             <li id="button_connection_type" style="display: none;">
@@ -911,7 +911,7 @@
                                     59px;"> <img id="blockpy-toolbar-download" src="./images/icon-download.svg"
                                             style="margin-top: 7px;">
                                     </a>
-                                    <a class="blockpy-toolbar-upload" style="position:absolute;top: 5px;right: 25px;">
+                                    <a class="blockpy-toolbar-upload modal-trigger" style="position:absolute;top: 5px;right: 25px;" href="#cloud_storage_name_modal">
                                         <img id="blockpy-toolbar-upload" src="./images/icon-upload.svg"
                                             style="margin-top: 7px;"> </a>
                                     <img class="fullscreenIcon hidden" src="./images/icon-fullscreen.svg">
@@ -2814,6 +2814,74 @@
             </p>
         </div>
     </div>
+
+    <div id="cloud_storage_name_modal" class="modal modal_closes">
+        <div class="modal-content">
+            <span class="modal_close" style="padding: 15px;">
+                <i class="small material-icons" style="font-size: 1.5rem;">close</i>
+            </span>
+            <h4 class="translatable_cloudStorageTitle">Cloud Storage</h4>
+            <!-- <div id="cloud_askLogin"></div> -->
+            <div id="cloud_fileListArea" class="cloud-file">
+            </div>
+        </div>
+        <div id="cloud_modal_preload" style="display:none">
+            <div style="position:relative;top:50%;transform:translateY(-50%);height:128px;width:128px;margin:0 auto;">
+                <div class="preloader-wrapper big active" style="top:0;left:0">
+                    <div class="spinner-layer spinner-blue-only">
+                        <div class="circle-clipper left">
+                            <div class="circle"></div>
+                        </div>
+                        <div class="gap-patch">
+                            <div class="circle"></div>
+                        </div>
+                        <div class="circle-clipper right">
+                            <div class="circle"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <div id="firmware_upgrade_modal" class="modal modal_closes firmware_upgrade_modal">
+        <div class="modal-content">
+            <span class="modal_close" style="padding: 15px;">
+                <i class="small material-icons" style="font-size: 1.5rem;">close</i>
+            </span>
+            <div id="firmware_upgrade_Area">
+                <div style="text-align: center;">
+                    <div class="firmware_module" style="margin-right: 20%;">
+                        <div style="display: table;width: 126px;height: 126px;">
+                            <div class="firmware_module_ai"><div class="translatable_ai_module_a">AI 模块</div>V1.0</div>
+                        </div>
+                    </div>
+                    <div class="firmware_module">
+                        <div style="display: table;width: 126px;height: 126px;">
+                            <div class="firmware_module_iot"><div class="translatable_iot_module_a">IOT 模块</div>V0.2</div>
+                        </div>
+                    </div>
+                </div>
+                <div style="text-align: center;">
+                    <div class="firmware_module_download" style="margin-right: 20%;">
+                        <div style="display: table;">
+                            <button style="background: #4A6AFF;border-radius: 3px;width: 130px;line-height: 36px;border: none;">
+                                <span class="button_text translatable_button_text">下载固件升级包</span>
+                            </button>
+                        </div>
+                    </div>
+                    <div class="firmware_module_download">
+                        <div style="display: table;">
+                            <button style="background: #4A6AFF;border-radius: 3px;width: 130px;line-height: 36px;border: none;">
+                                <span class="button_text translatable_button_text">下载固件升级包</span>
+                            </button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
     <!-- local storage - export modal -->
     <div id="Storage_export_modal" class="modal" style="width:730px">
         <div class="modal-content">

+ 1 - 1
index.js

@@ -395,7 +395,7 @@ window.onload = function () {
     }, 300)
     uploadXmlButton.val("");
   });
-  $('.blockpy-toolbar-upload').click(e => $('#pyFileImport > input').click());
+  // $('.blockpy-toolbar-upload').click(e => $('#pyFileImport > input').click());
   fanyi();
   selectOnload();
   styled()

+ 3 - 0
msg/en.js

@@ -66,6 +66,9 @@ Ardublockly.LOCALISED_TEXT = {
     help_board: "Help",
     learn_board: "Files",
     files: "Files",
+    button_text: "Download",
+    ai_module_a: "AI module",
+    iot_module_a: "IOT module",
     import_local_file: "Import Local Files",
     import_cloud_file: "Import Cloud Files",
     export_local_file: "Export Local Files",

+ 3 - 0
msg/zh-hans.js

@@ -63,6 +63,9 @@ Ardublockly.LOCALISED_TEXT = {
     help_board: "帮助",
     learn_board: "学习",
     files: "文件",
+    button_text: "下载固件升级包",
+    ai_module_a: "AI 模块",
+    iot_module_a: "IOT 模块",
     import_local_file: "导入本地文件",
     import_cloud_file: "导入云端文件",
     export_local_file: "保存到本地",

+ 3 - 0
msg/zh-hant.js

@@ -63,6 +63,9 @@ Ardublockly.LOCALISED_TEXT = {
     cloudStorageTitle: "雲端存儲",
     help_board: "幫助",
     files: "檔案",
+    button_text: "下載固件升級包",
+    ai_module_a: "AI 模組",
+    iot_module_a: "IOT 模組",
     import_local_file: "導入本地檔案",
     import_cloud_file: "導入雲端檔案",
     export_local_file: "保存到本地",

+ 48 - 0
python/index.css

@@ -1183,6 +1183,10 @@ table td, th {
      background-color: #24AF00 !important;
 }
 
+.gray {
+    background-color: #ADADAD !important;
+}
+
 #plugin_mac_or_windows,#connect_method,#local_help_ai_kit, #help_extends{
     background-color: #fff;
     margin: 0;
@@ -1268,4 +1272,48 @@ table td, th {
 .backdrop {
     background-color: #ffffff;
 }
+
+.firmware_upgrade_modal {
+    top: 25% !important;
+    width: 600px;
+    max-height: 330px;
+    background-color: #ffffff;
+    box-shadow: 0 0 10px 0 rgba(0,0,0,0.25);
+    border-radius: 3px;
+}
+
+#firmware_upgrade_Area {
+    height: 282px;
+    overflow-y: auto;
+    background-color: #ffffff;
+}
+
+.firmware_module {
+    width: 130px;
+    height: 130px;
+    background: #FFFFFF;
+    border: 2px solid #CCCCCC;
+    border-radius: 3px;
+    display: inline-block;
+    margin-top: 8%;
+}
+
+.firmware_module_iot,.firmware_module_ai {
+    font-size: 18px;
+    color: #2D2F33;
+    letter-spacing: 0;
+    display: table-cell;
+    vertical-align: middle;
+}
+
+.firmware_module_download {
+    display: inline-block;
+    margin-top: 4%;
+}
+
+.button_text{
+   font-size: 14px;
+   color: #FFFFFF;
+   letter-spacing: 0;
+}
   

+ 41 - 1
python/index.html

@@ -249,7 +249,7 @@
                                     </li>
                                 </ul>
                             </li>
-                            <li id="button_upgrade_firmware">
+                            <li id="button_upgrade_firmware" class="modal-trigger" href = "#firmware_upgrade_modal">
                                 <span class="translatable_upgrade_firmware">固件升级</span>
                             </li>
                             <li id="button_connection_type" style="display: none;">
@@ -2071,6 +2071,46 @@
                 </div>
             </div>
         </div>
+
+        <div id="firmware_upgrade_modal" class="modal modal_closes firmware_upgrade_modal">
+            <div class="modal-content">
+                <span class="modal_close" style="padding: 15px;">
+                    <i class="small material-icons" style="font-size: 1.5rem;">close</i>
+                </span>
+                <div id="firmware_upgrade_Area">
+                    <div style="text-align: center;">
+                        <div class="firmware_module" style="margin-right: 20%;">
+                            <div style="display: table;width: 126px;height: 126px;">
+                                <div class="firmware_module_ai"><div class="translatable_ai_module_a">AI 模块</div>V1.0</div>
+                            </div>
+                        </div>
+                        <div class="firmware_module">
+                            <div style="display: table;width: 126px;height: 126px;">
+                                <div class="firmware_module_iot"><div class="translatable_iot_module_a">IOT 模块</div>V0.2</div>
+                            </div>
+                        </div>
+                    </div>
+                    <div style="text-align: center;">
+                        <div class="firmware_module_download" style="margin-right: 20%;">
+                            <div style="display: table;">
+                                <button style="background: #4A6AFF;border-radius: 3px;width: 130px;line-height: 36px;border: none;">
+                                    <span class="button_text translatable_button_text">下载固件升级包</span>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="firmware_module_download">
+                            <div style="display: table;">
+                                <button style="background: #4A6AFF;border-radius: 3px;width: 130px;line-height: 36px;border: none;">
+                                    <span class="button_text translatable_button_text">下载固件升级包</span>
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+
         <!-- webcam input modal -->
         <div id="webcam_capture_modal" class="modal">
             <div id="emotionRecognitionTitle" class="modal-content">

+ 3 - 0
python/msg/en.js

@@ -66,6 +66,9 @@ Ardublockly.LOCALISED_TEXT = {
     help_board: "Help",
     learn_board: "Files",
     files: "Files",
+    button_text: "Download",
+    ai_module_a: "AI module",
+    iot_module_a: "IOT module",
     import_local_file: "Import Local Files",
     import_cloud_file: "Import Cloud Files",
     export_local_file: "Export Local Files",

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

@@ -64,6 +64,9 @@ Ardublockly.LOCALISED_TEXT = {
     help_board: "帮助",
     learn_board: "学习",
     files: "文件",
+    button_text: "下载固件升级包",
+    ai_module_a: "AI 模块",
+    iot_module_a: "IOT 模块",
     import_local_file: "导入本地文件",
     import_cloud_file: "导入云端文件",
     export_local_file: "保存到本地",

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

@@ -64,6 +64,9 @@ Ardublockly.LOCALISED_TEXT = {
     cloudStorageTitle: "雲端存儲",
     help_board: "幫助",
     files: "檔案",
+    button_text: "下載固件升級包",
+    ai_module_a: "AI 模組",
+    iot_module_a: "IOT 模組",
     import_local_file: "導入本地檔案",
     import_cloud_file: "導入雲端檔案",
     export_local_file: "保存到本地",

+ 9 - 0
python/src/blockly/cocoblockly.js

@@ -598,8 +598,17 @@ function progress_text(msg, percent) {
         $("#runFail").css("display", "block") :
         $("#runFail").css("display", "none");
 
+    msg == CCB.str_group.upload_fail ?
+        $(".determinate")[0].className = "determinate green gray" :
+        $(".determinate")[0].className = "determinate green";
+    
+
     $('.progress > .determinate').css('width', percent);
 
+    msg == CCB.str_group.upload_fail ?
+        $(".determinate").css("width","100%") :
+        '';
+
     disableCompileUploadBtn();
 }
 

+ 9 - 0
src/blockly/cocoblockly.js

@@ -600,8 +600,17 @@ function progress_text(msg, percent) {
         $("#runFail").css("display", "block") :
         $("#runFail").css("display", "none");
 
+    msg == CCB.str_group.upload_fail ?
+        $(".determinate")[0].className = "determinate green gray" :
+        $(".determinate")[0].className = "determinate green";
+
+
     $('.progress > .determinate').css('width', percent);
 
+    msg == CCB.str_group.upload_fail ?
+        $(".determinate").css("width","100%") :
+        '';
+
     disableCompileUploadBtn();
 }