mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 21:16:17 +02:00
Add image URL generation at runtime to allow for dynamic image sizes (#1439)
* add getImageUrl to domain endpoints * add new ItemImage component and hooks to generate image url * add configuration for image resolution based on types
This commit is contained in:
@@ -215,7 +215,7 @@ const PlayerbarSliderSchema = z.object({
|
||||
type: PlayerbarSliderTypeSchema,
|
||||
});
|
||||
|
||||
const GeneralSettingsSchema = z.object({
|
||||
export const GeneralSettingsSchema = z.object({
|
||||
accent: z
|
||||
.string()
|
||||
.refine(
|
||||
@@ -224,7 +224,6 @@ const GeneralSettingsSchema = z.object({
|
||||
message: 'Accent must be a valid rgb() color string',
|
||||
},
|
||||
),
|
||||
albumArtRes: z.number().nullable().optional(),
|
||||
albumBackground: z.boolean(),
|
||||
albumBackgroundBlur: z.number(),
|
||||
artistBackground: z.boolean(),
|
||||
@@ -238,6 +237,13 @@ const GeneralSettingsSchema = z.object({
|
||||
genreTarget: GenreTargetSchema,
|
||||
homeFeature: z.boolean(),
|
||||
homeItems: z.array(SortableItemSchema(HomeItemSchema)),
|
||||
imageRes: z.object({
|
||||
fullScreenPlayer: z.number(),
|
||||
header: z.number(),
|
||||
itemCard: z.number(),
|
||||
sidebar: z.number(),
|
||||
table: z.number(),
|
||||
}),
|
||||
language: z.string(),
|
||||
lastFM: z.boolean(),
|
||||
lastfmApiKey: z.string(),
|
||||
@@ -712,7 +718,6 @@ const initialState: SettingsState = {
|
||||
},
|
||||
general: {
|
||||
accent: 'rgb(53, 116, 252)',
|
||||
albumArtRes: undefined,
|
||||
albumBackground: false,
|
||||
albumBackgroundBlur: 3,
|
||||
artistBackground: false,
|
||||
@@ -726,6 +731,13 @@ const initialState: SettingsState = {
|
||||
genreTarget: GenreTarget.TRACK,
|
||||
homeFeature: true,
|
||||
homeItems,
|
||||
imageRes: {
|
||||
fullScreenPlayer: 0,
|
||||
header: 300,
|
||||
itemCard: 300,
|
||||
sidebar: 300,
|
||||
table: 30,
|
||||
},
|
||||
language: 'en',
|
||||
lastFM: true,
|
||||
lastfmApiKey: '',
|
||||
|
||||
Reference in New Issue
Block a user