6 Commits

Author SHA1 Message Date
3109d28270 Update to 1.2.0 2025-10-13 15:10:43 +08:00
bd788f8737 Update to 1.2.0 2025-10-13 15:09:02 +08:00
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 2153 additions and 1722 deletions

View File

@@ -1,3 +1,19 @@
# 1.2.0
1. 支持将下单预设内嵌至 PCB
2. 前往下单时将自动导出 Berber 制板文件
3. extension.json 的 engines.eda 字段新增对 V3 的支持
# 1.1.1
修复板子大小精度问题,自动识别将保留两位小数
# 1.1.0
1. 支持自动识别板子层数
2. 更新依赖 pro-api-types
3. 检查更新目标更改为 Github Releases
# 1.0.2 # 1.0.2
1. 检查更新功能 1. 检查更新功能

View File

@@ -1,5 +1,7 @@
# 捷配下单助手 # 捷配下单助手
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/klxf/eext-jiepei-helper?style=flat-square&label=Stars"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/klxf/eext-jiepei-helper?style=flat-square&label=Release&color=%233fb950"><img alt="GitHub License" src="https://img.shields.io/github/license/klxf/eext-jiepei-helper?style=flat-square&label=License"><img alt="GitHub Downloads" src="https://img.shields.io/github/downloads/klxf/eext-jiepei-helper/total?style=flat-square&label=Downloads"><img alt="EasyEDA Version" src="https://img.shields.io/badge/dynamic/json?style=flat-square&url=https%3A%2F%2Fraw.githubusercontent.com%2Fklxf%2Feext-jiepei-helper%2Frefs%2Fheads%2Fmaster%2Fextension.json&query=engines.eda&label=EasyEDA&color=5588ff">
一键前往捷配下单 PCB支持保存下单偏好~~这很牛头人了~~ 一键前往捷配下单 PCB支持保存下单偏好~~这很牛头人了~~
## 如何使用 ## 如何使用
@@ -8,27 +10,31 @@
参考 [嘉立创 EDA 用户指南](https://prodocs.lceda.cn/cn/api/user-guide/using-extension.html#%E5%AE%89%E8%A3%85%E6%89%A9%E5%B1%95) 安装扩展。 参考 [嘉立创 EDA 用户指南](https://prodocs.lceda.cn/cn/api/user-guide/using-extension.html#%E5%AE%89%E8%A3%85%E6%89%A9%E5%B1%95) 安装扩展。
*使用本扩展的“检查更新”功能需要给予扩展“外部交互”权限。* _使用本扩展的“检查更新”功能需要给予扩展“外部交互”权限。_
### 使用扩展 ### 使用扩展
**本扩展仅在 PCB 界面激活**,菜单栏中将出现“捷配”菜单,“下单”子菜单为本扩展的主界面。 **本扩展仅在 PCB 界面激活**,菜单栏中将出现“捷配”菜单,“下单”子菜单为本扩展的主界面。
可直接在主界面选择 PCB 生产工艺参数,点击“前往下单”按钮即可前往捷配下单 PCB 页面。 可直接在主界面选择 PCB 生产工艺参数,点击“前往下单”按钮即可前往捷配下单 PCB 页面,同时将自动导出 Berber 制板文件
> [!IMPORTANT] > [!IMPORTANT] > **下单前务必仔细检查所有项目是否符合预期,捷配官网可能与本扩展显示存在出入,本扩展不对工艺组合可行性进行验证,以捷配官网为准。**
> **下单前务必仔细检查所有项目是否符合预期,捷配官网可能与本扩展显示存在出入,本扩展不对工艺组合可行性进行验证,以捷配官网为准。**
**本扩展提供“工艺预设”功能**,可将常用的工艺参数保存为预设,方便下次使用: **本扩展提供“工艺预设”功能**,可将常用的工艺参数保存为预设,方便下次使用:
- 【**新建预设**】在“下单”界面顶部“订单工艺预设”面板新建预设,设置工艺参数与个性化服务选项,点击底部“保存预设”按钮即可保存; - 【**新建预设**】在“下单”界面顶部“订单工艺预设”面板新建预设,设置工艺参数与个性化服务选项,点击底部“保存预设”按钮即可保存;
- 【**使用预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,将自动应用此前保存的参数与个性化选项; - 【**使用预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,将自动应用此前保存的参数与个性化选项;
- 【**删除预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,点击底部“删除预设”按钮即可删除。 - 【**删除预设**】在“下单”界面顶部“订单工艺预设”面板选择已有的预设,点击底部“删除预设”按钮即可删除。
- 【**内嵌预设**】点击“下单”界面底部的“内嵌预设”按钮即可将当前工艺参数保存到 PCB 中。若 PCB 中存在内嵌预设,扩展将自动读取。
**本扩展支持自动计算 PCB 尺寸**,点击“选择板框”按钮后在画布上选择板框图元,即可自动计算板框大小。 本扩展支持自动计算
- 【**PCB 层数**】点击“板子层数”右侧“识别”按钮后即可自动计算板子层数。**注意EDA 仅支持绘制偶数层铜箔的 PCB因此识别到的板子层数必然为偶数**
- 【**PCB 尺寸**】点击“板子大小”右侧的“选择板框”按钮后在画布上选择板框图元,即可自动计算板框大小。
## 即将推出的新特性 ## 即将推出的新特性
- 自动识别板子层数【Coming s∞n】 - ~~自动识别板子层数~~ ——_V1.1.0_
## 开源许可 ## 开源许可

View File

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

View File

@@ -1,10 +1,10 @@
<!DOCTYPE html> <!doctype html>
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>关于软件</title> <title>关于软件</title>
<link rel="stylesheet" href="/iframe/css/index.css"> <link rel="stylesheet" href="/iframe/css/index.css" />
</head> </head>
<body class="bg-gray-100 flex items-center justify-center min-h-screen"> <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="min-h-screen bg-gray-100 flex items-center justify-center">
@@ -17,26 +17,18 @@
</div> </div>
<div class="flex justify-center space-x-4 mt-auto"> <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 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> <a id="check" 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>
<div class="flex justify-center text-[12px] text-gray-500 mt-2"> <div class="flex justify-center text-[12px] text-gray-500 mt-2">本扩展使用 Apache-2.0 许可协议开源</div>
本扩展使用 Apache-2.0 许可协议开源
</div>
</div> </div>
</div> </div>
<script> <script>
// 页面加载完成 // 页面加载完成
document.addEventListener('DOMContentLoaded', async function () { 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) { if (file) {
const extensionData = JSON.parse(await file.text()); const extensionData = JSON.parse(await file.text());
document.getElementById('name').textContent = extensionData.displayName; document.getElementById('name').textContent = extensionData.displayName;
@@ -59,6 +51,40 @@
document.getElementById('check').addEventListener('click', function (event) { document.getElementById('check').addEventListener('click', function (event) {
event.preventDefault(); 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") eda.sys_ClientUrl.request("https://extensions.oshwhub.com/api/v1/extensions/his_version_list?bizKey=188546598067642368", "GET")
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
@@ -90,7 +116,8 @@
eda.sys_Message.showToastMessage("🥺 获取版本信息失败", 'error'); eda.sys_Message.showToastMessage("🥺 获取版本信息失败", 'error');
} }
}); });
}) */
});
</script> </script>
</body> </body>
</html> </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", "version": "1.1.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"@jlceda/pro-api-types": "^0.1.156", "@jlceda/pro-api-types": "^0.1.175",
"@microsoft/tsdoc": "^0.15.1", "@microsoft/tsdoc": "^0.15.1",
"@tailwindcss/cli": "^4.1.8", "@tailwindcss/cli": "^4.1.8",
"@trivago/prettier-plugin-sort-imports": "^5.2.1", "@trivago/prettier-plugin-sort-imports": "^5.2.1",
@@ -900,9 +900,9 @@
} }
}, },
"node_modules/@jlceda/pro-api-types": { "node_modules/@jlceda/pro-api-types": {
"version": "0.1.156", "version": "0.1.175",
"resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.156.tgz", "resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.175.tgz",
"integrity": "sha512-U26OzNETxZZfwGS3sfqQ7emclnwWgD72gWCtgU99TwMBAV+G5kP8Fd65w7nKqMcTVVG0TlSbsgUdNW/IPD8HcA==", "integrity": "sha512-83opK7FZmtm5GFkfulYuCWHOhFO+WYocjfiuRh1K2PQaPeIe+/e3wKE4vUBcKptGajePpyDlfKL4UXTFVBe+Vg==",
"dev": true, "dev": true,
"license": "Apache-2.0" "license": "Apache-2.0"
}, },

View File

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