feat: add announcements page and publishing workflow

This commit is contained in:
2026-11-01 21:46:19 +08:00
parent 0cea76de81
commit d8e708caec
15 changed files with 345 additions and 36 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
const pairs = {
editArticle: ['编辑公告', 'Edit announcement'], write: ['编辑', 'Write'], articleView: ['公告编辑视图', 'Announcement editor view'], previewEmpty: ['输入 Markdown 正文后在这里预览。', 'Write Markdown to preview your announcement here.'],
saveDraft: ['保存草稿', 'Save draft'], publishArticle: ['发布公告', 'Publish announcement'], updateArticle: ['更新公告', 'Update announcement'], withdrawArticle: ['撤回为草稿', 'Unpublish as draft'], viewArticle: ['查看公告', 'View announcement'], viewAnnouncements: ['打开公告页', 'Open announcements'],
draftSaved: ['草稿已保存,尚未公开。', 'Draft saved. It is not public.'], articlePublished: ['公告已发布。', 'Announcement published.'], articleUpdated: ['公告已更新。', 'Announcement updated.'], articleWithdrawn: ['公告已撤回并保存为草稿。', 'Announcement unpublished and saved as a draft.'],
auditPagination: ['操作记录分页', 'Audit log pagination'], auditTotal: ['共 {total} 条记录', '{total} entries'], previousPage: ['上一页', 'Previous'], nextPage: ['下一页', 'Next'], pagePosition: ['第 {page} / {pages} 页', 'Page {page} of {pages}'],
relatedLinks: ['首页相关链接', 'Home page related links'], linkType: ['链接类型', 'Link type'], urlLink: ['网址', 'URL'], helpLink: ['软件源使用帮助', 'Mirror usage guides'], linkEntry: ['相关链接 {index}', 'Related link {index}'], moveUp: ['上移', 'Move up'], moveDown: ['下移', 'Move down'],
helpChinese: ['使用说明(中文,Markdown)', 'Usage guide (Chinese, Markdown)'], descriptionLanguage: ['介绍语言', 'Description language'],
@@ -9,7 +12,7 @@ const pairs = {
worker: ['同步节点', 'Worker'], total: ['镜像总数', 'Mirrors'], active: ['正在同步', 'Syncing'], failed: ['同步失败', 'Failed'], updated: ['最近采集', 'Last collected'], sourceError: ['同步节点暂时不可用,显示最近一次数据。', 'Worker unavailable. Showing the last collected data.'],
name: ['名称', 'Name'], status: ['状态', 'Status'], upstream: ['上游地址', 'Upstream'], size: ['大小', 'Size'], actions: ['操作', 'Actions'], search: ['搜索镜像', 'Search mirrors'], metadata: ['展示信息', 'Display information'], description: ['介绍', 'Description'], help: ['使用说明(Markdown)', 'Help (Markdown)'], website: ['官方网站', 'Official website'], visible: ['在首页显示', 'Show on home page'], category: ['分类', 'Category'], os: ['操作系统', 'Operating system'], language: ['语言与工具', 'Languages & tools'], other: ['其他', 'Other'],
start: ['开始同步', 'Start sync'], stop: ['停止同步', 'Stop sync'], restart: ['重新同步', 'Restart sync'], disable: ['禁用同步', 'Disable sync'], logs: ['日志', 'Logs'], logTail: ['显示日志末尾,最多 64 KiB。', 'Showing the log tail, up to 64 KiB.'], commandConfirm: ['确认对 {name} 执行“{action}”?这会影响实际同步任务。', 'Run “{action}” for {name}? This affects the live sync task.'], submitted: ['命令已提交,实际状态稍后更新。', 'Command submitted. The live status will update shortly.'],
newArticle: ['新建公告', 'New announcement'], articleTitle: ['标题', 'Title'], body: ['正文(Markdown)', 'Body (Markdown)'], date: ['发布时间', 'Publication date'], published: ['发布', 'Published'], draft: ['草稿', 'Draft'], pinned: ['置顶', 'Pinned'], preview: ['预览', 'Preview'], deleteConfirm: ['确认删除 {name}?', 'Delete {name}?'],
newArticle: ['新建公告', 'New announcement'], articleTitle: ['标题', 'Title'], body: ['正文(Markdown)', 'Body (Markdown)'], date: ['发布时间', 'Publication date'], published: ['已发布', 'Published'], draft: ['草稿', 'Draft'], pinned: ['置顶', 'Pinned'], preview: ['预览', 'Preview'], deleteConfirm: ['确认删除 {name}?', 'Delete {name}?'],
siteName: ['站点名称', 'Site name'], email: ['联系邮箱', 'Contact email'], address: ['地址', 'Address'], logoLight: ['亮色主题 Logo', 'Light theme logo'], logoDark: ['暗色主题 Logo', 'Dark theme logo'], favicon: ['网站图标', 'Favicon'], avatar: ['站点头像', 'Site avatar'], upload: ['上传 PNG / JPEG', 'Upload PNG / JPEG'], links: ['友情链接', 'Footer links'], downloads: ['常用下载', 'Downloads'], url: ['链接', 'URL'], version: ['版本', 'Version'],
currentPassword: ['当前密码', 'Current password'], newPassword: ['新密码', 'New password'], confirmPassword: ['确认新密码', 'Confirm new password'], changePassword: ['修改密码', 'Change password'], passwordHint: ['密码至少 12 个字符。修改后需重新登录。', 'Use at least 12 characters. Changing your password signs out all your sessions.'], passwordMismatch: ['两次输入的密码不同。', 'Passwords do not match.'], newUser: ['创建账户', 'Create account'], role: ['权限', 'Role'], admin: ['管理员', 'Administrator'], editor: ['公告编辑', 'Announcement editor'],
concurrent: ['最大并发任务', 'Maximum concurrent jobs'], interval: ['同步间隔(分钟)', 'Sync interval (minutes)'], retry: ['失败重试次数', 'Retries'], timeout: ['超时(秒)', 'Timeout (seconds)'], global: ['全局调度', 'Global schedule'], mirrorConfig: ['单个镜像', 'Individual mirror'], newMirror: ['新增镜像', 'New mirror'], provider: ['同步方式', 'Provider'], intervalHint: ['同步间隔从上次同步结束后计算。配置应用时将通知 Worker 重新加载。', 'The interval starts when the previous sync finishes. Applying configuration asks the worker to reload.'], previewConfig: ['生成变更预览', 'Preview changes'], apply: ['应用配置', 'Apply configuration'], applyConfirm: ['确认应用此配置并通知 Worker 重新加载?', 'Apply this configuration and ask the worker to reload?'], before: ['修改前', 'Before'], after: ['修改后', 'After'], versions: ['配置历史', 'Configuration history'], rollback: ['恢复此版本之前的配置', 'Restore configuration before this version'], rollbackConfirm: ['确认恢复此变更前的配置并重新加载?后续有冲突时会拒绝恢复。', 'Restore the configuration before this change and reload? Conflicting subsequent changes will block the restore.'], applied: ['已应用', 'Applied'],