Compare commits

...

4 Commits

Author SHA1 Message Date
2735957340 Fix board size precision 2025-09-27 18:27:53 +08:00
1ae3b9ff77 update README 2025-09-27 18:13:50 +08:00
c792a8c8fd modify check update target 2025-09-27 18:08:22 +08:00
ef521ec2b0 Supports automatic recognition of PCB layers 2025-09-27 17:21:55 +08:00
7 changed files with 2097 additions and 1723 deletions

View File

@ -1,3 +1,13 @@
# 1.1.1
修复板子大小精度问题,自动识别将保留两位小数
# 1.1.0
1. 支持自动识别板子层数
2. 更新依赖 pro-api-types
3. 检查更新目标更改为 Github Releases
# 1.0.2
1. 检查更新功能

View File

@ -8,7 +8,7 @@
参考 [嘉立创 EDA 用户指南](https://prodocs.lceda.cn/cn/api/user-guide/using-extension.html#%E5%AE%89%E8%A3%85%E6%89%A9%E5%B1%95) 安装扩展。
*使用本扩展的“检查更新”功能需要给予扩展“外部交互”权限。*
_使用本扩展的“检查更新”功能需要给予扩展“外部交互”权限。_
### 使用扩展
@ -16,19 +16,22 @@
可直接在主界面选择 PCB 生产工艺参数,点击“前往下单”按钮即可前往捷配下单 PCB 页面。
> [!IMPORTANT]
> **下单前务必仔细检查所有项目是否符合预期,捷配官网可能与本扩展显示存在出入,本扩展不对工艺组合可行性进行验证,以捷配官网为准。**
> [!IMPORTANT] > **下单前务必仔细检查所有项目是否符合预期,捷配官网可能与本扩展显示存在出入,本扩展不对工艺组合可行性进行验证,以捷配官网为准。**
**本扩展提供“工艺预设”功能**,可将常用的工艺参数保存为预设,方便下次使用:
- 【**新建预设**】在“下单”界面顶部“订单工艺预设”面板新建预设,设置工艺参数与个性化服务选项,点击底部“保存预设”按钮即可保存;
- 【**使用预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,将自动应用此前保存的参数与个性化选项;
- 【**删除预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,点击底部“删除预设”按钮即可删除。
**本扩展支持自动计算 PCB 尺寸**,点击“选择板框”按钮后在画布上选择板框图元,即可自动计算板框大小。
- 【**新建预设**】在“下单”界面顶部“订单工艺预设”面板新建预设,设置工艺参数与个性化服务选项,点击底部“保存预设”按钮即可保存;
- 【**使用预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,将自动应用此前保存的参数与个性化选项;
- 【**删除预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,点击底部“删除预设”按钮即可删除。
本扩展支持自动计算:
- 【**PCB 层数**】点击“板子层数”右侧“识别”按钮后即可自动计算板子层数。**注意EDA 仅支持绘制偶数层铜箔的 PCB因此识别到的板子层数必然为偶数**
- 【**PCB 尺寸**】点击“板子大小”右侧的“选择板框”按钮后在画布上选择板框图元,即可自动计算板框大小。
## 即将推出的新特性
- 自动识别板子层数【Coming s∞n】
- ~~自动识别板子层数~~ ——_V1.1.0_
## 开源许可

View File

@ -3,7 +3,7 @@
"uuid": "817c3321fba54f70b0186500933ed47b",
"displayName": "捷配下单助手",
"description": "一键前往捷配下单 PCB支持保存下单偏好",
"version": "1.0.3",
"version": "1.1.1",
"publisher": "Mr_Fang",
"engines": {
"eda": "^2.3.0"
@ -11,14 +11,14 @@
"license": "Apache-2.0",
"repository": {
"type": "github",
"url": "https://github.com/klxf/"
"url": "https://github.com/klxf/eext-jiepei-helper"
},
"categories": "Other",
"keywords": ["Helper"],
"images": {
"logo": "./images/logo.png"
},
"homepage": "https://extensions.oshwhub.com/item/fangs233/jiepei-helper",
"homepage": "https://github.com/klxf/eext-jiepei-helper",
"bugs": "https://github.com/klxf/eext-jiepei-helper/issues",
"activationEvents": {},
"entry": "./dist/index",

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>关于软件</title>
<link rel="stylesheet" href="/iframe/css/index.css">
</head>
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
<div class="min-h-screen bg-gray-100 flex items-center justify-center">
<link rel="stylesheet" href="/iframe/css/index.css" />
</head>
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
<div class="min-h-screen bg-gray-100 flex items-center justify-center">
<div class="bg-white p-4 rounded-lg w-[400px] h-[200px] flex flex-col justify-between items-center text-center">
<div>
<h1 class="text-2xl font-bold text-gray-800 mb-2" id="name"></h1>
@ -17,26 +17,18 @@
</div>
<div class="flex justify-center space-x-4 mt-auto">
<a id="home" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out">
🏠 扩展主页
</a>
<a id="bugs" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out">
🐞 Bug反馈
</a>
<a id="check" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out">
✨ 检查更新
</a>
<a id="home" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out"> 🏠 扩展主页 </a>
<a id="bugs" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out"> 🐞 Bug反馈 </a>
<a id="check" class="text-blue-600 hover:text-blue-800 text-sm transition duration-300 ease-in-out"> ✨ 检查更新 </a>
</div>
<div class="flex justify-center text-[12px] text-gray-500 mt-2">
本扩展使用 Apache-2.0 许可协议开源
<div class="flex justify-center text-[12px] text-gray-500 mt-2">本扩展使用 Apache-2.0 许可协议开源</div>
</div>
</div>
</div>
<script>
<script>
// 页面加载完成
document.addEventListener('DOMContentLoaded', async function () {
const file = await eda.sys_FileSystem.getExtensionFile("/extension.json");
const file = await eda.sys_FileSystem.getExtensionFile('/extension.json');
if (file) {
const extensionData = JSON.parse(await file.text());
document.getElementById('name').textContent = extensionData.displayName;
@ -59,6 +51,40 @@
document.getElementById('check').addEventListener('click', function (event) {
event.preventDefault();
eda.sys_ClientUrl
.request('https://api.github.com/repos/klxf/eext-jiepei-helper/releases/latest', 'GET')
.then((response) => response.json())
.then((data) => {
if (data && data.tag_name) {
const latestVersion = data.tag_name.replace('v', '');
const currentVersion = document.getElementById('version').textContent.replace('V', '');
// 比较版本号latestVersion 和 currentVersion
const latestParts = latestVersion.split('.').map(Number);
const currentParts = currentVersion.split('.').map(Number);
let isNewVersionAvailable = false;
for (let i = 0; i < Math.max(latestParts.length, currentParts.length); i++) {
const latestPart = latestParts[i] || 0;
const currentPart = currentParts[i] || 0;
if (latestPart > currentPart) {
isNewVersionAvailable = true;
break;
} else if (latestPart < currentPart) {
break;
}
}
if (isNewVersionAvailable) {
eda.sys_Message.showToastMessage(`😋 有新版本可用: V${latestVersion}`, 'info');
document.getElementById('tip').innerHTML =
`<a href="${data.html_url}" target="_blank" class="text-blue-600 hover:text-blue-800">前往更新新版本</a>`;
} else {
eda.sys_Message.showToastMessage('👍 当前已是最新版本', 'success');
}
} else {
eda.sys_Message.showToastMessage('🥺 获取版本信息失败', 'error');
}
});
/* 已下架,弃用
eda.sys_ClientUrl.request("https://extensions.oshwhub.com/api/v1/extensions/his_version_list?bizKey=188546598067642368", "GET")
.then(response => response.json())
.then(data => {
@ -90,7 +116,8 @@
eda.sys_Message.showToastMessage("🥺 获取版本信息失败", 'error');
}
});
})
</script>
</body>
*/
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

8
package-lock.json generated
View File

@ -9,7 +9,7 @@
"version": "1.1.1",
"license": "Apache-2.0",
"devDependencies": {
"@jlceda/pro-api-types": "^0.1.156",
"@jlceda/pro-api-types": "^0.1.175",
"@microsoft/tsdoc": "^0.15.1",
"@tailwindcss/cli": "^4.1.8",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
@ -900,9 +900,9 @@
}
},
"node_modules/@jlceda/pro-api-types": {
"version": "0.1.156",
"resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.156.tgz",
"integrity": "sha512-U26OzNETxZZfwGS3sfqQ7emclnwWgD72gWCtgU99TwMBAV+G5kP8Fd65w7nKqMcTVVG0TlSbsgUdNW/IPD8HcA==",
"version": "0.1.175",
"resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.175.tgz",
"integrity": "sha512-83opK7FZmtm5GFkfulYuCWHOhFO+WYocjfiuRh1K2PQaPeIe+/e3wKE4vUBcKptGajePpyDlfKL4UXTFVBe+Vg==",
"dev": true,
"license": "Apache-2.0"
},

View File

@ -15,7 +15,7 @@
"build": "npm run tailwind && npm run compile && ts-node ./build/packaged.ts"
},
"devDependencies": {
"@jlceda/pro-api-types": "^0.1.156",
"@jlceda/pro-api-types": "^0.1.175",
"@microsoft/tsdoc": "^0.15.1",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
"@types/fs-extra": "^11.0.4",