- feat:新增附件列表管理和增加按钮提示

Introduce an upload attachments panel with styles, localization and client-side management. Added new i18n keys (EN/ZH) and refactored js/i18n.js to helper setters for text/placeholder/title. popup.html and css/main.css add the upload-list UI and styles. oper.js implements rendering, drag-and-drop reorder, deletion (calls DELETE api with token), storage persistence (resourceIdList), escapeHtml sanitization, and sync change handling; it also fixes a config check (repo -> apiTokens), stores filename from upload responses, handles attachments/resources compatibility, and clears the list after sending a memo. Overall this enables reorderable, deletable uploaded attachments with proper localization and tooltips.
This commit is contained in:
jonny
2026-03-04 21:18:03 +08:00
parent dd2609e1e4
commit 59700dce59
6 changed files with 384 additions and 30 deletions
+48
View File
@@ -94,5 +94,53 @@
},
"invalidToken":{
"message": "无效的 token 或 url 😭"
},
"uploadedListTitle": {
"message": "已上传文件,可拖动排序"
},
"uploadedListEmpty": {
"message": "暂无已上传文件"
},
"tipReorder": {
"message": "拖动排序"
},
"tipDeleteAttachment": {
"message": "删除"
},
"attachmentDeleteSuccess": {
"message": "删除成功"
},
"attachmentDeleteFailed": {
"message": "删除失败 😭"
},
"tipOpenSite": {
"message": "打开 Memos"
},
"tipSettings": {
"message": "设置"
},
"tipTags": {
"message": "插入标签"
},
"tipTodo": {
"message": "插入待办"
},
"tipUpload": {
"message": "上传文件"
},
"tipLink": {
"message": "插入当前页面链接"
},
"tipRandom": {
"message": "随机一条"
},
"tipSearch": {
"message": "搜索"
},
"tipVisibility": {
"message": "可见性"
},
"tipSend": {
"message": "发送(Ctrl/⌘+Enter"
}
}