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 @@ + + + + +