fix(talents): support extra level
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"@takumi-rs/image-response": "^0.71.7",
|
||||
"@types/react": "^19.2.14",
|
||||
"elysia": "latest",
|
||||
"enka.ts": "^1.1.3",
|
||||
"enka.ts": "^1.1.4",
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"tw-to-css": "^0.0.12",
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
"elysia": ["[email protected]", "", { "dependencies": { "cookie": "^1.1.1", "exact-mirror": "^0.2.7", "fast-decode-uri-component": "^1.0.1", "memoirist": "^0.4.0" }, "peerDependencies": { "@sinclair/typebox": ">= 0.34.0 < 1", "@types/bun": ">= 1.2.0", "file-type": ">= 20.0.0", "openapi-types": ">= 12.0.0", "typescript": ">= 5.0.0" }, "optionalPeers": ["@types/bun", "typescript"] }, "sha512-2UlmNEjPJVA/WZVPYKy+KdsrfFwwNlqSBW1lHz6i2AHc75k7gV4Rhm01kFeotH7PDiHIX2G8X3KnRPc33SGVIg=="],
|
||||
|
||||
"enka.ts": ["[email protected].3", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-FnlUB96ZOqfWRksEWcahLJJrNoggLmIUm572TTYOpkLcb4e7yX1n80qEGv1yd215ZlkWQ7oinJK7CY5Gt5G16w=="],
|
||||
"enka.ts": ["[email protected].4", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-whRbg1zjGAN2AGp/grBwdrj5kcy7F2ULL2L+vQhpsOBZaFvu2aQWTNxLXvCGRQinrLlu1LBiWvjJ2PHtgF7grQ=="],
|
||||
|
||||
"escape-string-regexp": ["[email protected]", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
"@takumi-rs/image-response": "^0.71.7",
|
||||
"@types/react": "^19.2.14",
|
||||
"elysia": "latest",
|
||||
"enka.ts": "^1.1.3",
|
||||
"enka.ts": "^1.1.4",
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"tw-to-css": "^0.0.12"
|
||||
|
||||
+11
-2
@@ -289,7 +289,14 @@ export function card(app: App) {
|
||||
}}
|
||||
>
|
||||
{Object.entries(avatar.Skills).map(([key, src]) => {
|
||||
const talentLevel = char.skillLevelMap?.[key] ?? 0;
|
||||
const extraKey = Object.keys(
|
||||
char.proudSkillExtraLevelMap || {},
|
||||
).find((e) => e.endsWith(key.slice(-1)));
|
||||
const talentLevel =
|
||||
(char.skillLevelMap?.[key] ?? 0) +
|
||||
(extraKey
|
||||
? char.proudSkillExtraLevelMap![extraKey]
|
||||
: 0);
|
||||
return (
|
||||
<div tw="mt-[.6em] relative">
|
||||
<TalentSvg
|
||||
@@ -302,7 +309,9 @@ export function card(app: App) {
|
||||
tw="w-[2.5em] absolute left-[.15em] top-[.15em] m-[.4em_0_0_.4em]"
|
||||
/>
|
||||
<div tw="absolute -bottom-[.1em] w-full flex justify-center">
|
||||
<div tw="bg-[#323232b3] pt-[5%] pb-[2%] text-[.8em] rounded-[1.4em]">
|
||||
<div
|
||||
tw={`${extraKey ? "bg-[#45deffcc]" : "bg-[#323232b3]"} pt-[5%] pb-[2%] text-[.8em] rounded-[1.4em]`}
|
||||
>
|
||||
<span tw="px-[.6em]">{talentLevel}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user