Skip to content

Commit

Permalink
English Version
Browse files Browse the repository at this point in the history
  • Loading branch information
naibo committed Jul 7, 2023
1 parent 08dc87d commit b73a2a9
Show file tree
Hide file tree
Showing 18 changed files with 360 additions and 1,326 deletions.
3 changes: 2 additions & 1 deletion .temp_to_pub/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ EasySpider.app/
EasySpider_windows_x64/user_data
*.tmp
*.7z*
config.json
config.json
mysql_config.json
6 changes: 6 additions & 0 deletions .temp_to_pub/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def compress_folder_to_7z_split(folder_path, output_file):
if os.path.exists("./EasySpider_windows_x64/user_data"):
shutil.rmtree("./EasySpider_windows_x64/user_data")
shutil.rmtree("./EasySpider_windows_x64/Data")
shutil.rmtree("./EasySpider_windows_x64/config.json")
shutil.rmtree("./EasySpider_windows_x64/mysql_config.json")
shutil.rmtree("./EasySpider_windows_x64/execution_instances")
os.mkdir("./EasySpider_windows_x64/Data")
os.mkdir("./EasySpider_windows_x64/execution_instances")
Expand All @@ -61,6 +63,8 @@ def compress_folder_to_7z_split(folder_path, output_file):
shutil.rmtree("./EasySpider_windows_x86/user_data")
shutil.rmtree("./EasySpider_windows_x86/Data")
shutil.rmtree("./EasySpider_windows_x86/execution_instances")
shutil.rmtree("./EasySpider_windows_x86/config.json")
shutil.rmtree("./EasySpider_windows_x86/mysql_config.json")
os.mkdir("./EasySpider_windows_x86/Data")
os.mkdir("./EasySpider_windows_x86/execution_instances")
compress_folder_to_7z("./EasySpider_windows_x64", file_name)
Expand All @@ -71,6 +75,8 @@ def compress_folder_to_7z_split(folder_path, output_file):
shutil.rmtree("./EasySpider_Linux_x64/user_data")
shutil.rmtree("./EasySpider_Linux_x64/Data")
shutil.rmtree("./EasySpider_Linux_x64/execution_instances")
shutil.rmtree("./EasySpider_Linux_x64/config.json")
shutil.rmtree("./EasySpider_Linux_x64/mysql_config.json")
os.mkdir("./EasySpider_Linux_x64/Data")
os.mkdir("./EasySpider_Linux_x64/execution_instances")
# compress_folder_to_7z("./EasySpider_Linux_x64", file_name)
Expand Down
6 changes: 3 additions & 3 deletions ElectronJS/change_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def update_file_version(file_path, new_version, key="当前版本/Current Versio
file_path = "../.temp_to_pub/compress.py"
update_file_version(file_path, version, key='easyspider_version = "')

file_path = "./src/taskGrid/logic.js"
file_path = "./src/taskGrid/logic_deprecated.js"
update_file_version(file_path, version, key='"version": "')

file_path = "./src/taskGrid/logic_CN.js"
update_file_version(file_path, version, key='"version": "')
# file_path = "./src/taskGrid/logic.js"
# update_file_version(file_path, version, key='"version": "')

file_path = "../ExecuteStage/easyspider_executestage.py"
update_file_version(file_path, version, key='"version": "')
Expand Down
7 changes: 7 additions & 0 deletions ElectronJS/detect_chinese.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import re

with open('src/taskGrid/FlowChart.js', 'r', encoding='utf-8') as file:
for line in file:
line = re.split('//', line)[0]
if re.search('[\u4e00-\u9fff]', line):
print(line)
8 changes: 4 additions & 4 deletions ElectronJS/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function createWindow() {

// and load the index.html of the app.
// mainWindow.loadFile('src/index.html');
mainWindow.loadURL(server_address + '/index.html?user_data_folder=' + config.user_data_folder);
mainWindow.loadURL(server_address + '/index.html?user_data_folder=' + config.user_data_folder, { extraHeaders: 'pragma: no-cache\n' });
// 隐藏菜单栏
const {Menu} = require('electron');
Menu.setApplicationMenu(null);
Expand All @@ -118,7 +118,7 @@ async function beginInvoke(msg, ws) {
url = server_address + `/taskGrid/FlowChart.html?id=${msg.message.id}&wsport=${websocket_port}&backEndAddressServiceWrapper=` + server_address;
}
console.log(url);
flowchart_window.loadURL(url);
flowchart_window.loadURL(url, { extraHeaders: 'pragma: no-cache\n' });
}
mainWindow.hide();
// Prints the currently focused window bounds.
Expand Down Expand Up @@ -475,7 +475,7 @@ function handleOpenBrowser(event, lang = "en", user_data_folder = "", mobile = f
url = server_address + `/taskGrid/FlowChart_CN.html?id=${id}&wsport=${websocket_port}&backEndAddressServiceWrapper=` + server_address+ "&mobile=" + mobile.toString();
}
// and load the index.html of the app.
flowchart_window.loadURL(url);
flowchart_window.loadURL(url, { extraHeaders: 'pragma: no-cache\n' });
if(process.platform != "darwin"){
flowchart_window.hide();
}
Expand All @@ -495,7 +495,7 @@ function handleOpenInvoke(event, lang = "en") {
url = server_address + `/taskGrid/taskList.html?type=1&wsport=${websocket_port}&backEndAddressServiceWrapper=` + server_address + "&lang=zh";
}
// and load the index.html of the app.
window.loadURL(url);
window.loadURL(url, { extraHeaders: 'pragma: no-cache\n' });
window.maximize();
mainWindow.hide();
window.on('close', function (event) {
Expand Down
8 changes: 4 additions & 4 deletions ElectronJS/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h4 style="margin-top: 20px">Please select design mode</h4>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Data Mode</a>
</p>

<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">Go to Home Page</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>

</div>
<div v-else-if="step == 2">
Expand All @@ -111,13 +111,13 @@ <h4 style="margin-top: 20px">Specify user data folder</h4>
</div>
<p><a @click="startDesign('en', true)"
class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">Start Design</a></p>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design</a></p>
<p>
<p><a @click="startDesign('en', true, true)"
class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">Start Design (Mobile)</a></p>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design (Mobile)</a></p>
<p>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">Go to Home Page</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>
</p>
</div>
</div>
Expand Down
Loading

0 comments on commit b73a2a9

Please sign in to comment.