1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-03-23 21:05:07 +00:00

fix: decouple images from app config service (#965)

Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
Elias Schneider
2025-09-20 21:42:52 +02:00
committed by GitHub
parent cc34aca2a0
commit a3da943aa6
19 changed files with 426 additions and 314 deletions

View File

@@ -9,14 +9,14 @@ type CachableImage = {
export const cachedApplicationLogo: CachableImage = {
getUrl: (light = true) => {
let url = '/api/application-configuration/logo';
let url = '/api/application-images/logo';
if (!light) {
url += '?light=false';
}
return getCachedImageUrl(url);
},
bustCache: (light = true) => {
let url = '/api/application-configuration/logo';
let url = '/api/application-images/logo';
if (!light) {
url += '?light=false';
}
@@ -25,8 +25,8 @@ export const cachedApplicationLogo: CachableImage = {
};
export const cachedBackgroundImage: CachableImage = {
getUrl: () => getCachedImageUrl('/api/application-configuration/background-image'),
bustCache: () => bustImageCache('/api/application-configuration/background-image')
getUrl: () => getCachedImageUrl('/api/application-images/background'),
bustCache: () => bustImageCache('/api/application-images/background')
};
export const cachedProfilePicture: CachableImage = {