This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import "enka.ts";
|
||||
|
||||
declare module "enka.ts" {
|
||||
namespace ApiResponse {
|
||||
interface ShowAvatarInfo {
|
||||
energyType?: number;
|
||||
talentLevel?: number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
@@ -222,11 +222,8 @@ export function getAvatar(
|
||||
avatarId.split("-")[0] === `${id}` &&
|
||||
avatar.Element ===
|
||||
ElementList[
|
||||
(
|
||||
playerInfo.showAvatarInfoList.find(
|
||||
(e) => e.avatar.avatarId === id,
|
||||
) as { energyType: number } | undefined
|
||||
)?.energyType ?? 0
|
||||
playerInfo.showAvatarInfoList.find((e) => e.avatar.avatarId === id)
|
||||
?.energyType ?? 0
|
||||
],
|
||||
)?.[1] || store[id]
|
||||
);
|
||||
|
||||
@@ -244,7 +244,7 @@ export async function ListPage(
|
||||
avatarInfoList?.find(
|
||||
(e) => e.avatar.avatarId === a.avatar.avatarId,
|
||||
)!.talentIdList?.length ??
|
||||
(a as unknown as { talentLevel?: number }).talentLevel,
|
||||
a.talentLevel,
|
||||
}))
|
||||
.map(({ a, c, cons }) => (
|
||||
<div tw="relative flex flex-col rounded-[.3em] overflow-hidden shadow-[0_.08em_.35em_rgba(0,0,0,.18)]">
|
||||
@@ -262,7 +262,7 @@ export async function ListPage(
|
||||
/>
|
||||
<img
|
||||
tw="absolute top-[.2em] left-[.2em] w-[1.7em] h-[1.7em]"
|
||||
src={`/e/${ElementList[(a as unknown as { energyType: number }).energyType]?.toLowerCase()}`}
|
||||
src={`/e/${ElementList[a.energyType ?? 0]?.toLowerCase()}`}
|
||||
/>
|
||||
<div
|
||||
tw={`flex text-[#404B57] bg-[#E9E6DB] items-center justify-center grow text-[1.1em] ${a.level > 90 && "text-[#966E6C]"}`}
|
||||
|
||||
Reference in New Issue
Block a user