feat: PDF 转换前端(epub 上传/进度轮询/下载/用户软删,复用 zTools2 API)

便携式 Vue3 前端:上传 epub 转 PDF,显示上传与转换进度,完成后下载;
用户可软删任务(不再对自己展示,管理员仍可见)。凭 cookie 标识用户。
复用 zTools2 后端 /api/pdf/*(同源),独立 i18n(中英懒加载),
可独立运行或经 mainPage iframe 同源集成。含 vitest 单测 20 项。
This commit is contained in:
2026-07-27 11:33:26 +08:00
commit 30f5cee4a1
19 changed files with 3918 additions and 0 deletions

41
src/i18n/locales/en.js Normal file
View File

@@ -0,0 +1,41 @@
// 英文语言包 -- 通过动态 import() 加载,被打成独立 chunk
// 只看中文的访客不会下载此文件。
export default {
app: {
title: 'PDF Converter'
},
upload: {
hint: 'Drop an .epub file, or',
pick: 'click to choose',
limit: 'Only epub, up to 250MB',
requireEpub: 'Only epub files are supported',
oversize: 'File exceeds the 250MB limit',
uploading: 'Uploading…',
submitted: 'Submitted, converting…',
failed: 'Upload failed',
networkError: 'Network error'
},
list: {
count: '{total} task(s)',
empty: 'No tasks yet. Upload an epub to start.',
loading: 'Loading…',
loadFailed: 'Load failed: {msg}'
},
job: {
name: 'Filename',
size: 'Size',
status: 'Status',
created: 'Created',
actions: 'Actions',
statusDone: 'Done',
statusFailed: 'Failed',
statusConverting: 'Converting',
statusPending: 'Queued',
download: 'Download',
delete: 'Delete',
deleteConfirm: 'Delete "{name}"?\nIt will no longer be shown to you (admin can still see it; only admin hard-delete truly removes it).',
deleted: 'Deleted',
deleteFailed: 'Delete failed: {msg}'
},
refresh: 'Refresh'
}