Add Memos API adapter and settings UI

Introduce a Memos API adapter to unify compatibility across API flavors (v020-v021, v023, modern) and probe/detect server flavor. Add js/compat/memosApi.adapter.js and rename existing compat modules (memosApi.v024.js -> memosApi.modern.js, memosApi.v1.js -> memosApi.v020-v021.js) and trim probe from v023. Add settings UI support: new i18n keys in en/ja/ko/zh_CN, settings panel styles in css/main.css, new settings input binding and save flow in js (attachment-only default text persisted). Refactor oper.js to use the adapter for uploads, deletes, tag listing, search and image preview auth handling; add helper functions for attachment-only default text and settings payload. Update i18n bindings, popup, manifest and README changelog accordingly.
closed #5
This commit is contained in:
jonny
2026-04-22 16:13:18 +08:00
parent 6c4801cb16
commit 3968b6896c
14 changed files with 840 additions and 681 deletions
+54
View File
@@ -170,6 +170,60 @@ a{color: #555;}
}
input.inputer{border-bottom: 1px solid #ccc;width:75%;}
.settings-panel{
display: flex;
flex-direction: column;
gap: .75rem;
margin-top: .75rem;
}
.settings-section{
border: 1px solid rgb(229,231,235);
border-radius: .5rem;
background-color: rgb(255,255,255);
padding: .75rem;
display: flex;
flex-direction: column;
gap: .6rem;
}
.settings-section-title{
font-size: .9rem;
font-weight: 700;
color: rgb(55,65,81);
}
.settings-section-desc{
font-size: .75rem;
line-height: 1.35;
color: #7a7a7a;
}
.settings-input{
width: 100% !important;
box-sizing: border-box;
border: 1px solid rgb(229,231,235);
border-radius: .35rem;
background-color: #fafafa;
padding: .55rem .7rem;
}
.settings-input:focus{
border-color: rgb(22,163,74);
background-color: rgb(255,255,255);
}
.settings-textarea{
resize: vertical;
min-height: 4.5rem;
white-space: pre-wrap;
}
.settings-actions{
display: flex;
justify-content: flex-end;
}
#saveKey{margin:0;flex:1;}
.common-tools-wrapper {