diff --git a/Aida/python.html b/Aida/python.html
index c7113fb..cbdbdef 100644
--- a/Aida/python.html
+++ b/Aida/python.html
@@ -290,6 +290,7 @@
var autoScroll = true; // Ming 2024-08-29
var isUserScrolling = false; // Ming 2024-08-29
Status_intervalId = null;
+ var dots = 0;
// 取得語系
func_get_lang_cookie();
@@ -616,6 +617,7 @@
if (g_isPythonRunning == 1 || getBufferStatusTemp == 2)
{
func_getPythonBuffer();
+
}
else if (g_isPythonRunning = 0 || getBufferSignal == 0) // python finish or stop need to clear file
{
@@ -650,6 +652,7 @@
method: "GET",
async: true,
success: function (retdata) {
+
// console.log("GET request succeeded.");
var existData = $('#console').html();
// console.log("Get Data: ", retdata);
@@ -657,8 +660,9 @@
// $('#console').append(retdata);
displayData = func_checkSpecialChar(retdata);
//console.log("Get displayData",JSON.stringify(displayData));
+ clearInterval(loadingInterval);
$('#console').append(displayData);
-
+
// 根據 autoScroll 開關自動滾動 Ming 2024-08-29
if (autoScroll) {
var textarea = $('#console')[0];
@@ -718,6 +722,13 @@
//console.log(file_name);
updateFileIcon();
+ // 顯示 "Running" 動態點點效果
+ loadingInterval = setInterval(function() {
+ var loadingText = "Running" + ".".repeat(dots % 4);
+ $('#console').html(loadingText);
+ dots++;
+ }, 500); // 每0.5秒更新一次
+
$.ajax({
url: "/sendpycode",
method: "POST",
@@ -790,9 +801,12 @@
currentRunningFile = jsonbuf["system_setting"]["enable_python_file"];
g_isPythonRunning = 1;
if (currentRunningFile.endsWith('.py')) {
- $('#console').html("Execute unfinished python file !!");
- $('#console').append('
'); // 換行
- $('#console').append("Running...");
+ // 顯示 "Running" 動態點點效果
+ loadingInterval = setInterval(function() {
+ var loadingText = "Running unfinished python file" + ".".repeat(dots % 4);
+ $('#console').html(loadingText);
+ dots++;
+ }, 500); // 每0.5秒更新一次
$('#console').append('
'); // 換行
//console.log("find enable python file !!!!!!!!!!!!!! ");
}