feat: 文件快传新增共享剪贴板(跨客户端粘贴、查看与一键复制)
- 后端:新增 /api/clips(列表/新建)、/api/clips/<id>(取全文/删除)、/api/clips/<id>/copy(复制计数),列表仅返回 240 字符预览 - 存储:SQLite 新增 clips 表(含 expires_at 索引),启动自动建表,线上老库无需手工迁移 - 前端:剪贴板卡片支持读取本机剪贴板、来源备注、查看全文、一键复制到本机剪贴板、单条删除与复制次数 - 清理:systemd 定时任务与 /api/cleanup 同时清理过期剪贴板 - 配置:新增 max_clip_length / max_clips / clip_default_expires_hours - 部署:deploy_transfer.py 新增 --keep-credentials(不重置登录密码与会话密钥)与 SSH 连接重试 - 文档:README / setup.md / CHANGELOG 同步更新
This commit is contained in:
+4
-2
@@ -1,4 +1,4 @@
|
||||
"""手动/定时清理过期文件与孤儿缓存文件。"""
|
||||
"""手动/定时清理过期文件、过期剪贴板与孤儿缓存文件。"""
|
||||
import logging
|
||||
import time
|
||||
|
||||
@@ -17,7 +17,9 @@ def main() -> int:
|
||||
now = int(time.time())
|
||||
removed = storage.cleanup_expired(db_path, files_dir, now=now)
|
||||
orphans = storage.cleanup_orphans(db_path, files_dir, now=now)
|
||||
log.info("清理完成:过期文件 %d 个,孤儿缓存 %d 个", removed, orphans)
|
||||
clips = storage.cleanup_expired_clips(db_path, now=now)
|
||||
log.info("清理完成:过期文件 %d 个,孤儿缓存 %d 个,过期剪贴板 %d 条",
|
||||
removed, orphans, clips)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user