feat: v0.0.10 (#23)

* feat: single SOT for themes + basic custom support

* fix: adjust colors for yuu theme

* feat: Allow loading of environment variables from file (#20)

* feat: allow loading of environment variables from file

* Panic if a file for an environment variable cannot be read

* Use log.Fatalf + os.Exit instead of panic

* fix: remove supurfluous call to os.Exit()

---------

Co-authored-by: adaexec <nixos-git.s1pht@simplelogin.com>
Co-authored-by: Gabe Farrell <90876006+gabehf@users.noreply.github.com>

* chore: add pr test workflow

* chore: changelog

* feat: make all activity grids configurable

* fix: adjust activity grid style

* fix: make background gradient consistent size

* revert: remove year from activity grid opts

* style: adjust top item list min size to 200px

* feat: add support for custom themes

* fix: stabilized the order of top items

* chore: update changelog

* feat: native import & export

* fix: use correct request body for alias requests

* fix: clear input when closing edit modal

* chore: changelog

* docs: make endpoint clearer for some apps

* feat: add ui and handler for export

* fix: fix pr test workflow

---------

Co-authored-by: adaexec <78047743+adaexec@users.noreply.github.com>
Co-authored-by: adaexec <nixos-git.s1pht@simplelogin.com>
This commit is contained in:
Gabe Farrell 2025-06-18 08:48:19 -04:00 committed by GitHub
parent 486f5d0269
commit c16b557c21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 1754 additions and 866 deletions

View file

@ -53,6 +53,7 @@ function getStats(period: string): Promise<Stats> {
}
function search(q: string): Promise<SearchResponse> {
q = encodeURIComponent(q)
return fetch(`/apis/web/v1/search?q=${q}`).then(r => r.json() as Promise<SearchResponse>)
}
@ -131,8 +132,12 @@ function deleteApiKey(id: number): Promise<Response> {
})
}
function updateApiKeyLabel(id: number, label: string): Promise<Response> {
return fetch(`/apis/web/v1/user/apikeys?id=${id}&label=${label}`, {
method: "PATCH"
const form = new URLSearchParams
form.append('id', String(id))
form.append('label', label)
return fetch(`/apis/web/v1/user/apikeys`, {
method: "PATCH",
body: form,
})
}
@ -154,18 +159,30 @@ function getAliases(type: string, id: number): Promise<Alias[]> {
return fetch(`/apis/web/v1/aliases?${type}_id=${id}`).then(r => r.json() as Promise<Alias[]>)
}
function createAlias(type: string, id: number, alias: string): Promise<Response> {
return fetch(`/apis/web/v1/aliases?${type}_id=${id}&alias=${alias}`, {
method: 'POST'
const form = new URLSearchParams
form.append(`${type}_id`, String(id))
form.append('alias', alias)
return fetch(`/apis/web/v1/aliases`, {
method: 'POST',
body: form,
})
}
function deleteAlias(type: string, id: number, alias: string): Promise<Response> {
return fetch(`/apis/web/v1/aliases?${type}_id=${id}&alias=${alias}`, {
method: "DELETE"
const form = new URLSearchParams
form.append(`${type}_id`, String(id))
form.append('alias', alias)
return fetch(`/apis/web/v1/aliases/delete`, {
method: "POST",
body: form,
})
}
function setPrimaryAlias(type: string, id: number, alias: string): Promise<Response> {
return fetch(`/apis/web/v1/aliases/primary?${type}_id=${id}&alias=${alias}`, {
method: "POST"
const form = new URLSearchParams
form.append(`${type}_id`, String(id))
form.append('alias', alias)
return fetch(`/apis/web/v1/aliases/primary`, {
method: "POST",
body: form,
})
}
function getAlbum(id: number): Promise<Album> {
@ -179,6 +196,8 @@ function deleteListen(listen: Listen): Promise<Response> {
method: "DELETE"
})
}
function getExport() {
}
export {
getLastListens,
@ -207,6 +226,7 @@ export {
updateApiKeyLabel,
deleteListen,
getAlbum,
getExport,
}
type Track = {
id: number