mirror of
https://github.com/Jonnyan404/memos-bber.git
synced 2026-04-25 03:58:37 +09:00
- 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:
@@ -14,39 +14,54 @@
|
||||
"sendLinkTo": {
|
||||
"message": "Send link to Memos"
|
||||
},
|
||||
"sendImageTo": {
|
||||
"message": "Send image to Memos"
|
||||
},
|
||||
"saveBtn":{
|
||||
"message": "Save"
|
||||
},
|
||||
"placeApiUrl":{
|
||||
"message": "Memos Self Home Url"
|
||||
"message": "Memos site URL"
|
||||
},
|
||||
"placeApiTokens":{
|
||||
"message": "Memos Access Tokens"
|
||||
},
|
||||
"placeContent":{
|
||||
"message": "Any thoughts..."
|
||||
"message": "What's on your mind..."
|
||||
},
|
||||
"lockPrivate":{
|
||||
"message": "Only visible to you"
|
||||
"message": "Private"
|
||||
},
|
||||
"lockProtected":{
|
||||
"message": "Visible to members"
|
||||
"message": "Protected"
|
||||
},
|
||||
"lockPublic":{
|
||||
"message": "Everyone can see"
|
||||
"message": "Public"
|
||||
},
|
||||
"submitBtn":{
|
||||
"message": "Save"
|
||||
},
|
||||
"placeHideInput":{
|
||||
"message": "Default 'Only visible to you' Tag name"
|
||||
"message": "Default 'Private' tag name"
|
||||
},
|
||||
"placeShowInput":{
|
||||
"message": "Default 'Everyone can see' Tag name"
|
||||
},
|
||||
"uploadedListTitle": {
|
||||
"message": "Uploaded files, Drag to reorder"
|
||||
},
|
||||
"uploadedListEmpty": {
|
||||
"message": "No uploaded files"
|
||||
},
|
||||
"tipReorder": {
|
||||
"message": "Drag to reorder"
|
||||
},
|
||||
"tipDeleteAttachment": {
|
||||
"message": "Delete"
|
||||
},
|
||||
"attachmentDeleteSuccess": {
|
||||
"message": "Deleted"
|
||||
},
|
||||
"attachmentDeleteFailed": {
|
||||
"message": "Delete failed 😭"
|
||||
},
|
||||
"picDrag":{
|
||||
"message": "Drag upload the image"
|
||||
},
|
||||
@@ -94,5 +109,35 @@
|
||||
},
|
||||
"invalidToken":{
|
||||
"message": "Invalid token or url 😭"
|
||||
},
|
||||
"tipOpenSite": {
|
||||
"message": "Open Memos"
|
||||
},
|
||||
"tipSettings": {
|
||||
"message": "Settings"
|
||||
},
|
||||
"tipTags": {
|
||||
"message": "Insert tag"
|
||||
},
|
||||
"tipTodo": {
|
||||
"message": "Insert todo"
|
||||
},
|
||||
"tipUpload": {
|
||||
"message": "Upload file"
|
||||
},
|
||||
"tipLink": {
|
||||
"message": "Insert current tab link"
|
||||
},
|
||||
"tipRandom": {
|
||||
"message": "Random memo"
|
||||
},
|
||||
"tipSearch": {
|
||||
"message": "Search"
|
||||
},
|
||||
"tipVisibility": {
|
||||
"message": "Visibility"
|
||||
},
|
||||
"tipSend": {
|
||||
"message": "Send (Ctrl/⌘+Enter)"
|
||||
}
|
||||
}
|
||||
@@ -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)"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user