Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e0ffe75
Initial plan
Copilot Oct 15, 2025
8205fb3
Enable noUncheckedIndexedAccess and exactOptionalPropertyTypes, start…
Copilot Oct 15, 2025
a754474
Fix ArkSign widget TypeScript errors
Copilot Oct 15, 2025
6b71f81
Fix ISEventFramework TypeScript errors
Copilot Oct 15, 2025
942e35b
Fix small files with 1-2 TypeScript errors
Copilot Oct 15, 2025
3cf7229
Fix lint errors, prettier formatting
Copilot Oct 15, 2025
3ff5b39
Add comment explaining v-bind pattern for exactOptionalPropertyTypes
Copilot Oct 15, 2025
aea08ab
Fix EquipList and MedalList TypeScript errors
Copilot Oct 15, 2025
f84b213
Fix smaller files with 1-2 TypeScript errors
Copilot Oct 15, 2025
34412fe
Document TypeScript 5.9 upgrade progress - 52% complete
Copilot Oct 15, 2025
7903002
Fix TypeScript errors in smaller utility files
Copilot Oct 15, 2025
b11e35f
Fix MedalList components and small utility files
Copilot Oct 15, 2025
631aeb8
Fix MedalShowcase and MedalStats TypeScript errors
Copilot Oct 15, 2025
7a9a770
refactor: enable TypeScript 5.9 strict options (noUncheckedIndexedAcc…
Copilot Oct 15, 2025
d4b6bcc
refactor: fix type by cursor
StarHeartHunt Oct 15, 2025
a0da871
Delete UPGRADE_PROGRESS.md
StarHeartHunt Oct 15, 2025
73db8fe
Fix vite.config.ts TypeScript error to resolve lint action failure
Copilot Oct 15, 2025
582a4db
fix: disable ts 5.9 options on node
StarHeartHunt Oct 15, 2025
7bbb2e2
revert: fix vite
StarHeartHunt Oct 15, 2025
35fa1c1
chore: enable noUncheckedIndexedAccess by @vue/tsconfig
StarHeartHunt Oct 15, 2025
5a68420
refactor: remove v-bind pattern from Cost.vue per review feedback
Copilot Oct 15, 2025
40e5d71
refactor: replace all v-bind patterns with direct prop binding per re…
Copilot Oct 15, 2025
7002d45
Discard changes to vite.config.ts
StarHeartHunt Oct 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Cost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ defineProps<{
<template>
<div class="my-8px flex flex-col items-center justify-center">
<Avatar
:rarity="rarity - 1"
:name="name"
:rarity="rarity - 1"
:profession="professionMap[profession]"
size="sm"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/FilterRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const removeAll = () => {
<Checkbox
v-for="label in labels"
:key="label"
:value="label"
:no-width="noWidth"
:value="label"
>
{{ label }}
</Checkbox>
Expand Down
14 changes: 10 additions & 4 deletions src/entries/CVList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ async function initSkinTable() {
if (buildinPatchMap) {
for (const charPatch of Object.values(buildinPatchMap)) {
for (const [charPatchId, charSkinId] of Object.entries(charPatch)) {
avatarMapping[charPatchId] = table.charSkins[charSkinId].avatarId;
const charSkin = table.charSkins[charSkinId];
if (charSkin) {
avatarMapping[charPatchId] = charSkin.avatarId;
}
}
}
}
Expand Down Expand Up @@ -74,10 +77,13 @@ async function initCharWord() {
for (const charVoice of Object.values(dict)) {
const cvName = charVoice.cvName;
for (const name of cvName) {
if (!data[charVoice.voiceLangType][name]) {
data[charVoice.voiceLangType][name] = new Set();
const langTypeData = data[charVoice.voiceLangType];
if (langTypeData) {
if (!langTypeData[name]) {
langTypeData[name] = new Set();
}
langTypeData[name].add(charId);
}
data[charVoice.voiceLangType][name].add(charId);
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/entries/ISEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ for (const eventEle of Array.from(eventEles)) {
},
);
// add new Category
if (scenes[0].etype) {
sceneCategoryTabList.push(scenes[0].etype);
const firstScene = scenes[0];
if (firstScene && firstScene.etype) {
sceneCategoryTabList.push(firstScene.etype);
sceneCategoryData.push([]);
}
sceneCategoryData.at(-1)?.push(scenes[0].ename || scenes[0].name || "???");
sceneCategoryData
.at(-1)
?.push(firstScene?.ename || firstScene?.name || "???");
// creat event
createApp(ISEventFramework, {
sceneData: scenes,
Expand Down
5 changes: 2 additions & 3 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ export function isMobile(): boolean {
);
}
export function isMobileSkin(): boolean {
return !!document
.querySelectorAll("body")[0]
.classList.contains("skin-minerva");
const bodyElement = document.querySelectorAll("body")[0];
return !!bodyElement?.classList.contains("skin-minerva");
}
export function isFirefox(): boolean {
return window.navigator.userAgent.includes("Firefox");
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/ArkSign/Label.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defineProps<{
<template>
<div class="flex items-center">
{{ nickName }}
<NTag size="small" :bordered="false" :color="typeColor" class="mx-2">
<NTag :color="typeColor" size="small" :bordered="false" class="mx-2">
{{ channelName }}
</NTag>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/ArkSign/getUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export function skill(skillId: string) {

export function specialized(skills: Char["skills"], skillId: string) {
const index = skills.findIndex((e) => e.id === skillId);
const sp = skills[index].specializeLevel;
const skill = skills[index];
if (!skill) {
return `${TORAPPU_ENDPOINT}/assets/specialized_icon/specialized_tiny_0.png`;
}
const sp = skill.specializeLevel;
return `${TORAPPU_ENDPOINT}/assets/specialized_icon/specialized_tiny_${sp}.png`;
}

Expand Down
114 changes: 62 additions & 52 deletions src/widgets/ArkSign/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,43 +102,51 @@ const showInfo = ref({
elite: true,
});
const charList = ref<Char[]>([]);
const selectedChars = computed(() => {
return selected.value
.map((charId) => charData.value[charId])
.filter((char): char is Char => char !== undefined);
});
function order() {
const selectedList: Char[] = [];
const result: Char[] = [];
for (const charId of Object.keys(charData.value)) {
const charDataItem = charData.value[charId];
const charInfo = charInfoMap.value[charId];
if (!charDataItem || !charInfo) continue;

const index = selected.value.indexOf(charId);
if (index !== -1) {
selectedList[index] = charData.value[charId];
selectedList[index] = charDataItem;
continue;
}
if (
selectFilterProfession.value !== "all" &&
charInfoMap.value[charId].profession !== selectFilterProfession.value
charInfo.profession !== selectFilterProfession.value
) {
continue;
}
if (
selectFilterRarity.value === "3" &&
charInfoMap.value[charId].rarity >= 3
) {
if (selectFilterRarity.value === "3" && charInfo.rarity >= 3) {
continue;
}
if (
selectFilterRarity.value !== "all" &&
charInfoMap.value[charId].rarity !==
Number.parseInt(selectFilterRarity.value) - 1
charInfo.rarity !== Number.parseInt(selectFilterRarity.value) - 1
) {
continue;
}
result.push(charData.value[charId]);
result.push(charDataItem);
}
switch (selectSort.value) {
case "level": {
result.sort((a, b) => {
const aInfo = charInfoMap.value[a.charId];
const bInfo = charInfoMap.value[b.charId];
if (!aInfo || !bInfo) return 0;

if (a.evolvePhase === b.evolvePhase) {
return a.level === b.level
? charInfoMap.value[a.charId].rarity -
charInfoMap.value[b.charId].rarity
? aInfo.rarity - bInfo.rarity
: a.level - b.level;
}
return a.evolvePhase - b.evolvePhase;
Expand Down Expand Up @@ -198,6 +206,9 @@ function getCredAndSecret(text: string) {
const textArr = text.split(",");
const cred = textArr[0];
const secret = textArr[1];
if (!cred || !secret) {
throw new Error("凭证格式不正确");
}
return { cred, secret };
}
async function importSKLandOperatorData() {
Expand Down Expand Up @@ -233,8 +244,9 @@ async function importSKLandOperatorData() {
doctorInfo.value.level = playerInfo.level;
clearSelected();
console.log(playerInfo);
} catch (error: any) {
message.error(error.message);
} catch (error: unknown) {
const errorMessage = error instanceof Error ? error.message : String(error);
message.error(errorMessage);
}
}
async function importSKLandOperatorDataByUid(uid: string) {
Expand Down Expand Up @@ -321,17 +333,25 @@ async function GenerateImg(type: string) {
}
function calcSkillRankShow(skills: Char["skills"], skillId: string) {
const index = skills.findIndex((e) => e.id === skillId);
const sp = skills[index].specializeLevel;
const skill = skills[index];
if (!skill) return false;
const sp = skill.specializeLevel;
return sp === 0 ? true : false;
}
function calcEquip(char: Char) {
return char.defaultEquipId
? equip(equipmentInfoMap.value[char.defaultEquipId].typeIcon)
if (!char.defaultEquipId) {
return `${STATIC_ENDPOINT}/charinfo/img/skland/skill_icon_none.png`;
}
const equipInfo = equipmentInfoMap.value[char.defaultEquipId];
return equipInfo
? equip(equipInfo.typeIcon)
: `${STATIC_ENDPOINT}/charinfo/img/skland/skill_icon_none.png`;
}
function calcEquipStyle(char: Char) {
if (char.defaultEquipId) {
return equipmentInfoMap.value[char.defaultEquipId].typeIcon === "original"
const equipInfo = equipmentInfoMap.value[char.defaultEquipId];
if (!equipInfo) return "height:100%";
return equipInfo.typeIcon === "original"
? "height:80%"
: "transform:translateY(-4%);height:100%;";
} else {
Expand Down Expand Up @@ -427,21 +447,17 @@ function calcServerColor(id: string) {
@end="onEnd"
>
<TransitionGroup
:name="!drag ? 'fade' : undefined"
type="transition"
tag="div"
:name="!drag ? 'fade' : undefined"
class="signContainer-inner"
>
<div
v-for="charId in selected"
:key="charId"
v-for="char in selectedChars"
:key="char.charId"
class="charSignItem"
>
<img
class="charImg"
:src="portrait(charData[charId].skinId)"
alt=""
/>
<img class="charImg" :src="portrait(char.skinId)" alt="" />
<div class="mask"></div>
<div class="skillWrapper">
<div v-show="showInfo.equip" class="skillIcon">
Expand All @@ -454,40 +470,32 @@ function calcServerColor(id: string) {
</div>
<div class="equipIcon">
<img
:src="calcEquip(charData[charId])"
:style="calcEquipStyle(charData[charId])"
:src="calcEquip(char)"
:style="calcEquipStyle(char)"
/>
</div>
</div>
<div v-show="showInfo.skill" class="skillIcon">
<template v-if="charData[charId].defaultSkillId">
<template v-if="char.defaultSkillId">
<img
class="skillRank"
:src="
specialized(
charData[charId].skills,
charData[charId].defaultSkillId,
)
"
:src="specialized(char.skills, char.defaultSkillId)"
alt=""
/>
<div
v-if="
calcSkillRankShow(
charData[charId].skills,
charData[charId].defaultSkillId,
)
calcSkillRankShow(char.skills, char.defaultSkillId)
"
class="skillRank"
>
{{ charData[charId].mainSkillLvl }}
{{ char.mainSkillLvl }}
</div>
</template>
<img
crossorigin="anonymous"
class="skillImg"
:src="`${skill(
charData[charId].defaultSkillId,
char.defaultSkillId,
)}?a=${new Date().getTime()}`"
alt=""
/>
Expand All @@ -497,35 +505,35 @@ function calcServerColor(id: string) {
<div>
<img
v-show="showInfo.potential"
:src="potential(charData[charId].potentialRank)"
:src="potential(char.potentialRank)"
alt=""
/>
</div>
<div>
<div v-show="showInfo.level" class="level">
<br />{{ charData[charId].level }}
<br />{{ char.level }}
</div>
</div>
</div>
<div class="eliteWrapper">
<div v-show="showInfo.elite" class="eliteInner">
<img
:src="elite(charData[charId].evolvePhase)"
:src="elite(char.evolvePhase)"
width="100%"
height="auto"
/>
</div>
</div>
<div class="topWrapper">
<div v-if="charInfoMap[char.charId]" class="topWrapper">
<img
v-show="showInfo.profession"
class="professionIcon"
:src="profession(charInfoMap[charId].profession)"
:src="profession(charInfoMap[char.charId]!.profession)"
/>
<img
v-show="showInfo.rarity"
class="rarityIcon"
:src="starWhite(charInfoMap[charId].rarity)"
:src="starWhite(charInfoMap[char.charId]!.rarity)"
/>
</div>
</div>
Expand Down Expand Up @@ -565,7 +573,7 @@ function calcServerColor(id: string) {
选择游戏角色:
<div style="min-width: 200px; margin-left: 10px">
<n-select
v-model:value="selectUid"
:value="selectUid"
:options="bindingListOptions"
:render-label="renderLabel"
@update:value="handleChangeUid"
Expand Down Expand Up @@ -617,7 +625,7 @@ function calcServerColor(id: string) {
<div class="w-full" style="margin-bottom: 5px">选择游戏角色:</div>
<div class="w-full">
<n-select
v-model:value="selectUid"
:value="selectUid"
:options="bindingListOptions"
:render-label="renderLabel"
@update:value="handleChangeUid"
Expand Down Expand Up @@ -774,7 +782,9 @@ function calcServerColor(id: string) {
alt=""
/>
<div class="mask"></div>
<div class="name">{{ charInfoMap[item.charId].name }}</div>
<div v-if="charInfoMap[item.charId]" class="name">
{{ charInfoMap[item.charId]!.name }}
</div>
<div class="bottomWrapper">
<div class="level">{{ item.level }}</div>
<img :src="potential(item.potentialRank)" alt="" />
Expand All @@ -788,14 +798,14 @@ function calcServerColor(id: string) {
/>
</div>
</div>
<div class="topWrapper">
<div v-if="charInfoMap[item.charId]" class="topWrapper">
<img
class="professionIcon"
:src="profession(charInfoMap[item.charId].profession)"
:src="profession(charInfoMap[item.charId]!.profession)"
/>
<img
class="rarityIcon"
:src="starYellow(charInfoMap[item.charId].rarity)"
:src="starYellow(charInfoMap[item.charId]!.rarity)"
/>
</div>
<div v-if="selected.includes(item.charId)" class="selectMask">
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/ArkSign/skland.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export async function getPlayerBinding(
};
}
// 没有就用第一个
const { uid, nickName, channelMasterId } = bindingList[0];
const firstBinding = bindingList[0];
if (!firstBinding) {
throw new Error("绑定列表为空");
}
const { uid, nickName, channelMasterId } = firstBinding;
return {
bindingList,
uid,
Expand Down
Loading