feat(list): theater globe(12 max indicator) + details hidden indicator
Build and Deploy / build-and-deploy (push) Successful in 3m27s
Build and Deploy / build-and-deploy (push) Successful in 3m27s
This commit is contained in:
@@ -19,11 +19,13 @@ import ListBg from "./listbg.webp";
|
|||||||
import ListNcFrame from "./listframe.png";
|
import ListNcFrame from "./listframe.png";
|
||||||
import ListRtop from "./listrtop.png";
|
import ListRtop from "./listrtop.png";
|
||||||
import PaimonSmug from "./listsmug.webp";
|
import PaimonSmug from "./listsmug.webp";
|
||||||
|
import ListTheaterMax from "./listtheatermax.webp";
|
||||||
|
|
||||||
export const listBg = file(ListBg);
|
export const listBg = file(ListBg);
|
||||||
export const listNcFrame = file(ListNcFrame);
|
export const listNcFrame = file(ListNcFrame);
|
||||||
export const listRtop = file(ListRtop);
|
export const listRtop = file(ListRtop);
|
||||||
export const smug = file(PaimonSmug);
|
export const smug = file(PaimonSmug);
|
||||||
|
// export const listTheaterMax = file(ListTheaterMax)
|
||||||
|
|
||||||
export const listBadges = {
|
export const listBadges = {
|
||||||
abyss: file(BadgeAbyss),
|
abyss: file(BadgeAbyss),
|
||||||
@@ -34,6 +36,7 @@ export const listBadges = {
|
|||||||
abyssStar: file(BadgeAbyssStar),
|
abyssStar: file(BadgeAbyssStar),
|
||||||
theaterStar: file(BadgeTheaterStar),
|
theaterStar: file(BadgeTheaterStar),
|
||||||
theaterArcana: file(BadgeArcana),
|
theaterArcana: file(BadgeArcana),
|
||||||
|
theaterMax: file(ListTheaterMax),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const elements = {
|
export const elements = {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -149,7 +149,7 @@ export function card(app: App) {
|
|||||||
if (typeof data.playerInfo.showAvatarInfoList === "undefined")
|
if (typeof data.playerInfo.showAvatarInfoList === "undefined")
|
||||||
return error(400, errorLoc.private);
|
return error(400, errorLoc.private);
|
||||||
|
|
||||||
if (debug) return { data };
|
if (debug === "dump") return { data };
|
||||||
|
|
||||||
const cacheKey = hash(
|
const cacheKey = hash(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
@@ -170,6 +170,7 @@ export function card(app: App) {
|
|||||||
avatarStore,
|
avatarStore,
|
||||||
locs[lang ?? "en"],
|
locs[lang ?? "en"],
|
||||||
log,
|
log,
|
||||||
|
debug === "render",
|
||||||
);
|
);
|
||||||
|
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
@@ -218,10 +219,13 @@ export function card(app: App) {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
lang: Locale,
|
lang: Locale,
|
||||||
debug: t.Boolean({
|
debug: t.Enum(
|
||||||
|
{ none: "none", render: "render", dump: "dump" },
|
||||||
|
{
|
||||||
description: "Return debug information instead of card.",
|
description: "Return debug information instead of card.",
|
||||||
default: false,
|
default: "none",
|
||||||
}),
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{ additionalProperties: true },
|
{ additionalProperties: true },
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export async function ListPage(
|
|||||||
avatars: AvatarStore,
|
avatars: AvatarStore,
|
||||||
locs: EnkaLocsLanguage,
|
locs: EnkaLocsLanguage,
|
||||||
log: Logger,
|
log: Logger,
|
||||||
|
debugRender: boolean,
|
||||||
) {
|
) {
|
||||||
return CardResponse(
|
return CardResponse(
|
||||||
<div tw="flex bg-black relative h-full w-full font-[ShinShin] text-[#7E6E5C]">
|
<div tw="flex bg-black relative h-full w-full font-[ShinShin] text-[#7E6E5C]">
|
||||||
@@ -150,6 +151,9 @@ export async function ListPage(
|
|||||||
"Imaginarium Theater",
|
"Imaginarium Theater",
|
||||||
p.theaterActIndex ? (
|
p.theaterActIndex ? (
|
||||||
<div tw="flex items-center">
|
<div tw="flex items-center">
|
||||||
|
{(p.theaterStarIndex ?? 0) >= 12 && (
|
||||||
|
<img src="/b/theaterMax" tw="w-7 h-7 -mt-1 mr-0.5" />
|
||||||
|
)}
|
||||||
Act {p.theaterActIndex}
|
Act {p.theaterActIndex}
|
||||||
{p.theaterStarIndex && p.theaterStarIndex > 10 && (
|
{p.theaterStarIndex && p.theaterStarIndex > 10 && (
|
||||||
<div tw="flex items-center">
|
<div tw="flex items-center">
|
||||||
@@ -277,6 +281,30 @@ export async function ListPage(
|
|||||||
</div>
|
</div>
|
||||||
{/* powered by */}
|
{/* powered by */}
|
||||||
<div tw="absolute bottom-0 left-0 ml-[.5em] flex items-center">
|
<div tw="absolute bottom-0 left-0 ml-[.5em] flex items-center">
|
||||||
|
{/* character details hidden, duh */}
|
||||||
|
{p.showAvatarInfoList.length > (avatarInfoList?.length ?? 0) && (
|
||||||
|
<div tw="absolute -top-[1.5em] text-[1.175em] text-nowrap text-[#CABCAC] flex gap-2 items-center">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="#BCA692"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
tw="mb-1"
|
||||||
|
>
|
||||||
|
<path d="M14 18a2 2 0 0 0-4 0" />
|
||||||
|
<path d="m19 11-2.11-6.657a2 2 0 0 0-2.752-1.148l-1.276.61A2 2 0 0 1 12 4H8.5a2 2 0 0 0-1.925 1.456L5 11" />
|
||||||
|
<path d="M2 11h20" />
|
||||||
|
<circle cx="17" cy="18" r="3" />
|
||||||
|
<circle cx="7" cy="18" r="3" />
|
||||||
|
</svg>
|
||||||
|
Character Details Hidden
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div tw="text-[2em] font-[shicon] pb-[.1em] -mr-[.3em] text-black/25">
|
<div tw="text-[2em] font-[shicon] pb-[.1em] -mr-[.3em] text-black/25">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -340,5 +368,6 @@ export async function ListPage(
|
|||||||
],
|
],
|
||||||
{ width: 1200, height: 732 },
|
{ width: 1200, height: 732 },
|
||||||
log,
|
log,
|
||||||
|
debugRender,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export async function CardResponse(
|
|||||||
// same ratio as card
|
// same ratio as card
|
||||||
size = { width: 1228, height: 512 },
|
size = { width: 1228, height: 512 },
|
||||||
log = createLogger("RES"),
|
log = createLogger("RES"),
|
||||||
|
debugRender = false,
|
||||||
) {
|
) {
|
||||||
const resources = await Promise.all(assets)
|
const resources = await Promise.all(assets)
|
||||||
.then((list) =>
|
.then((list) =>
|
||||||
@@ -60,6 +61,7 @@ export async function CardResponse(
|
|||||||
data: ArrayBuffer | Buffer;
|
data: ArrayBuffer | Buffer;
|
||||||
}[],
|
}[],
|
||||||
persistentImages: resources.filter((a) => a.persistent),
|
persistentImages: resources.filter((a) => a.persistent),
|
||||||
|
drawDebugBorder: debugRender,
|
||||||
...size,
|
...size,
|
||||||
// drawDebugBorder: true,
|
// drawDebugBorder: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user