feat: add script version history (#3085)

* feat: add script version history

* fix: validate canonical save-as paths before backup

* fix: stack script history footer on small screens
This commit is contained in:
whyour
2026-10-06 22:00:11 +08:00
committed by GitHub
parent 2cab112391
commit fa8910b3d6
22 changed files with 2487 additions and 80 deletions
+29 -1
View File
@@ -665,5 +665,33 @@
"重试": "Retry",
"WPUSH的API Key,在 https://wpush.cn/settings 获取,参考 https://wpush.cn/docs": "WPUSH API Key from https://wpush.cn/settings, see https://wpush.cn/docs",
"推送渠道,支持 wechat/app/sms/mail/webhook/dingtalk/feishu/wechat_work/clawbot/qqbot,默认 wechat": "Channel: wechat/app/sms/mail/webhook/dingtalk/feishu/wechat_work/clawbot/qqbot, default wechat",
"可选,Topic 广播编码;填写后按 Topic 推送,参考 https://wpush.cn/docs": "Optional Topic code for broadcast; see https://wpush.cn/docs"
"可选,Topic 广播编码;填写后按 Topic 推送,参考 https://wpush.cn/docs": "Optional Topic code for broadcast; see https://wpush.cn/docs",
"历史版本": "Version history",
"首次修改前": "Before the first edit",
"手动保存": "Manual save",
"从历史版本恢复": "Restored version",
"面板外修改后": "After an external edit",
"恢复此版本": "Restore this version",
"当前已保存的内容会保留在历史版本中。": "The currently saved content will be kept in version history.",
"请先保存或取消当前修改,再恢复历史版本": "Save or discard your unsaved changes before restoring a version",
"已恢复,恢复前的内容已保留": "Restored. The previous content is kept in version history",
"最多保留 {count} 个历史版本,容量不足时自动清理旧历史。": "Keep up to {count} previous versions. Older history is removed when storage is full.",
"仅记录通过面板保存的修改;订阅更新仍可能覆盖恢复后的文件。": "Only panel saves are recorded. Subscription updates may still overwrite restored files.",
"暂无历史版本,下次保存修改时会自动保留当前内容": "No versions yet. Your current content will be kept when you next save changes.",
"选择历史版本": "Choose a version",
"历史版本加载失败,请刷新重试": "Unable to load this version. Refresh and try again.",
"当前已保存文件": "Currently saved file",
"与当前文件一致": "Identical to the current file",
"历史版本仅支持不超过 1 MiB 的 UTF-8 文本脚本": "Version history supports UTF-8 text scripts up to 1 MiB",
"历史版本读取失败,请检查历史文件": "Unable to read version history. Check the history file.",
"历史版本不存在或已清理": "This version does not exist or has been removed",
"文件已变化,请刷新历史版本后重试": "The file has changed. Refresh version history and try again.",
"历史版本容量不足,无法安全保存": "Not enough version history capacity to save safely",
"脚本不存在": "The script does not exist",
"不记录历史直接保存?": "Save without version history?",
"当前文件或新内容超出历史记录范围,本次覆盖前的内容不会保留。": "The current file or new content is outside the history limits. The content being replaced will not be kept.",
"仍然保存": "Save anyway",
"已保存,本次未记录历史版本": "Saved without a history snapshot",
"已保存,但旧历史清理失败,请检查存储权限和空间": "Saved, but old history could not be removed. Check storage permissions and free space.",
"保存失败": "Unable to save"
}