new functions

This commit is contained in:
Mateusz Gruszczyński
2026-07-27 12:36:00 +02:00
parent 63999f0878
commit 79298b5d17
15 changed files with 1064 additions and 218 deletions
+4
View File
@@ -15,6 +15,8 @@ export function createPadAdapter() {
addressSelector: "#pad-url",
title: info => `${info.title} · RustPad`,
loadInfo: headers => api(base, { headers }),
loadColor: headers => api(`${base}/editor-color`, { headers }),
saveColor: (headers, color) => api(`${base}/editor-color`, { method: "POST", headers, body: JSON.stringify({ color }) }),
fileEndpoints: {
list: `${base}/files`,
upload: `${base}/files`,
@@ -53,6 +55,8 @@ export function createWorkspaceNoteAdapter() {
addressSelector: "#note-url",
title: info => `${info.title} · ${info.workspace_title}`,
loadInfo: headers => api(base, { headers }),
loadColor: headers => api(`${base}/editor-color`, { headers }),
saveColor: (headers, color) => api(`${base}/editor-color`, { method: "POST", headers, body: JSON.stringify({ color }) }),
fileEndpoints: {
list: `${base}/files`,
upload: `${base}/files`,