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:
@@ -67,6 +67,10 @@ def load_config(path: str | None = None) -> dict:
|
||||
cfg["max_content_length"] = int(cfg.get("max_content_length", 5 * 1024 ** 3))
|
||||
cfg["cookie_secure"] = bool(cfg.get("cookie_secure", True))
|
||||
cfg["session_days"] = int(cfg.get("session_days", 7))
|
||||
# 剪贴板:单条文本上限(字符)、保留条数上限、默认有效期(小时)
|
||||
cfg["max_clip_length"] = int(cfg.get("max_clip_length", 256 * 1024))
|
||||
cfg["max_clips"] = int(cfg.get("max_clips", 200))
|
||||
cfg["clip_default_expires_hours"] = int(cfg.get("clip_default_expires_hours", 24))
|
||||
return cfg
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user