UI: portal/header refinements, board index UX, and user settings

This commit is contained in:
Micha
2026-01-01 19:54:02 +01:00
parent f83748cc76
commit 8604cdf95d
26 changed files with 2065 additions and 227 deletions

View File

@@ -79,6 +79,18 @@ export async function fetchSetting(key) {
return data[0] || null
}
export async function fetchUserSetting(key) {
const data = await getCollection(`/user-settings?key=${encodeURIComponent(key)}&pagination=false`)
return data[0] || null
}
export async function saveUserSetting(key, value) {
return apiFetch('/user-settings', {
method: 'POST',
body: JSON.stringify({ key, value }),
})
}
export async function listForumsByParent(parentId) {
return getCollection(`/forums?parent=/api/forums/${parentId}`)
}
@@ -134,6 +146,10 @@ export async function listThreadsByForum(forumId) {
return getCollection(`/threads?forum=/api/forums/${forumId}`)
}
export async function listThreads() {
return getCollection('/threads')
}
export async function getThread(id) {
return apiFetch(`/threads/${id}`)
}