feat : update
CI / Verify (push) Successful in 1m14s
CI / Build immutable images and deploy (push) Successful in 3m18s

This commit is contained in:
2026-09-06 15:58:11 +07:00 Unverified
parent de76a27c86
commit 5f6b8c1059
11 changed files with 3934 additions and 21 deletions
+18 -2
View File
@@ -66,6 +66,22 @@ function catalogCharacterWithUrls(
};
}),
})),
leveling: item.leveling.map((group) => ({
...group,
items: group.items.map((entry) => {
const material = materialByKey.get(entry.key);
return {
...entry,
name: material?.name ?? entry.key,
description: material?.description ?? null,
rarity: material?.rarity ?? null,
type: material?.type ?? null,
imageUrl: material ? publicMediaUrl(material.imageKey) : null,
lunarisUrl: `https://lunaris.moe/material/${encodeURIComponent(entry.key)}`,
available: Boolean(material),
};
}),
})),
};
}
@@ -125,7 +141,7 @@ export async function getGuideByCharacterKey(characterKey: string) {
.limit(1);
if (!row) return null;
const materialKeys = [...new Set(
row.character.ascension.flatMap((group) => group.items.map((item) => item.key)),
[...row.character.ascension, ...row.character.leveling].flatMap((group) => group.items.map((item) => item.key)),
)];
const [materials, poster, bleeding] = await Promise.all([
materialKeys.length
@@ -162,7 +178,7 @@ async function getGuideContent(slug: string, publicOnly: boolean) {
.limit(1);
if (!row) return null;
const materialKeys = [...new Set(
row.character.ascension.flatMap((group) => group.items.map((item) => item.key)),
[...row.character.ascension, ...row.character.leveling].flatMap((group) => group.items.map((item) => item.key)),
)];
const [sections, weaponConditionsRows, groups, profile, constellationGroups, teams, aliases, materials, poster, bleeding] = await Promise.all([
getDb().select().from(guideSections).where(and(eq(guideSections.guideId, row.guide.id), eq(guideSections.enabled, true))).orderBy(asc(guideSections.sortOrder)),
+3 -3
View File
@@ -37,9 +37,9 @@ export const updateGuideSchema = z.strictObject({
overview: z.string().trim().min(1).max(500),
youtubeUrl: youtubeUrlSchema,
posterArtMediaId: z.string().uuid().nullable().optional(),
posterArtOffsetX: z.number().finite().min(-50).max(50).optional(),
posterArtOffsetY: z.number().finite().min(-50).max(50).optional(),
posterArtScale: z.number().finite().min(50).max(200).optional(),
posterArtOffsetX: z.number().finite().min(-1000).max(1000).optional(),
posterArtOffsetY: z.number().finite().min(-1000).max(1000).optional(),
posterArtScale: z.number().finite().min(50).max(500).optional(),
posterTopColors: z.tuple([z.string().regex(/^#[0-9a-fA-F]{6}$/u), z.string().regex(/^#[0-9a-fA-F]{6}$/u)]).optional(),
posterBottomColors: z.tuple([z.string().regex(/^#[0-9a-fA-F]{6}$/u), z.string().regex(/^#[0-9a-fA-F]{6}$/u)]).optional(),
posterBleeding: z.array(z.strictObject({