feat: add server-side configuration with default theme (#90)

* docs: add example for usage of the main listenbrainz instance (#71)

* docs: add example for usage of the main listenbrainz instance

* Update scrobbler.md

---------

Co-authored-by: Gabe Farrell <90876006+gabehf@users.noreply.github.com>

* feat: add server-side cfg and default theme

* fix: repair custom theme

---------

Co-authored-by: m0d3rnX <jesper@posteo.de>
This commit is contained in:
Gabe Farrell 2025-11-18 18:37:05 -05:00 committed by GitHub
parent 70f5198781
commit 1aeb6408aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 86 additions and 26 deletions

View file

@ -101,6 +101,10 @@ function logout(): Promise<Response> {
})
}
function getCfg(): Promise<Config> {
return fetch(`/apis/web/v1/config`).then(r => r.json() as Promise<Config>)
}
function getApiKeys(): Promise<ApiKey[]> {
return fetch(`/apis/web/v1/user/apikeys`).then((r) => r.json() as Promise<ApiKey[]>)
}
@ -214,6 +218,7 @@ export {
imageUrl,
login,
logout,
getCfg,
deleteItem,
updateUser,
getAliases,
@ -309,6 +314,9 @@ type ApiKey = {
type ApiError = {
error: string
}
type Config = {
default_theme: string
}
export type {
getItemsArgs,
@ -323,5 +331,6 @@ export type {
User,
Alias,
ApiKey,
ApiError
ApiError,
Config
}