From b93a155c413ed4cd7befec825699028c12c919e8 Mon Sep 17 00:00:00 2001 From: personal82555 Date: Mon, 12 Oct 2026 17:00:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=8B=E5=86=99=E7=AD=BE=E5=90=8D=20?= =?UTF-8?q?=E2=80=94=20=E6=B5=8F=E8=A7=88=E5=99=A8=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=89=8B=E5=86=99(=E9=BC=A0=E6=A0=87/=E8=A7=A6=E5=B1=8F/?= =?UTF-8?q?=E7=AC=94),=20=E7=AC=94=E8=A7=A6=E9=9A=8F=E6=9C=BA=E5=BA=A6?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E7=9C=9F=E5=AE=9E=E4=B9=A6=E5=86=99,=20?= =?UTF-8?q?=E9=80=8F=E6=98=8EPNG=E8=A3=81=E5=89=AA=E5=AF=BC=E5=87=BA,=20?= =?UTF-8?q?=E7=AD=BE=E7=AB=A0=E5=88=B0=E5=9B=BE=E7=89=87/PDF(=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6/=E9=80=8F=E6=98=8E=E5=BA=A6/=E6=97=8B=E8=BD=AC/?= =?UTF-8?q?=E9=A1=B5=E7=A0=81=E8=8C=83=E5=9B=B4),=20=E5=8F=97=E6=8E=A7?= =?UTF-8?q?=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 + docker/it-tools-relay/server.py | 2 +- locales/en.yml | 3 + locales/zh.yml | 3 + src/layouts/tool.layout.vue | 2 +- src/tools/index.ts | 3 +- src/tools/license/license.ts | 1 + src/tools/signature-pad/index.ts | 12 + src/tools/signature-pad/signature-pad.vue | 877 ++++++++++++++++++++++ 9 files changed, 901 insertions(+), 3 deletions(-) create mode 100644 src/tools/signature-pad/index.ts create mode 100644 src/tools/signature-pad/signature-pad.vue diff --git a/components.d.ts b/components.d.ts index 1d0ac5d..d8c53e7 100644 --- a/components.d.ts +++ b/components.d.ts @@ -211,6 +211,7 @@ declare module '@vue/runtime-core' { RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default'] SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default'] SealMaker: typeof import('./src/tools/seal-maker/seal-maker.vue')['default'] + SignaturePad: typeof import('./src/tools/signature-pad/signature-pad.vue')['default'] SiteBookmarks: typeof import('./src/tools/site-bookmarks/site-bookmarks.vue')['default'] SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default'] SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default'] diff --git a/docker/it-tools-relay/server.py b/docker/it-tools-relay/server.py index 87ed224..dd3c81d 100644 --- a/docker/it-tools-relay/server.py +++ b/docker/it-tools-relay/server.py @@ -44,7 +44,7 @@ AUTH_PASS = os.environ.get("AUTH_PASS", "") PROJECT_NAME = os.environ.get("PROJECT_NAME", "IT-Tools") TRIAL_FILE = os.environ.get("TRIAL_FILE", "/app/data/trials.json") TRIAL_MS = int(os.environ.get("TRIAL_MS_MIN", "30")) * 60 * 1000 -PROTECTED_TOOLS = {"translator", "image-ocr", "pdf-ocr", "ai-retouch", "label-designer", "doc-convert", "image-tools", "pdf-tools", "video-tools", "audio-tools", "seal-maker"} +PROTECTED_TOOLS = {"translator", "image-ocr", "pdf-ocr", "ai-retouch", "label-designer", "doc-convert", "image-tools", "pdf-tools", "video-tools", "audio-tools", "seal-maker", "signature-pad"} MACHINE_RE = re.compile(r"^\d{10,16}$") # verify() messages that unconditionally block activation diff --git a/locales/en.yml b/locales/en.yml index 4470765..687ee37 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -275,6 +275,9 @@ tools: title: Image OCR description: Extract text from images with OCR - click, drag & drop or paste a screenshot, get recognized lines with confidence scores, copy or download as TXT. + signature-pad: + title: 'Signature pad' + description: 'Draw handwritten signatures in browser with realistic pen strokes, export transparent PNG, sign images and PDFs' seal-maker: title: 'Seal maker' description: 'Generate official seals and stamp them onto images and PDFs (cross-page seal), all local in browser' diff --git a/locales/zh.yml b/locales/zh.yml index fef7ecf..fb0ceba 100644 --- a/locales/zh.yml +++ b/locales/zh.yml @@ -272,6 +272,9 @@ tools: title: 图片OCR文字识别 description: 上传、拖拽或粘贴截图识别图片中的文字,逐行输出识别结果和置信度,支持复制全部和下载TXT。 + signature-pad: + title: '手写签名' + description: '浏览器本地手写签名(鼠标/触屏/手写笔),真实笔触模拟,透明底 PNG 下载,可一键签章到图片与 PDF 合同' seal-maker: title: '印章生成器' description: '生成圆形公章/专用章(弧形文字+五角星),一键盖章到图片与 PDF(骑缝章/角章),全程浏览器本地处理' diff --git a/src/layouts/tool.layout.vue b/src/layouts/tool.layout.vue index 93b3159..1fc5b6c 100644 --- a/src/layouts/tool.layout.vue +++ b/src/layouts/tool.layout.vue @@ -40,7 +40,7 @@ useHead(head); const { t } = useI18n(); // 宽屏工具:不受 600px 限宽,占满可用宽度(画布/多栏类工具) -const WIDE_TOOLS = new Set(['/label-designer', '/json-prettify', '/pdf-tools', '/image-tools', '/doc-convert', '/video-tools', '/seal-maker']); +const WIDE_TOOLS = new Set(['/label-designer', '/json-prettify', '/pdf-tools', '/image-tools', '/doc-convert', '/video-tools', '/seal-maker', '/signature-pad']); const isWide = computed(() => WIDE_TOOLS.has(route.path)); const i18nKey = computed(() => route.path.trim().replace('/', '')); diff --git a/src/tools/index.ts b/src/tools/index.ts index 47f2c7c..4226042 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -84,6 +84,7 @@ import { tool as imageTools } from './image-tools'; import { tool as videoTools } from './video-tools'; import { tool as audioTools } from './audio-tools'; import { tool as sealMaker } from './seal-maker'; +import { tool as signaturePad } from './signature-pad'; import { tool as docConvert } from './doc-convert'; import { tool as aiRetouch } from './ai-retouch'; import { tool as wifiQrCodeGenerator } from './wifi-qr-code-generator'; @@ -155,7 +156,7 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Images and videos', - components: [qrCodeGenerator, wifiQrCodeGenerator, batchBarcodeGenerator, codeReader, imageOcr, pdfOcr, pdfTools, imageTools, videoTools, audioTools, sealMaker, docConvert, aiRetouch, labelDesigner, siteBookmarks, svgPlaceholderGenerator, cameraRecorder], + components: [qrCodeGenerator, wifiQrCodeGenerator, batchBarcodeGenerator, codeReader, imageOcr, pdfOcr, pdfTools, imageTools, videoTools, audioTools, sealMaker, signaturePad, docConvert, aiRetouch, labelDesigner, siteBookmarks, svgPlaceholderGenerator, cameraRecorder], }, { name: 'Development', diff --git a/src/tools/license/license.ts b/src/tools/license/license.ts index 5c68fae..e640204 100644 --- a/src/tools/license/license.ts +++ b/src/tools/license/license.ts @@ -17,6 +17,7 @@ export const PROTECTED_TOOLS: Record = { '/video-tools': '视频工具', '/audio-tools': '音频工具', '/seal-maker': '印章生成', + '/signature-pad': '手写签名', }; export const TRIAL_MS = 30 * 60 * 1000; // 每个功能免费 30 分钟 diff --git a/src/tools/signature-pad/index.ts b/src/tools/signature-pad/index.ts new file mode 100644 index 0000000..d2ab268 --- /dev/null +++ b/src/tools/signature-pad/index.ts @@ -0,0 +1,12 @@ +import { Signature } from '@vicons/tabler'; +import { defineTool } from '../tool'; +import { translate } from '@/plugins/i18n.plugin'; + +export const tool = defineTool({ + name: translate('tools.signature-pad.title'), + path: '/signature-pad', + description: translate('tools.signature-pad.description'), + keywords: ['signature', 'sign', '签名', '手写', '电子签名', '签字', '合同'], + component: () => import('./signature-pad.vue'), + icon: Signature, +}); diff --git a/src/tools/signature-pad/signature-pad.vue b/src/tools/signature-pad/signature-pad.vue new file mode 100644 index 0000000..d459778 --- /dev/null +++ b/src/tools/signature-pad/signature-pad.vue @@ -0,0 +1,877 @@ + + + + +