mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-12 00:40:56 -07:00
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:
parent
621ca63b6b
commit
68d922ce55
4 changed files with 254 additions and 206 deletions
|
|
@ -157,6 +157,10 @@ function submitListen(id: string, ts: Date): 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[]>
|
||||
|
|
@ -277,6 +281,7 @@ function getNowPlaying(): Promise<NowPlaying> {
|
|||
}
|
||||
|
||||
export {
|
||||
<<<<<<< HEAD
|
||||
getLastListens,
|
||||
getTopTracks,
|
||||
getTopAlbums,
|
||||
|
|
@ -308,6 +313,37 @@ export {
|
|||
submitListen,
|
||||
getNowPlaying,
|
||||
};
|
||||
=======
|
||||
getLastListens,
|
||||
getTopTracks,
|
||||
getTopAlbums,
|
||||
getTopArtists,
|
||||
getActivity,
|
||||
getStats,
|
||||
search,
|
||||
replaceImage,
|
||||
mergeTracks,
|
||||
mergeAlbums,
|
||||
mergeArtists,
|
||||
imageUrl,
|
||||
login,
|
||||
logout,
|
||||
getCfg,
|
||||
deleteItem,
|
||||
updateUser,
|
||||
getAliases,
|
||||
createAlias,
|
||||
deleteAlias,
|
||||
setPrimaryAlias,
|
||||
getApiKeys,
|
||||
createApiKey,
|
||||
deleteApiKey,
|
||||
updateApiKeyLabel,
|
||||
deleteListen,
|
||||
getAlbum,
|
||||
getExport,
|
||||
}
|
||||
>>>>>>> 5d0491a (feat: add server-side configuration with default theme (#90))
|
||||
type Track = {
|
||||
id: number;
|
||||
title: string;
|
||||
|
|
@ -390,6 +426,7 @@ type ApiKey = {
|
|||
created_at: Date;
|
||||
};
|
||||
type ApiError = {
|
||||
<<<<<<< HEAD
|
||||
error: string;
|
||||
};
|
||||
type Config = {
|
||||
|
|
@ -417,3 +454,27 @@ export type {
|
|||
Config,
|
||||
NowPlaying,
|
||||
};
|
||||
=======
|
||||
error: string
|
||||
}
|
||||
type Config = {
|
||||
default_theme: string
|
||||
}
|
||||
|
||||
export type {
|
||||
getItemsArgs,
|
||||
getActivityArgs,
|
||||
Track,
|
||||
Artist,
|
||||
Album,
|
||||
Listen,
|
||||
SearchResponse,
|
||||
PaginatedResponse,
|
||||
ListenActivityItem,
|
||||
User,
|
||||
Alias,
|
||||
ApiKey,
|
||||
ApiError,
|
||||
Config
|
||||
}
|
||||
>>>>>>> 5d0491a (feat: add server-side configuration with default theme (#90))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue